[
https://issues.apache.org/jira/browse/CALCITE-1366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15459960#comment-15459960
]
Julian Hyde commented on CALCITE-1366:
--------------------------------------
I've logged https://issues.apache.org/jira/browse/CALCITE-1368 for predicates
on aggregate functions.
> Metadata provider should not pull predicates up through GROUP BY ()
> -------------------------------------------------------------------
>
> Key: CALCITE-1366
> URL: https://issues.apache.org/jira/browse/CALCITE-1366
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.9.0
> Reporter: Jesus Camacho Rodriguez
> Assignee: Jesus Camacho Rodriguez
>
> In org.apache.calcite.rel.metadata.RelMdPredicates.java:
> {code}
> ...
> for (RexNode r : inputInfo.pulledUpPredicates) {
> ImmutableBitSet rCols = RelOptUtil.InputFinder.bits(r);
> if (groupKeys.contains(rCols)) {
> r = r.accept(new RexPermuteInputsShuttle(m, input));
> aggPullUpPredicates.add(r);
> }
> }
> ...
> {code}
> The check does not take into account that _rCols_ might be empty, and then
> _r_ cannot be pulled up e.g. count\(*).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)