gustavodemorais commented on code in PR #28128:
URL: https://github.com/apache/flink/pull/28128#discussion_r3208871244
##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/PartitionedTable.java:
##########
@@ -169,4 +169,70 @@ public interface PartitionedTable {
* @see ProcessTableFunction
*/
Table process(Class<? extends UserDefinedFunction> function, Object...
arguments);
+
+ /**
+ * Converts this partitioned dynamic table into an append-only table with
an explicit operation
+ * code column using the built-in {@code TO_CHANGELOG} process table
function with set
+ * semantics.
+ *
+ * <p>Each input row - regardless of its original change operation - is
emitted as an
+ * INSERT-only row with a string {@code "op"} column indicating the
original operation (INSERT,
+ * UPDATE_AFTER, DELETE, etc.). With set semantics, rows for the same
partition key are
+ * co-located in the same parallel operator instance.
+ *
+ * <p>For row semantics (each row processed independently), use {@link
Table#toChangelog} on the
+ * unpartitioned table.
+ *
+ * <p>Example:
+ *
+ * <pre>{@code
+ * Table result = table
+ * .partitionBy($("id"))
Review Comment:
nit: The unpartitioned `Table#toChangelog` lead-in example shows the no-arg
form first (`table.toChangelog()`). The new javadoc jumps straight to the
with-args case. Adding the minimal form first matches the docs and shows the
most common usage:
```java
// Default: adds 'op' column and supports all changelog modes
Table result = table.partitionBy($("id")).toChangelog();
// With custom parameters
Table result = table
.partitionBy($("id"))
.toChangelog(
descriptor("op_code").asArgument("op"),
map("INSERT", "I", "UPDATE_AFTER", "U").asArgument("op_mapping")
);
```
Same fix for `fromChangelog`.
--
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]