From de71bfd18b2df90100d10bf2291dfae1571b75f1 Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Sun, 24 Sep 2023 03:14:30 +0800 Subject: [PATCH 1/7] Introduce -ArgMin/-ArgMax combinators. --- .../AggregateFunctionCombinatorMinMax.cpp | 92 +++++++++++++++ .../AggregateFunctionCombinatorMinMax.h | 111 ++++++++++++++++++ .../registerAggregateFunctions.cpp | 2 + 3 files changed, 205 insertions(+) create mode 100644 src/AggregateFunctions/AggregateFunctionCombinatorMinMax.cpp create mode 100644 src/AggregateFunctions/AggregateFunctionCombinatorMinMax.h diff --git a/src/AggregateFunctions/AggregateFunctionCombinatorMinMax.cpp b/src/AggregateFunctions/AggregateFunctionCombinatorMinMax.cpp new file mode 100644 index 000000000000..882008b303fd --- /dev/null +++ b/src/AggregateFunctions/AggregateFunctionCombinatorMinMax.cpp @@ -0,0 +1,92 @@ +#include +#include +#include +#include +#include +#include + +namespace DB +{ + +namespace ErrorCodes +{ +extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH; +} + +namespace +{ +template