| 85 | } |
| 86 | |
| 87 | IMPALA_UDF_EXPORT |
| 88 | void 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 | |
| 99 | IMPALA_UDF_EXPORT |
| 100 | StringVal HllSerialize(FunctionContext* ctx, const StringVal& src) { |
no test coverage detected