From 5ff1f7237a4401fe44304f7cc631f2ac8a050c61 Mon Sep 17 00:00:00 2001 From: taiyang-li <654010905@qq.com> Date: Tue, 14 Feb 2023 21:35:16 +0800 Subject: [PATCH 01/80] initial commit of quantileGK --- .../AggregateFunctionQuantile.h | 3 + .../AggregateFunctionQuantileGK.cpp | 70 +++ src/AggregateFunctions/QuantileGK.h | 442 ++++++++++++++++++ .../registerAggregateFunctions.cpp | 2 + 4 files changed, 517 insertions(+) create mode 100644 src/AggregateFunctions/AggregateFunctionQuantileGK.cpp create mode 100644 src/AggregateFunctions/QuantileGK.h diff --git a/src/AggregateFunctions/AggregateFunctionQuantile.h b/src/AggregateFunctions/AggregateFunctionQuantile.h index 49157acf690..ab7edcd082e 100644 --- a/src/AggregateFunctions/AggregateFunctionQuantile.h +++ b/src/AggregateFunctions/AggregateFunctionQuantile.h @@ -250,4 +250,7 @@ struct NameQuantilesBFloat16 { static constexpr auto name = "quantilesBFloat16"; struct NameQuantileBFloat16Weighted { static constexpr auto name = "quantileBFloat16Weighted"; }; struct NameQuantilesBFloat16Weighted { static constexpr auto name = "quantilesBFloat16Weighted"; }; +struct NameQuantileGK { static constexpr auto name = "quantileGK"; }; +struct NameQuantilesGK { static constexpr auto name = "quantilesGK"; }; + } diff --git a/src/AggregateFunctions/AggregateFunctionQuantileGK.cpp b/src/AggregateFunctions/AggregateFunctionQuantileGK.cpp new file mode 100644 index 00000000000..54174f3be44 --- /dev/null +++ b/src/AggregateFunctions/AggregateFunctionQuantileGK.cpp @@ -0,0 +1,70 @@ +#include +#include +#include +#include +#include +#include +#include + +namespace DB +{ + +namespace +{ + +template using FuncQuantileGK = AggregateFunctionQuantile, NameQuantileGK, true, void, false>; +template using FuncQuantilesGK = AggregateFunctionQuantile, NameQuantilesGK, true, void, true>; + + +template