You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Haisheng Yuan (JIRA)" <ji...@apache.org> on 2019/06/11 23:58:00 UTC
[jira] [Created] (CALCITE-3124) Infinite rule matching when
AggregateRemoveRule is enabled for SUM0
Haisheng Yuan created CALCITE-3124:
--------------------------------------
Summary: 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
Make the following changes (uncomment return clause) to /AggregateRemoveRule, the test case {{JdbcTest.testHavingNot2}} won't complete due to infinite rule matching.
{code:diff}
--- 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(
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)