2023-08-09 20:57:49 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Parsers/IAST.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class ASTFunction;
|
|
|
|
|
|
|
|
/** name BY columns TYPE typename(args) in create query
|
|
|
|
*/
|
|
|
|
class ASTStatisticDeclaration : public IAST
|
|
|
|
{
|
|
|
|
public:
|
2023-09-08 00:27:17 +00:00
|
|
|
IAST * columns;
|
|
|
|
/// TODO type should be a list of ASTFunction, for example, 'tdigest(256), hyperloglog(128)', etc.
|
2023-09-04 13:51:00 +00:00
|
|
|
String type;
|
2023-08-09 20:57:49 +00:00
|
|
|
|
|
|
|
/** Get the text that identifies this element. */
|
|
|
|
String getID(char) const override { return "Stat"; }
|
|
|
|
|
2023-09-08 00:27:17 +00:00
|
|
|
std::vector<String> getColumnNames() const;
|
|
|
|
|
2023-08-09 20:57:49 +00:00
|
|
|
ASTPtr clone() const override;
|
|
|
|
void formatImpl(const FormatSettings & s, FormatState & state, FormatStateStacked frame) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|