bvarghese1 commented on code in PR #26230:
URL: https://github.com/apache/flink/pull/26230#discussion_r1978608886
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/optimize/program/FlinkChangelogModeInferenceProgram.scala:
##########
@@ -287,6 +287,39 @@ class FlinkChangelogModeInferenceProgram extends
FlinkOptimizeProgram[StreamOpti
val leftTrait =
children.head.getTraitSet.getTrait(ModifyKindSetTraitDef.INSTANCE)
createNewNode(temporalJoin, children, leftTrait, requiredTrait,
requester)
+ case intervalJoin: StreamPhysicalIntervalJoin =>
+ // IntervalJoin only support consuming insert-only and producing
insert-only changes
+ // However, when the input contains updates convert to RegularJoin
+ val children = visitChildren(rel, ModifyKindSetTrait.ALL_CHANGES)
+ val inputModifyKindSet =
ModifyKindSet.union(children.map(getModifyKindSet): _*)
+ val containsUpdatesOrDeletes = inputModifyKindSet.contains(
+ ModifyKind.UPDATE) || inputModifyKindSet.contains(ModifyKind.DELETE)
+ if (containsUpdatesOrDeletes) {
+ // Convert to regular join if the input contains Updates
+ val isInnerJoin = intervalJoin.joinSpec.getJoinType ==
FlinkJoinType.INNER
Review Comment:
This is the same as the RegularJoin condition
RegularJoin has conditions for INNER and SEMI. However, IntervalJoin doesn't
support SEMI
Ref:
https://github.com/apache/flink/pull/26230/files#diff-ddf95eb3949ab889e8e3bccdacb9f57553aac06657574fd6316ca17dd48321a1R262
--
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]