MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getCacheKey

Method getCacheKey

src/Storages/StorageLog.cpp:202–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202String LogSource::getCacheKey(const NameAndTypePair & name_and_type_on_disk) const
203{
204 auto name_in_storage = name_and_type_on_disk.getNameInStorage();
205
206 /// If this column is part of a Nested group, use the Nested name as the cache key.
207 /// This ensures that all subcolumns of the same Nested (e.g. "c1.c2.64" and "c1.size0")
208 /// share the same SubstreamsCache, so that shared substreams like Nested array offsets
209 /// are read only once from the underlying file stream.
210 if (Nested::isSubcolumnOfNested(name_in_storage, storage->columns_with_collected_nested))
211 return Nested::splitName(name_in_storage).first;
212
213 return name_in_storage;
214}
215
216Chunk LogSource::generate()
217{

Callers

nothing calls this directly

Calls 3

isSubcolumnOfNestedFunction · 0.85
getNameInStorageMethod · 0.80
splitNameFunction · 0.50

Tested by

no test coverage detected