autophagy commented on code in PR #28212:
URL: https://github.com/apache/flink/pull/28212#discussion_r3323646912
##########
flink-table/flink-table-test-utils/src/main/java/org/apache/flink/table/runtime/functions/ProcessTableFunctionTestHarness.java:
##########
@@ -947,6 +948,61 @@ private void
validatePartitionConsistency(List<ArgumentInfo> arguments) {
}
}
+ private void validateInitialStateKeys(List<ArgumentInfo> arguments) {
+ if (stateArgs.isEmpty()) {
+ return;
+ }
+
+ // all partitioned tables share the same partition key shape, so
any one is
+ // sufficient for validation.
+ Optional<TableArgumentInfo> partitionedTable =
+ arguments.stream()
+ .filter(arg -> arg instanceof TableArgumentInfo)
+ .map(arg -> (TableArgumentInfo) arg)
+ .filter(t -> t.isSetSemantic &&
t.partitionColumnNames != null)
+ .findFirst();
+
+ if (partitionedTable.isEmpty()) {
+ return;
Review Comment:
Yep, exactly, its for cases with optional partition, set semantic table args
and no partition by. But it's a good call, I didnt have any tests that actually
hit this. I'll add a test for optional partition with initial state and no
partition
--
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]