true changes

This commit is contained in:
Nikita Mikhaylov 2019-12-05 12:49:30 +03:00
parent 013d839dcf
commit 9d005d1565
2 changed files with 13 additions and 13 deletions

View File

@ -200,6 +200,10 @@ SummingSortedBlockInputStream::SummingSortedBlockInputStream(
void SummingSortedBlockInputStream::insertCurrentRowIfNeeded(MutableColumns & merged_columns)
{
/// We have nothing to aggregate. It means that it could be non-zero, because we have columns_not_to_aggregate.
if (columns_to_aggregate.empty())
current_row_is_zero = false;
for (auto & desc : columns_to_aggregate)
{
// Do not insert if the aggregation state hasn't been created
@ -329,11 +333,7 @@ void SummingSortedBlockInputStream::merge(MutableColumns & merged_columns, std::
current_row_is_zero = true;
}
else
{
key_differs = next_key != current_key;
/// If current_key is not empty - thats why current_row is not zero.
current_row_is_zero = false;
}
if (key_differs)

View File

@ -3,20 +3,20 @@
2018-02-02 00:00:00 2
-- 2 2
2
1
2
-- 2 2
2
1
2
-- 2 2
2
2
-- 2 2 2
1
1
1
2
2
2
-- 2 2
2
1
2
-- SummingMergeTree with Nullable column with duplicates
2018-02-01 00:00:00 4
2018-02-02 00:00:00 6
@ -50,9 +50,9 @@
2
2
-- 2 2 2
1
1
1
2
2
2
-- 2 2
2
2