[
https://issues.apache.org/jira/browse/FLINK-23305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17377296#comment-17377296
]
JING ZHANG commented on FLINK-23305:
------------------------------------
[~twalthr]
Semantically the query is right.
Now only regular join operator and window join operator support semi/anti,
while other operators (interval join, temporal join, lookup join) does not
support yet.
So `StreamPhysicalIntervalJoinRule` and `StreamPhysicalTemporalJoinRule`
exclude semi/anti join type in matches method, so they would fallback to
regular join.
It is weird for `StreamPhysicalLookupJoinRule` because it does not exclude
semi/anti join type, but a `TableException` would be thrown out when try to
translate `LookupJoin` to `Transformation`.
*I agree with you to support semi/anti interval joins. BTW, it would be great
if we could support semi/anti for interval join, temporal join, lookup join.*
> Support semi/anti interval joins
> --------------------------------
>
> Key: FLINK-23305
> URL: https://issues.apache.org/jira/browse/FLINK-23305
> Project: Flink
> Issue Type: New Feature
> Components: Table SQL / Planner
> Reporter: Timo Walther
> Priority: Major
>
> I don't see a reason why we shouldn't support interval joins also for
> semi/anti joins like:
> {code}
> SELECT *
> FROM OT
> WHERE EXISTS (
> SELECT *
> FROM TT
> WHERE TT.tx = OT.tx AND
> TT.isEnd = TRUE AND
> TT.rowtime BETWEEN OT.rowtime AND OT.rowtime + INTERVAL '1' HOUR)
> {code}
> The resulting plan contains a join operation anyway but without detecting the
> interval.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)