#pragma once #include #include #include namespace DB { enum StatisticType { TDigest = 0, }; class ColumnsDescription; struct StatisticDescription { /// the type of statistic, right now it's only tdigest. StatisticType type; /// Names of statistic columns String column_name; ASTPtr ast; String getTypeName() const; StatisticDescription() = default; static StatisticDescription getStatisticFromColumnDeclaration(const ASTColumnDeclaration & column); static std::vector getStatisticsFromAST(const ASTPtr & definition_ast, const ColumnsDescription & columns); }; }