ClickHouse/src/Parsers/ASTWindowDefinition.h
Alexander Kuzmenkov 73c2ca7da5 fixes
2021-05-29 16:12:18 +03:00

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;
};
}