You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Danny Chan (JIRA)" <ji...@apache.org> on 2019/07/29 02:18:00 UTC

[jira] [Assigned] (CALCITE-3124) Infinite rule matching when AggregateRemoveRule is enabled for SUM0

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

Danny Chan reassigned CALCITE-3124:
-----------------------------------

    Assignee: Forward Xu

> Infinite rule matching when AggregateRemoveRule is enabled for SUM0
> -------------------------------------------------------------------
>
>                 Key: CALCITE-3124
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3124
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Haisheng Yuan
>            Assignee: Forward Xu
>            Priority: Major
>
> Make the following changes (uncomment return clause) to AggregateRemoveRule, the test case {{JdbcTest.testHavingNot2}} won't complete due to infinite rule matching.
> {noformat}
> --- a/core/src/main/java/org/apache/calcite/rel/rules/AggregateRemoveRule.java
> +++ b/core/src/main/java/org/apache/calcite/rel/rules/AggregateRemoveRule.java
> @@ -102,7 +102,7 @@ public void onMatch(RelOptRuleCall call) {
>          if (aggregation.getKind() == SqlKind.SUM0) {
>          // Bail out for SUM0 to avoid potential infinite rule matching,
>          // because it may be generated by transforming SUM aggregate
>          // function to SUM0 and COUNT.
> -        return;
> +//        return;
>        }
>        final SqlSplittableAggFunction splitter =
>            Objects.requireNonNull(
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)