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/02 17:44:21 UTC
[jira] [Updated] (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 updated CALCITE-1366:
---------------------------------
Summary: Metadata provider should not pull predicates up through GROUP BY () (was: Metadata provider for predicates pulls up expressions without references incorrectly)
> 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)