dianfu commented on code in PR #29070:
URL: https://github.com/apache/flink/pull/29070#discussion_r3980533928
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/QueryOperationConverter.java:
##########
@@ -593,6 +608,65 @@ else if (other instanceof DataStreamQueryOperation) {
throw new TableException("Unknown table operation: " + other);
}
+ private RelNode
convertWindowTableFunction(WindowTableFunctionQueryOperation windowOp) {
+ final RexBuilder rexBuilder = relBuilder.getRexBuilder();
+
+ final RelNode input = relBuilder.build();
+ final RelDataType inputRowType = input.getRowType();
+
+ final String timeColumn = windowOp.getTimeColumn();
+ final RelDataType timeAttributeType =
+ inputRowType.getField(timeColumn, false, false).getType();
+ final RelDataType outputRowType =
+ SqlWindowTableFunction.inferRowType(
+ relBuilder.getTypeFactory(), inputRowType,
timeAttributeType);
+
+ final int[] partitionIndices =
+ windowOp.getPartitionKeys().stream()
+ .mapToInt(name -> inputRowType.getField(name,
false, false).getIndex())
Review Comment:
Ditto
--
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]