added checks and comments for FixedSizeDequeWithGaps; review fixes [#CLICKHOUSE-3479]

This commit is contained in:
Nikolai Kochetov 2018-02-02 15:34:45 +03:00 committed by alexey-milovidov
parent beb866150d
commit 4040e156b5

View File

@ -147,12 +147,6 @@ void VersionedCollapsingSortedBlockInputStream::merge(MutableColumns & merged_co
while (rows_to_merge) while (rows_to_merge)
{ {
if (merged_rows >= max_block_size)
{
++blocks_written;
return;
}
const auto & row = current_keys.front(); const auto & row = current_keys.front();
auto gap = current_keys.frontGap(); auto gap = current_keys.frontGap();
@ -162,6 +156,12 @@ void VersionedCollapsingSortedBlockInputStream::merge(MutableColumns & merged_co
++merged_rows; ++merged_rows;
--rows_to_merge; --rows_to_merge;
if (merged_rows >= max_block_size)
{
++blocks_written;
return;
}
} }
} }