You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/03/01 10:22:00 UTC

[GitHub] zabetak commented on a change in pull request #1033: [CALCITE-2820] Add a version of AggregateReduceFunctionsRule that does not reduce SUM to SUM0

zabetak commented on a change in pull request #1033: [CALCITE-2820] Add a version of AggregateReduceFunctionsRule that does not reduce SUM to SUM0
URL: https://github.com/apache/calcite/pull/1033#discussion_r261549267
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/rules/AggregateReduceFunctionsRule.java
 ##########
 @@ -94,15 +94,23 @@
 
   /** The singleton. */
   public static final AggregateReduceFunctionsRule INSTANCE =
-      new AggregateReduceFunctionsRule(operand(LogicalAggregate.class, any()),
+      new AggregateReduceFunctionsRule(operand(LogicalAggregate.class, any()), true,
           RelFactories.LOGICAL_BUILDER);
 
+  /** The singleton. */
+  public static final AggregateReduceFunctionsRule NO_REDUCE_SUM =
+          new AggregateReduceFunctionsRule(operand(LogicalAggregate.class, any()), false,
+                                           RelFactories.LOGICAL_BUILDER);
+
+  private final boolean reduceSum;
+
   //~ Constructors -----------------------------------------------------------
 
   /** Creates an AggregateReduceFunctionsRule. */
-  public AggregateReduceFunctionsRule(RelOptRuleOperand operand,
+  public AggregateReduceFunctionsRule(RelOptRuleOperand operand, boolean reduceSum,
 
 Review comment:
   Changing a public constructor brakes backward compatibility. I don't think this is desired for this reason.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services