16 #ifndef IMPALA_EXPRS_AGGREGATE_FUNCTIONS_H
17 #define IMPALA_EXPRS_AGGREGATE_FUNCTIONS_H
21 using namespace impala_udf;
45 static StringVal StringValSerializeOrFinalize(
88 template <
typename SRC_VAL,
typename DST_VAL>
89 static void SumUpdate(
FunctionContext*,
const SRC_VAL& src, DST_VAL* dst);
91 template <
typename SRC_VAL,
typename DST_VAL>
92 static void SumRemove(
FunctionContext*,
const SRC_VAL& src, DST_VAL* dst);
103 template <
typename T>
107 template <
typename T>
125 template <
typename T>
127 template <
typename T>
142 template <
typename T>
144 template <
typename T>
146 template <
typename T>
149 template <
typename T>
154 template <
typename T>
158 template <
typename T>
166 template <
typename T>
177 template <
typename T>
184 static uint64_t HllFinalEstimate(
const uint8_t* buckets, int32_t num_buckets);
190 template <
typename T>
234 template <
typename T>
236 template <
typename T>
240 template <
typename T>
245 template <
typename T>
251 template <
typename T>
258 template <
typename T>
void CountUpdate(FunctionContext *context, const IntVal &input, BigIntVal *val)
void StringConcatUpdate(FunctionContext *context, const StringVal &arg1, const StringVal &arg2, StringVal *val)
void HllMerge(FunctionContext *ctx, const StringVal &src, StringVal *dst)
StringVal HllFinalize(FunctionContext *ctx, const StringVal &src)
This object has a compatible storage format with boost::ptime.
void HllInit(FunctionContext *ctx, StringVal *dst)
void HllUpdate(FunctionContext *ctx, const IntVal &src, StringVal *dst)
void StringConcatMerge(FunctionContext *context, const StringVal &src, StringVal *dst)
void AvgInit(FunctionContext *context, BufferVal *val)
static const int HLL_PRECISION
StringVal StringConcatFinalize(FunctionContext *context, const StringVal &val)
void CountMerge(FunctionContext *context, const BigIntVal &src, BigIntVal *dst)
void AvgMerge(FunctionContext *context, const BufferVal &src, BufferVal *dst)
void AvgUpdate(FunctionContext *context, const DoubleVal &input, BufferVal *val)
DoubleVal AvgFinalize(FunctionContext *context, const BufferVal &val)