Merge pull request #45058 from nickitat/fix_grouping_sets_with_memory_efficient_aggr

Disable memory efficient merging for distributed aggregation when grouping sets are present
This commit is contained in:
Alexey Milovidov 2023-01-10 05:08:55 +03:00 committed by GitHub
commit 3963eeae16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -1776,7 +1776,8 @@ static void executeMergeAggregatedImpl(
query_plan.getCurrentDataStream(),
params,
final,
settings.distributed_aggregation_memory_efficient && is_remote_storage,
/// Grouping sets don't work with distributed_aggregation_memory_efficient enabled (#43989)
settings.distributed_aggregation_memory_efficient && is_remote_storage && !has_grouping_sets,
settings.max_threads,
settings.aggregation_memory_efficient_merge_threads,
should_produce_results_in_order_of_bucket_number,

View File

@ -0,0 +1,3 @@
set distributed_aggregation_memory_efficient = 1;
select number as a, number+1 as b from remote('127.0.0.{1,2}', numbers_mt(1e5)) group by grouping sets ((a), (b)) format Null;