leonardBang commented on a change in pull request #14027:
URL: https://github.com/apache/flink/pull/14027#discussion_r521808438



##########
File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamExecJoin.scala
##########
@@ -57,6 +57,22 @@ class StreamExecJoin(
   with StreamPhysicalRel
   with StreamExecNode[RowData] {
 
+  /**
+   * This is mainly used in 
`FlinkChangelogModeInferenceProgram.SatisfyUpdateKindTraitVisitor`.
+   * If the unique key of input contains join key, then it can support 
ignoring UPDATE_BEFORE.
+   * Otherwise, it can't ignore UPDATE_BEFORE. For example, if the input 
schema is [id, name, cnt]
+   * with the unique key (id). The join key is (id, name), then an insert and 
update on the id:

Review comment:
       ``` 
      * with the unique key (id). The join key is (id, name), then an insert 
and update on the id:
   ```
   I think current logic is unique key contains join key rather than unique key 
is contained in join key,  may this is an existed bug
   
   `inputUniqueKeys.exists {
           uniqueKey => joinKeys.forall(uniqueKey.toArray.contains(_))
         }`
   
   ignore this comment..




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to