[
https://issues.apache.org/jira/browse/CALCITE-5162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chunwei Lei resolved CALCITE-5162.
----------------------------------
Fix Version/s: 1.31.0
Resolution: Fixed
Fixed in
https://github.com/apache/calcite/commit/f278efb0411ba29c7bd167f5d02e566bf542acb3.
> 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
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.31.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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)