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

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16894684#comment-16894684 ] 

Forward Xu commented on CALCITE-3124:
-------------------------------------

hi [~hyuan] Can you assign this isuse to me, I want to give it a try.

> 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
>            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)