This commit is contained in:
Nikita Vasilev 2019-02-14 12:13:04 +03:00
parent 683314b69b
commit 64e0732b4a
2 changed files with 3 additions and 6 deletions

View File

@ -39,13 +39,11 @@ void MergeTreeMinMaxGranule::serializeBinary(WriteBuffer & ostr) const
void MergeTreeMinMaxGranule::deserializeBinary(ReadBuffer & istr)
{
parallelogram.clear();
Field min_val, max_val;
for (size_t i = 0; i < index.columns.size(); ++i)
{
const DataTypePtr & type = index.data_types[i];
Field min_val;
type->deserializeBinary(min_val, istr);
Field max_val;
type->deserializeBinary(max_val, istr);
parallelogram.emplace_back(min_val, true, max_val, true);
@ -61,11 +59,10 @@ void MergeTreeMinMaxGranule::update(const Block & block, size_t * pos, UInt64 li
size_t rows_read = std::min(limit, block.rows() - *pos);
Field field_min, field_max;
for (size_t i = 0; i < index.columns.size(); ++i)
{
const auto & column = block.getByName(index.columns[i]).column;
Field field_min, field_max;
column->cut(*pos, rows_read)->getExtremes(field_min, field_max);
if (parallelogram.size() <= i)

View File

@ -1 +1 @@
"rows_read": 100,
"rows_read": 100,