MCPcopy Create free account
hub / github.com/bytedance/bolt / deserialize

Function deserialize

bolt/common/hyperloglog/DenseHll.cpp:248–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248DenseHllView deserialize(const char* serialized) {
249 common::InputByteStream stream(serialized);
250
251 auto version = stream.read<int8_t>();
252 BOLT_CHECK_EQ(kPrestoDenseV2, version);
253
254 auto indexBitLength = stream.read<int8_t>();
255 auto baseline = stream.read<int8_t>();
256
257 auto numBuckets = 1 << indexBitLength;
258 // next numBuckets / 2 bytes are deltas
259 const int8_t* deltas = stream.read<int8_t>(numBuckets / 2);
260
261 auto overflows = stream.read<int16_t>();
262
263 const uint16_t* overflowBuckets =
264 overflows ? stream.read<uint16_t>(overflows) : nullptr;
265 const int8_t* overflowValues =
266 overflows ? stream.read<int8_t>(overflows) : nullptr;
267
268 return DenseHllView{
269 indexBitLength,
270 baseline,
271 deltas,
272 overflows,
273 overflowBuckets,
274 overflowValues};
275}
276} // namespace
277
278int64_t DenseHll::cardinality() const {

Callers 10

cardinalityMethod · 0.70
DenseHllMethod · 0.70
deserializeSortingOrdersFunction · 0.50
createMethod · 0.50
deserializeMethod · 0.50
makeInsertTableHandleMethod · 0.50
deserializeMethod · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TESTFunction · 0.50

Calls

no outgoing calls

Tested by 3

TEST_FFunction · 0.40
TEST_FFunction · 0.40
TESTFunction · 0.40