xuyangzhong commented on code in PR #27111:
URL: https://github.com/apache/flink/pull/27111#discussion_r2454418651
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/utils/DeltaJoinUtil.java:
##########
@@ -240,7 +248,28 @@ private static List<List<String>>
getAllIndexesColumnsOfTable(
private static boolean areJoinConditionsSupported(StreamPhysicalJoin join)
{
JoinInfo joinInfo = join.analyzeCondition();
// there must be one pair of join key
- return !joinInfo.pairs().isEmpty();
+ if (joinInfo.pairs().isEmpty()) {
+ return false;
+ }
+
+ // if this join output cdc records, the non-equiv condition must be
applied on upsert key
Review Comment:
The reason I did not reuse the logic of `isNonUpsertKeyCondition` from
`FlinkChangelogModeInferenceProgram` is that it only considers a single upsert
key (as seen in [this
line](https://github.com/apache/flink/blob/64ce0c283633fed3715558d59d9de9e411289718/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/optimize/program/FlinkChangelogModeInferenceProgram.scala#L1478)).
In this case, any set of upsert keys can be applicable.
--
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]