提交 221c0540 编写于 作者: N Nikolai Kochetov 提交者: alexey-milovidov

fixed bytes_allocated counter for cache dictionaries

上级 e2c00fc4
......@@ -424,11 +424,11 @@ void CacheDictionary::has(const PaddedPODArray<Key> & ids, PaddedPODArray<UInt8>
void CacheDictionary::createAttributes()
{
const auto size = dict_struct.attributes.size();
attributes.reserve(size);
const auto attributes_size = dict_struct.attributes.size();
attributes.reserve(attributes_size);
bytes_allocated += size * sizeof(CellMetadata);
bytes_allocated += size * sizeof(attributes.front());
bytes_allocated += attributes_size * sizeof(attributes.front());
for (const auto & attribute : dict_struct.attributes)
{
......
......@@ -321,11 +321,11 @@ void ComplexKeyCacheDictionary::has(const Columns & key_columns, const DataTypes
void ComplexKeyCacheDictionary::createAttributes()
{
const auto size = dict_struct.attributes.size();
attributes.reserve(size);
const auto attributes_size = dict_struct.attributes.size();
attributes.reserve(attributes_size);
bytes_allocated += size * sizeof(CellMetadata);
bytes_allocated += size * sizeof(attributes.front());
bytes_allocated += attributes_size * sizeof(attributes.front());
for (const auto & attribute : dict_struct.attributes)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册