hsyuan commented on a change in pull request #1670: [WIP][CALCITE-3495]
RelDecorrelator generate plan with different semantics when handle Aggregate
URL: https://github.com/apache/calcite/pull/1670#discussion_r359147717
##########
File path: core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java
##########
@@ -457,6 +468,12 @@ public Frame decorrelateRel(Aggregate rel) {
// Aggregate itself should not reference corVars.
assert !cm.mapRefRelToCorRef.containsKey(rel);
+ for (AggregateCall call : rel.getAggCallList()) {
+ if (aggFunctionNotFitToDecorrelate(call.getAggregation())) {
+ return null;
+ }
+ }
Review comment:
But I am not sure Calcite can decorrelate it or not.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services