Hi community,
Anyone could help to review the pr.

ISSUE: https://issues.apache.org/jira/browse/CALCITE-5000
PR: https://github.com/apache/calcite/pull/2714

This Jira aims to reduce aggregate functions, when arg of agg-call is in
the aggregate's group.

Example:
--  origin sql
select max(c1) from t group by c1
-- optimized sql
select c1 from t group by c1

Common aggregate functions(field `x` exists in aggregate's group):
max(x) => x
min(x) => x
avg(x) => x
any_value(x) => x

Best,
XuRenhe

Reply via email to