xuyangzhong commented on code in PR #23505:
URL: https://github.com/apache/flink/pull/23505#discussion_r1462653816
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/WindowUtil.scala:
##########
@@ -317,11 +352,17 @@ object WindowUtil {
/**
* For rowtime window, return true if the given aggregate grouping contains
window start and end.
* For proctime window, we should also check if it exists a neighbour
windowTableFunctionCall.
+ *
+ * If the window is a session window, we should also check if the partition
keys are the same as
+ * the group keys. See more at
[[WindowUtil.validateGroupKeyPartitionKeyIfNecessary()]].
*/
def isValidWindowAggregate(agg: FlinkLogicalAggregate): Boolean = {
val fmq =
FlinkRelMetadataQuery.reuseOrCreate(agg.getCluster.getMetadataQuery)
val windowProperties = fmq.getRelWindowProperties(agg.getInput)
val grouping = agg.getGroupSet
+ if (!validateGroupKeyPartitionKeyIfNecessary(grouping, windowProperties)) {
Review Comment:
I update it to `validGroupKeyPartitionKey`
--
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]