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

Function DecodeNdv

be/src/exec/incr-stats-util.cc:101–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101string DecodeNdv(const string& ndv, bool is_encoded) {
102 if (!is_encoded) return ndv;
103 DCHECK_EQ(ndv.size() % 2, 0);
104 string decoded_ndv(AggregateFunctions::DEFAULT_HLL_LEN, 0);
105 int idx = 0;
106 for (int i = 0; i < ndv.size(); i += 2) {
107 for (int j = 0; j < (static_cast<uint8_t>(ndv[i])) + 1; ++j) {
108 decoded_ndv[idx++] = ndv[i+1];
109 }
110 }
111 DCHECK_EQ(idx, AggregateFunctions::DEFAULT_HLL_LEN);
112 return decoded_ndv;
113}
114
115#define UPDATE_LOW_VALUE(TYPE) \
116 if (!(low_value.__isset.TYPE##_val) || value.TYPE##_val < low_value.TYPE##_val) { \

Callers 2

TESTFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68