snuyanzin commented on code in PR #26407: URL: https://github.com/apache/flink/pull/26407#discussion_r2035245920
########## 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: then I don't understand why do we need both `!groups.isEmpty && !groups.get(0).orderKeys.getFieldCollations.isEmpty` in condition? isn't just one of them enough? -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org