xuyangzhong commented on code in PR #25892:
URL: https://github.com/apache/flink/pull/25892#discussion_r1922021917


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/factories/TestValuesRuntimeFunctions.java:
##########
@@ -518,13 +518,17 @@ public void initializeState(FunctionInitializationContext 
context) throws Except
                         .flatMap(List::stream)
                         .forEach(
                                 row -> {
-                                    boolean isDelete = row.getKind() == 
RowKind.DELETE;
+                                    boolean isDelete =
+                                            row.getKind() == RowKind.DELETE
+                                                    || row.getKind() == 
RowKind.UPDATE_BEFORE;

Review Comment:
   Actually it may happen. Because although this upsert sink 'tells' the 
optimizer that it can receive upsert message, sometimes optimizer will ignore 
its expected upsert mode and send it retract message. You can see more in 
FlinkChangelogModeInferenceProgram#inferSinkRequiredTraits



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