[
https://issues.apache.org/jira/browse/CALCITE-3124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Haisheng Yuan updated CALCITE-3124:
-----------------------------------
Description:
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}
{code: java}
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}
was:
Make the following changes (uncomment return clause) to /AggregateRemoveRule,
the test case {{JdbcTest.testHavingNot2}} won't complete due to infinite rule
matching.
{code: java}
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}
> 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}
> {code: java}
> 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)