Tartarus0zm commented on a change in pull request #15341:
URL: https://github.com/apache/flink/pull/15341#discussion_r617526584
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/SplitAggregateRule.scala
##########
@@ -280,11 +282,15 @@ class SplitAggregateRule extends RelOptRule(
}
// STEP 2.3: construct partial aggregates
- relBuilder.aggregate(
- relBuilder.groupKey(fullGroupSet,
ImmutableList.of[ImmutableBitSet](fullGroupSet)),
+ // Create aggregate node directly to avoid ClassCastException,
+ // Please see https://issues.apache.org/jira/browse/FLINK-21923 for more
details.
+ val partialAggregate = FlinkLogicalAggregate.create(
Review comment:
The implementation of the previous version used calcite's function reuse
optimization.
It seems that only avg will translate count and sum0. Discuss offline with
@beyond1920, use the create method to be more direct, otherwise, we need to add
a project to restore the columns.
Do you suggest to still use calcite, and then rebuild the project?
--
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]