snuyanzin commented on code in PR #26407:
URL: https://github.com/apache/flink/pull/26407#discussion_r2032563690
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/optimize/program/FlinkChangelogModeInferenceProgram.scala:
##########
@@ -310,18 +310,26 @@ class FlinkChangelogModeInferenceProgram extends
FlinkOptimizeProgram[StreamOpti
.newBuilder()
.addContainedKind(ModifyKind.INSERT)
- // All aggregates are computed over the same window and order by is
supported for only 1 field
- val orderKeyIndex =
-
over.logicWindow.groups.get(0).orderKeys.getFieldCollations.get(0).getFieldIndex
- val orderKeyType =
over.logicWindow.getRowType.getFieldList.get(orderKeyIndex).getType
if (
- !FlinkTypeFactory.isRowtimeIndicatorType(orderKeyType)
- && !FlinkTypeFactory.isProctimeIndicatorType(orderKeyType)
+ !over.logicWindow.groups.isEmpty && !over.logicWindow.groups
+ .get(0)
+ .orderKeys
+ .getFieldCollations
+ .isEmpty
Review Comment:
out of curiosity: is there a case when it is empty and
`over.logicWindow.groups` is not empty?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]