gustavodemorais commented on code in PR #28199:
URL: https://github.com/apache/flink/pull/28199#discussion_r3280994985
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/stream/sql/ToChangelogTest.java:
##########
@@ -104,4 +104,44 @@ void testRetractPartitionBy() {
"SELECT * FROM TO_CHANGELOG(input => TABLE retract_source
PARTITION BY id)",
CHANGELOG_MODE);
}
+
+ @Test
+ void testUpsertPartitionBy() {
+ util.tableEnv()
+ .executeSql(
+ "CREATE TABLE upsert_source ("
+ + " id INT,"
+ + " name STRING,"
+ + " PRIMARY KEY (id) NOT ENFORCED"
+ + ") WITH ("
+ + " 'connector' = 'values',"
+ + " 'changelog-mode' = 'I,UA,D'"
+ + ")");
+ util.verifyRelPlan(
+ "SELECT * FROM TO_CHANGELOG("
+ + "input => TABLE upsert_source PARTITION BY id, "
+ + "op => DESCRIPTOR(op), "
+ + "op_mapping => MAP['INSERT,UPDATE_AFTER', 'C',
'DELETE', 'D'])",
+ CHANGELOG_MODE);
+ }
+
+ @Test
+ void testUpsertPartitionByNoUpdateBeforeOrDelete() {
Review Comment:
fixed
--
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]