Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
Description
Constants in group keys can be removed to reduce shuffle. For instance,
select key, value, count(*) from (select 1 as key, value from src) dual group by key, value;
can be reduced to
select value, count(*) from (select 1 as key, value from src) dual group by value;
It could save much resource in distribute system if all group keys are constants since the distribution becomes SINGLETON instead of HASH.
Attachments
Issue Links
- duplicates
-
CALCITE-1023 Planner rule that removes Aggregate keys that are constant
- Closed