autophagy commented on code in PR #29130:
URL: https://github.com/apache/flink/pull/29130#discussion_r4452847451


##########
flink-table/flink-table-test-utils/src/main/java/org/apache/flink/table/runtime/functions/ProcessTableFunctionTestHarness.java:
##########
@@ -1098,6 +1120,41 @@ public Builder partitionBy(String... columnNames) {
                 return this;
             }
 
+            /**
+             * Configures the changelog mode this table argument's input 
carries, as reported by
+             * {@link TableSemantics#changelogMode()}.
+             *
+             * <p>Required for an argument that declares {@code 
ArgumentTrait.SUPPORT_UPDATES}. Any
+             * other argument only accepts {@link ChangelogMode#insertOnly()}.
+             *
+             * @param mode the changelog mode this argument's input carries
+             */
+            public Builder changelogMode(ChangelogMode mode) {
+                this.changelogMode = checkNotNull(mode, "mode must not be 
null");
+                return this;
+            }
+
+            /**
+             * Declares a candidate upsert key for this table argument, i.e. a 
set of columns that
+             * uniquely identifies a row in the argument's changelog.
+             *
+             * <p>Call this multiple times to declare more than one candidate 
key. Each call adds a
+             * further candidate. This mirrors {@link 
TableSemantics#upsertKeyColumns()}, which
+             * reports a list of candidate keys derived from the input's 
metadata.
+             *
+             * <p>Required when using upsert input modes ({@link 
ChangelogMode#upsert(boolean)})
+             * with a {@code SET_SEMANTIC_TABLE} argument: one of the declared 
candidates must match
+             * the argument's partition columns.

Review Comment:
   Also, yeah the check is `validateUpsertStyleInput` and it tests 
partition/upsert key equality



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