mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
53 lines
1.2 KiB
C++
53 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include <Interpreters/WindowDescription.h>
|
|
|
|
#include <Parsers/IAST.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
struct ASTWindowDefinition : public IAST
|
|
{
|
|
std::string parent_window_name;
|
|
|
|
ASTPtr partition_by;
|
|
|
|
ASTPtr order_by;
|
|
|
|
bool frame_is_default = true;
|
|
WindowFrame::FrameType frame_type = WindowFrame::FrameType::Range;
|
|
WindowFrame::BoundaryType frame_begin_type = WindowFrame::BoundaryType::Unbounded;
|
|
ASTPtr frame_begin_offset;
|
|
bool frame_begin_preceding = true;
|
|
WindowFrame::BoundaryType frame_end_type = WindowFrame::BoundaryType::Current;
|
|
ASTPtr frame_end_offset;
|
|
bool frame_end_preceding = false;
|
|
|
|
ASTPtr clone() const override;
|
|
|
|
String getID(char delimiter) const override;
|
|
|
|
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
|
|
|
std::string getDefaultWindowName() const;
|
|
};
|
|
|
|
struct ASTWindowListElement : public IAST
|
|
{
|
|
String name;
|
|
|
|
// ASTWindowDefinition
|
|
ASTPtr definition;
|
|
|
|
|
|
ASTPtr clone() const override;
|
|
|
|
String getID(char delimiter) const override;
|
|
|
|
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
|
};
|
|
|
|
}
|