mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
dbms: do not allocate memory for default strings in cache dictionaries [#METR-17328]
This commit is contained in:
parent
83cf1f81ec
commit
1ca3d930da
@ -522,7 +522,10 @@ private:
|
||||
else
|
||||
{
|
||||
const auto string_ref = cell.isDefault() ? get_default(row) : attribute_array[cell_idx];
|
||||
map[id] = String{string_ref};
|
||||
|
||||
if (!cell.isDefault())
|
||||
map[id] = String{string_ref};
|
||||
|
||||
total_length += string_ref.size + 1;
|
||||
}
|
||||
}
|
||||
@ -551,8 +554,6 @@ private:
|
||||
|
||||
out->getChars().reserve(total_length);
|
||||
|
||||
// const auto & null_value = std::get<String>(attribute.null_values);
|
||||
|
||||
for (const auto row : ext::range(0, ext::size(ids)))
|
||||
{
|
||||
const auto id = ids[row];
|
||||
|
@ -557,7 +557,10 @@ private:
|
||||
else
|
||||
{
|
||||
const auto string_ref = cell.isDefault() ? get_default(row) : attribute_array[cell_idx];
|
||||
map[key] = String{string_ref};
|
||||
|
||||
if (!cell.isDefault())
|
||||
map[key] = String{string_ref};
|
||||
|
||||
total_length += string_ref.size + 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user