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

Function serializeKeysToRawString

src/Storages/KVStorageUtils.cpp:488–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488std::vector<std::string> serializeKeysToRawString(
489 FieldVector::const_iterator & it, FieldVector::const_iterator end, DataTypePtr key_column_type, size_t max_block_size)
490{
491 size_t num_keys = end - it;
492
493 std::vector<std::string> result;
494 result.reserve(num_keys);
495
496 size_t rows_processed = 0;
497 while (it < end && (max_block_size == 0 || rows_processed < max_block_size))
498 {
499 std::string & serialized_key = result.emplace_back();
500 WriteBufferFromString wb(serialized_key);
501 key_column_type->getDefaultSerialization()->serializeBinary(*it, wb, {});
502
503 ++it;
504 ++rows_processed;
505 }
506 return result;
507}
508
509std::vector<std::string> serializeKeysToRawString(
510 FieldVector::const_iterator & it, FieldVector::const_iterator end, const DataTypes & key_column_types, size_t max_block_size)

Callers 5

generateWithKeysMethod · 0.85
getByKeysMethod · 0.85
generateMethod · 0.85
getByKeysMethod · 0.85
generateWithKeysMethod · 0.85

Calls 10

minFunction · 0.50
reserveMethod · 0.45
emplace_backMethod · 0.45
serializeBinaryMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
getTypeMethod · 0.45
pop_backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected