2021-01-12 18:34:35 +00:00
|
|
|
#pragma once
|
|
|
|
|
2021-01-30 01:16:44 +00:00
|
|
|
#include <Interpreters/WindowDescription.h>
|
2021-01-19 01:00:39 +00:00
|
|
|
|
2021-01-12 18:34:35 +00:00
|
|
|
#include <Parsers/IAST.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
struct ASTWindowDefinition : public IAST
|
|
|
|
{
|
2021-05-27 12:58:50 +00:00
|
|
|
std::string parent_window_name;
|
|
|
|
|
2021-01-12 18:34:35 +00:00
|
|
|
ASTPtr partition_by;
|
|
|
|
|
|
|
|
ASTPtr order_by;
|
|
|
|
|
2021-01-19 01:00:39 +00:00
|
|
|
WindowFrame frame;
|
|
|
|
|
2021-01-13 19:29:52 +00:00
|
|
|
|
2021-01-12 18:34:35 +00:00
|
|
|
ASTPtr clone() const override;
|
|
|
|
|
|
|
|
String getID(char delimiter) const override;
|
2021-01-13 19:29:52 +00:00
|
|
|
|
|
|
|
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
|
|
|
|
|
|
|
std::string getDefaultWindowName() const;
|
2021-01-12 18:34:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ASTWindowListElement : public IAST
|
|
|
|
{
|
|
|
|
String name;
|
|
|
|
|
|
|
|
// ASTWindowDefinition
|
|
|
|
ASTPtr definition;
|
|
|
|
|
2021-01-13 19:29:52 +00:00
|
|
|
|
2021-01-12 18:34:35 +00:00
|
|
|
ASTPtr clone() const override;
|
|
|
|
|
|
|
|
String getID(char delimiter) const override;
|
2021-01-13 19:29:52 +00:00
|
|
|
|
|
|
|
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
2021-01-12 18:34:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|