[
https://issues.apache.org/jira/browse/CALCITE-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chunwei Lei updated CALCITE-3015:
---------------------------------
Description:
Constants in group keys can be removed to reduce shuffle. For instance,
{code:java}
select key, value, count(*) from (select 1 as key, value from src) dual group
by key, value;
{code}
can be reduced to
{code:java}
select value, count(*) from (select 1 as key, value from src) dual group by
value;{code}
It could save much resource in distribute system if all group keys are
constants since the distribution becomes {{SINGLETON}} instead of {{HASH}}.
was:
Constants in group keys can be removed to reduce shuffle. For instance,
{code:java}
select key, count(*) from (select 1 as key from src) dual group by key;
{code}
can be reduced to
{code:java}
select count(*) from (select 1 as key from src) dual;{code}
It could save much resource in distribute system if all group keys are
constants since the distribution becomes {{SINGLETON}} instead of {{HASH}}.
> Add rule to remove constants in group keys
> ------------------------------------------
>
> Key: CALCITE-3015
> URL: https://issues.apache.org/jira/browse/CALCITE-3015
> Project: Calcite
> Issue Type: Improvement
> Reporter: Chunwei Lei
> Assignee: Chunwei Lei
> Priority: Major
> Fix For: 1.20.0
>
>
> Constants in group keys can be removed to reduce shuffle. For instance,
>
> {code:java}
> select key, value, count(*) from (select 1 as key, value from src) dual group
> by key, value;
> {code}
> can be reduced to
> {code:java}
> select value, count(*) from (select 1 as key, value from src) dual group by
> value;{code}
> It could save much resource in distribute system if all group keys are
> constants since the distribution becomes {{SINGLETON}} instead of {{HASH}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)