mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 09:10:48 +00:00
true changes
This commit is contained in:
parent
013d839dcf
commit
9d005d1565
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user