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

Method getUniqueKey

src/Statistics/StatsTableIdentifier.cpp:21–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19namespace DB::Statistics
20{
21auto StatsTableIdentifier::getUniqueKey() const -> UUID
22{
23 auto uuid = getUUID();
24
25 if (uuid == UUID{})
26 {
27 // some table may return empty uuid, use hash for temporary fix
28 auto hash_db = std::hash<String>()(getDatabaseName());
29 auto hash_tb = std::hash<String>()(getTableName());
30 hash_db = (hash_db & 0xffffffffffff0fffull) | 0x0000000000004000ull;
31 hash_tb = (hash_tb & 0x3fffffffffffffffull) | 0x8000000000000000ull;
32
33 uuid.toUnderType().items[0] = hash_db;
34 uuid.toUnderType().items[1] = hash_tb;
35 }
36 return uuid;
37}
38}

Callers 15

getMethod · 0.80
invalidateMethod · 0.80
hasStatsDataMethod · 0.80
readStatsDataMethod · 0.80
readStatsColumnsKeyMethod · 0.80
readSingleStatsMethod · 0.80
writeStatsDataMethod · 0.80
dropStatsColumnDataMethod · 0.80
dropStatsDataMethod · 0.80
checkTableScanMethod · 0.80

Calls 1

getUUIDFunction · 0.85

Tested by

no test coverage detected