xuyangzhong commented on code in PR #23505:
URL: https://github.com/apache/flink/pull/23505#discussion_r1462632191
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdWindowProperties.scala:
##########
@@ -92,13 +93,57 @@ class FlinkRelMdWindowProperties private extends
MetadataHandler[FlinkMetadata.W
return null
}
+ val windowSpec = childProps.getWindowSpec
+ // if the window a
+ if (!validateWindowProperties(windowSpec, mapInToOutPos)) {
+ // If the window becomes illegal after passing through calc or project,
+ // return no window properties
+ return null
+ }
+
childProps.copy(
transformColumnIndex(childProps.getWindowStartColumns, mapInToOutPos),
transformColumnIndex(childProps.getWindowEndColumns, mapInToOutPos),
- transformColumnIndex(childProps.getWindowTimeColumns, mapInToOutPos)
+ transformColumnIndex(childProps.getWindowTimeColumns, mapInToOutPos),
+ updateWindowSpec(windowSpec, mapInToOutPos)
)
}
+ /**
+ * Validate the window properties when passing through calc or project.
+ *
+ * This method only checks the window that contains partition keys like
session window. See more
Review Comment:
Update it to "the window like session window that contains partition keys"
--
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]