gustavodemorais commented on code in PR #29812:
URL: https://github.com/apache/flink/pull/29812#discussion_r4527127256


##########
docs/content.zh/docs/dev/table/functions/ptfs.md:
##########
@@ -1720,10 +1720,15 @@ SELECT * FROM f(table_arg => TABLE UpdatingTable)
 If updates should be supported, ensure that the data type of the table 
argument is chosen in a way that it can encode
 changes. In other words: choose a `Row` type that exposes the `RowKind` change 
flag.
 
-The changelog of the backing input table decides which kinds of changes enter 
the function. The function receives `{+I}`
-when the input table is append-only. The function receives `{+I,+U,-D}` if the 
input table is upserting using the same
-upsert key as the partition key. Otherwise, retractions `{+I,-U,+U,-D}` (i.e. 
including `RowKind.UPDATE_BEFORE`) enter
-the function. Use `ArgumentTrait.REQUIRE_UPDATE_BEFORE` to enforce retractions 
for all updating cases.
+The changelog of the backing input table decides which kinds of changes enter 
the function:
+
+- `{+I}` if the input table is append-only.
+- `{+I,+U,-D}` if the input table is upserting and either:
+  - the table argument has set semantics and is partitioned by the upsert key, 
or
+  - the table argument has row semantics and the function emits only inserts.

Review Comment:
   good point



##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/annotation/ArgumentTrait.java:
##########
@@ -243,8 +249,8 @@ public enum ArgumentTrait {
      * // In both encodings, a materialized table would only contain a row for 
Alice.
      * </pre>
      *
-     * <p>Note: This trait is valid for {@link #SET_SEMANTIC_TABLE} arguments 
that {@link
-     * #SUPPORT_UPDATES}.
+     * <p>Note: This trait is valid for {@link #ROW_SEMANTIC_TABLE} and {@link 
#SET_SEMANTIC_TABLE}
+     * arguments that {@link #SUPPORT_UPDATES}.

Review Comment:
   done



##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/annotation/ArgumentTrait.java:
##########
@@ -275,8 +281,8 @@ public enum ArgumentTrait {
      * // In both encodings, a materialized table would only contain a row for 
Alice.
      * </pre>
      *
-     * <p>Note: This trait is valid for {@link #SET_SEMANTIC_TABLE} arguments 
that {@link
-     * #SUPPORT_UPDATES}.
+     * <p>Note: This trait is valid for {@link #ROW_SEMANTIC_TABLE} and {@link 
#SET_SEMANTIC_TABLE}
+     * arguments that {@link #SUPPORT_UPDATES}.

Review Comment:
   done



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