Au-Miner commented on code in PR #28153:
URL: https://github.com/apache/flink/pull/28153#discussion_r3273445658


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/sql/SqlWindowTableFunction.java:
##########
@@ -144,12 +144,21 @@ public static RelDataType inferRowType(
             RelDataTypeFactory typeFactory,
             RelDataType inputRowType,
             RelDataType timeAttributeType) {
+        // window_start and window_end follow the input time attribute type 
(TIMESTAMP or
+        // TIMESTAMP_LTZ) but strip the time attribute metadata 
(rowtime/proctime markers)
+        RelDataType windowBoundType =
+                typeFactory.createTypeWithNullability(
+                        typeFactory.createSqlType(
+                                timeAttributeType.getSqlTypeName(),
+                                timeAttributeType.getPrecision()),
+                        false);
+
         return typeFactory
                 .builder()
                 .kind(inputRowType.getStructKind())
                 .addAll(inputRowType.getFieldList())
-                .add("window_start", SqlTypeName.TIMESTAMP, 3)
-                .add("window_end", SqlTypeName.TIMESTAMP, 3)
+                .add("window_start", windowBoundType)

Review Comment:
   WindowAggregateTest.xml && WindowJoinTest.xml && WindowTableFunctionTest.xml 
&& etc. need double check whether an update is required



-- 
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]

Reply via email to