Chunwei Lei created CALCITE-5162:
------------------------------------
Summary: RelMdUniqueKeys can return more precise unique keys for
Aggregate
Key: CALCITE-5162
URL: https://issues.apache.org/jira/browse/CALCITE-5162
Project: Calcite
Issue Type: Improvement
Reporter: Chunwei Lei
Assignee: Chunwei Lei
Currently, RelMdUniqueKeys always returns group by keys as the unique key.
However, it can return more precise unique keys by looking through group by
keys. For instance:
{code:java}
select deptno, deptname, count(*) from dept group by deptno, deptname;{code}
RelMdUniqueKeys can return {{deptno}} as the unique key instead of (deptno,
deptname) if {{deptno}} is unique.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)