1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/planner/operator/logical_window.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/planner/logical_operator.hpp"
12
13namespace duckdb {
14
15//! LogicalAggregate represents an aggregate operation with (optional) GROUP BY
16//! operator.
17class LogicalWindow : public LogicalOperator {
18public:
19 static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_WINDOW;
20
21public:
22 explicit LogicalWindow(idx_t window_index)
23 : LogicalOperator(LogicalOperatorType::LOGICAL_WINDOW), window_index(window_index) {
24 }
25
26 idx_t window_index;
27
28public:
29 vector<ColumnBinding> GetColumnBindings() override;
30 void Serialize(FieldWriter &writer) const override;
31 static unique_ptr<LogicalOperator> Deserialize(LogicalDeserializationState &state, FieldReader &reader);
32 vector<idx_t> GetTableIndex() const override;
33 string GetName() const override;
34
35protected:
36 void ResolveTypes() override;
37};
38} // namespace duckdb
39