MCPcopy Create free account
hub / github.com/ByConity/ByConity / getPartsHash

Method getPartsHash

src/DataTypes/Serializations/PathInData.cpp:57–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57UInt128 PathInData::getPartsHash(const Parts::const_iterator & begin, const Parts::const_iterator & end)
58{
59 SipHash hash;
60 hash.update(std::distance(begin, end));
61 for (auto part_it = begin; part_it != end; ++part_it)
62 {
63 hash.update(part_it->key.data(), part_it->key.length());
64 hash.update(part_it->is_nested);
65 hash.update(part_it->anonymous_array_level);
66 }
67
68 UInt128 res;
69 hash.get128(res);
70 return res;
71}
72
73void PathInData::buildPath(const Parts & other_parts)
74{

Callers

nothing calls this directly

Calls 4

lengthMethod · 0.80
get128Method · 0.80
updateMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected