You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/09/03 00:14:20 UTC

[jira] [Resolved] (CALCITE-1366) Metadata provider should not pull predicates up through GROUP BY ()

     [ https://issues.apache.org/jira/browse/CALCITE-1366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde resolved CALCITE-1366.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.9.0

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/29daa451.

> 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
>             Fix For: 1.9.0
>
>
> 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)