snuyanzin commented on code in PR #27616:
URL: https://github.com/apache/flink/pull/27616#discussion_r2839575666
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalOverAggregateRule.scala:
##########
@@ -83,6 +82,52 @@ class StreamPhysicalOverAggregateRule(config: Config)
extends ConverterRule(conf
outputRowType,
logicWindow)
}
+
+ private def inferOutputRowType(
+ rel: RelNode,
+ logicWindow: FlinkLogicalOverAggregate): RelDataType = {
+ // only supports one group now
+ val aggCalls =
logicWindow.groups.get(0).getAggregateCalls(logicWindow).asScala
+
+ if (aggCalls.isEmpty) {
+ return rel.getRowType
+ }
+
+ val logicWindowInputFieldCount =
logicWindow.getInput.getRowType.getFieldCount
+ val relTypes = rel.getRowType.getFieldList.asScala.map(f =>
f.getType).toList.asJava
+ val windowInputTypes =
+ logicWindow.getInput.getRowType.getFieldList.asScala.map(f =>
f.getType).toList.asJava
+
+ // Type might be different because of
RelTimeIndicatorConverter#materializeTimeIndicators
Review Comment:
Finally fixed in RelTimeIndicatorConverter
Also seems fixed another similar issue when window function applied to
watermark column (in this case it is actual for 1.20 as well), covered with
tests
--
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]