MCPcopy Create free account
hub / github.com/apache/impala / HllMerge

Function HllMerge

be/src/udf_samples/hyperloglog-uda.cc:87–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87IMPALA_UDF_EXPORT
88void HllMerge(FunctionContext* ctx, const StringVal& src, StringVal* dst) {
89 assert(dst != NULL);
90 assert(!dst->is_null);
91 assert(!src.is_null);
92 assert(dst->len == pow(2, HLL_PRECISION));
93 assert(src.len == pow(2, HLL_PRECISION));
94 for (int i = 0; i < src.len; ++i) {
95 dst->ptr[i] = ::max(dst->ptr[i], src.ptr[i]);
96 }
97}
98
99IMPALA_UDF_EXPORT
100StringVal HllSerialize(FunctionContext* ctx, const StringVal& src) {

Callers 2

SampledNdvMergeMethod · 0.85
SampledNdvFinalizeMethod · 0.85

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected