ClickHouse/tests/queries
Azat Khuzhin 3931dbd848 Implement partial GROUP BY key for optimize_aggregation_in_order
Suppose you have a table with lots of rows, like:

    create table data_02233 (parent_key Int, child_key Int, value Int) engine=MergeTree() order by parent_key

And you want to do GROUP BY (parent_key, child_key) with optimize_aggregation_in_order:

    select parent_key, child_key, count() from data_02233 group by parent_key, child_key with totals order by parent_key, child_key

Right now, it is not possible, because optimize_aggregation_in_order
supports only w/o key aggregation, i.e. GROUP BY cannot be done inside
unique parent_key region.

v2: rebase on top SortDescriptionWithPositions
v3: disable two-level aggregation
v4: fix merging of aggregates
v5: improve tests coverage (add a test with multiple parts, to add merge processor)
v6: add a test for compiled aggregate functions (sum()) explicitly
v7: add missing sortBlock()
v8: remove group_by_description_optimized
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-29 06:58:07 +03:00
..
0_stateless Implement partial GROUP BY key for optimize_aggregation_in_order 2022-04-29 06:58:07 +03:00
1_stateful Update 00170_s3_cache.reference 2022-04-28 16:41:23 +02:00
bugs
shell_config.sh