ClickHouse/src/Storages/StatisticsDescription.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
705 B
C++
Raw Normal View History

#pragma once
#include <Parsers/IAST_fwd.h>
2023-09-26 17:16:01 +00:00
#include <Parsers/ASTColumnDeclaration.h>
#include <base/types.h>
namespace DB
{
2023-09-08 00:27:17 +00:00
enum StatisticType
{
2023-09-08 00:27:17 +00:00
TDigest = 0,
};
2023-09-26 17:16:01 +00:00
class ColumnsDescription;
2023-09-08 00:27:17 +00:00
struct StatisticDescription
{
2023-09-04 13:51:00 +00:00
/// the type of statistic, right now it's only tdigest.
2023-09-08 00:27:17 +00:00
StatisticType type;
/// Names of statistic columns
2023-08-24 12:09:42 +00:00
String column_name;
2023-09-26 17:16:01 +00:00
ASTPtr ast;
String getTypeName() const;
StatisticDescription() = default;
2023-09-26 17:16:01 +00:00
static StatisticDescription getStatisticFromColumnDeclaration(const ASTColumnDeclaration & column);
2023-09-26 17:16:01 +00:00
static std::vector<StatisticDescription> getStatisticsFromAST(const ASTPtr & definition_ast, const ColumnsDescription & columns);
};
}