godfreyhe commented on a change in pull request #15341:
URL: https://github.com/apache/flink/pull/15341#discussion_r617443983
##########
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 current approach does not consider the optimization of aggregate
function reuse
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/SplitAggregateRule.scala
##########
@@ -138,9 +138,11 @@ class SplitAggregateRule extends RelOptRule(
val windowProps = fmq.getRelWindowProperties(agg.getInput)
val isWindowAgg =
WindowUtil.groupingContainsWindowStartEnd(agg.getGroupSet, windowProps)
val isProctimeWindowAgg = isWindowAgg && !windowProps.isRowtime
+ // TableAggregate is not supported. see also FLINK-21923.
Review comment:
I do not find any explanation why TableAggregate is not supported in
FLINK-21923
--
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]