From e0f967dde8ed7cb7ecd133d7a71dd95e11798eac Mon Sep 17 00:00:00 2001 From: zhangxiao871 Date: Mon, 9 Aug 2021 23:14:51 +0800 Subject: [PATCH 001/273] Add sparkbar aggregate function. --- .../AggregateFunctionSparkbar.cpp | 72 +++++ .../AggregateFunctionSparkbar.h | 303 ++++++++++++++++++ .../registerAggregateFunctions.cpp | 2 + .../02003_aggregation_spark_bar.reference | 11 + .../02003_aggregation_spark_bar.sql | 17 + 5 files changed, 405 insertions(+) create mode 100644 src/AggregateFunctions/AggregateFunctionSparkbar.cpp create mode 100644 src/AggregateFunctions/AggregateFunctionSparkbar.h create mode 100644 tests/queries/0_stateless/02003_aggregation_spark_bar.reference create mode 100644 tests/queries/0_stateless/02003_aggregation_spark_bar.sql diff --git a/src/AggregateFunctions/AggregateFunctionSparkbar.cpp b/src/AggregateFunctions/AggregateFunctionSparkbar.cpp new file mode 100644 index 00000000000..63bcd037f26 --- /dev/null +++ b/src/AggregateFunctions/AggregateFunctionSparkbar.cpp @@ -0,0 +1,72 @@ +#include +#include +#include +#include + + +namespace DB +{ + +struct Settings; + +namespace ErrorCodes +{ +extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH; +extern const int ILLEGAL_TYPE_OF_ARGUMENT; +} + +namespace +{ + +template