[ 
https://issues.apache.org/jira/browse/CALCITE-7083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18004017#comment-18004017
 ] 

Zhen Chen commented on CALCITE-7083:
------------------------------------

Fixed in 
https://github.com/apache/calcite/commit/0071f17c870858ff66129368cf7b70fb1d072c88
Thanks for the contribution [~dongsl]
Thanks for the reviews and discussions [~cbrisson] [~xuzifu666] [~nobigo]

> RelMdDistinctRowCount aggregates implementation problems
> --------------------------------------------------------
>
>                 Key: CALCITE-7083
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7083
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.40.0
>            Reporter: Claude Brisson
>            Assignee: Silun Dong
>            Priority: Major
>              Labels: pull-request-available
>
> The default implementation of getDistinctRowCount for aggregates has several 
> problems:
> - when determining the pushable predicates, it makes the assumption that the 
> aggregate group key is a zero-based range, which is not necessarily the case 
> (the indices in the aggregate group key are the child indices, the predicates 
> are expressed in terms of the zero-based output range)
> - if there is any aggregated column in the queried group key, then it makes 
> no sense to query the distinct values on the aggregate input, the handler 
> should return null or (at most) the full cardinal of the aggregate



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to