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

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

Could you give a specific example please?

> 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
>            Priority: Major
>
> 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