twalthr commented on code in PR #27777:
URL: https://github.com/apache/flink/pull/27777#discussion_r2941901097
##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableImpl.java:
##########
@@ -901,6 +901,11 @@ public Table process(Class<? extends UserDefinedFunction>
function, Object... ar
createPartitionQueryOperation(),
table.tableEnvironment, arguments));
}
+ @Override
+ public Table toChangelog() {
+ return process("TO_CHANGELOG");
Review Comment:
don't hard code the name here. use the built in function definition. I know
this was an issue for ml predict, but we should fix it properly now.
##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/PartitionedTable.java:
##########
@@ -138,4 +139,26 @@ public interface PartitionedTable {
* @see ProcessTableFunction
*/
Table process(Class<? extends UserDefinedFunction> function, Object...
arguments);
+
+ /**
+ * Converts this dynamic table into an append-only stream with an explicit
operation code column
+ * using the built-in {@link BuiltInFunctionDefinitions#TO_CHANGELOG
TO_CHANGELOG} PTF.
Review Comment:
Remove references to BuiltInFunctionDefinitions#TO_CHANGELOG TO_CHANGELOG.
BuiltInFunctionDefinitions is rather internal.
##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableImpl.java:
##########
@@ -901,6 +901,11 @@ public Table process(Class<? extends UserDefinedFunction>
function, Object... ar
createPartitionQueryOperation(),
table.tableEnvironment, arguments));
}
+ @Override
+ public Table toChangelog() {
Review Comment:
add op_mapping parameter and op, same functionality as in sql. to avoid to
many overloads, we can accept Expression and force people to use `.asArgument`.
--
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]