mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Disable projection when grouping set is used.
This commit is contained in:
parent
4d9cfb9d05
commit
abf51bccfd
@ -5541,6 +5541,10 @@ std::optional<ProjectionCandidate> MergeTreeData::getQueryProcessingStageWithAgg
|
||||
if (select_query->interpolate() && !select_query->interpolate()->children.empty())
|
||||
return std::nullopt;
|
||||
|
||||
// Currently projections don't support GROUPING SET yet.
|
||||
if (select_query->group_by_with_grouping_sets)
|
||||
return std::nullopt;
|
||||
|
||||
auto query_options = SelectQueryOptions(
|
||||
QueryProcessingStage::WithMergeableState,
|
||||
/* depth */ 1,
|
||||
|
@ -0,0 +1,6 @@
|
||||
a 2
|
||||
a x 1
|
||||
a y 1
|
||||
b 2
|
||||
b x 1
|
||||
b y 1
|
@ -0,0 +1,9 @@
|
||||
drop table if exists test;
|
||||
|
||||
create table test(dim1 String, dim2 String, projection p1 (select dim1, dim2, count() group by dim1, dim2)) engine MergeTree order by dim1;
|
||||
|
||||
insert into test values ('a', 'x') ('a', 'y') ('b', 'x') ('b', 'y');
|
||||
|
||||
select dim1, dim2, count() from test group by grouping sets ((dim1, dim2), dim1) order by dim1, dim2, count();
|
||||
|
||||
drop table test;
|
Loading…
Reference in New Issue
Block a user