Fix logging for optimize_aggregation_in_order=1 (with small max_block_size)

This commit is contained in:
Azat Khuzhin 2021-03-04 10:27:41 +03:00
parent 6a6bc3924d
commit 45ca803973
3 changed files with 17 additions and 0 deletions

View File

@ -143,6 +143,7 @@ void AggregatingInOrderTransform::consume(Chunk chunk)
source_column = source_column->cut(key_begin, rows - key_begin);
current_chunk = Chunk(source_columns, rows - key_begin);
src_rows -= current_chunk.getNumRows();
block_end_reached = true;
need_generate = true;
cur_block_size = 0;

View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL=trace
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
$CLICKHOUSE_CLIENT --optimize_aggregation_in_order=1 -nm -q "
drop table if exists data_01753;
create table data_01753 (key Int) engine=MergeTree() order by key as select * from numbers(8);
select * from data_01753 group by key settings max_block_size=1;
select * from data_01753 group by key settings max_block_size=1;
drop table data_01753;
" |& grep -F -c 'AggregatingInOrderTransform: Aggregated. 8 to 8 rows'