[
https://issues.apache.org/jira/browse/FLINK-40915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18130158#comment-18130158
]
ChenZhuo commented on FLINK-40915:
----------------------------------
Hi, I would like to work on this issue. Could a committer please assign it to
me (JIRA username: chenzhuo)?
Following the clarification above, I plan to exempt LATERAL SNAPSHOT joins from
the generic non-deterministic join-condition check for the non-equi condition,
while preserving the existing whole-row determinism requirement for an updating
build side. I will add regression tests for an updating build side and LEFT
LATERAL SNAPSHOT joins, and verify that regular joins still reject unsafe
non-deterministic conditions.
Please let me know if anyone is already working on this or if the scope should
be adjusted. Thanks!
> Relax non-deterministic join-condition check for LATERAL SNAPSHOT join
> ----------------------------------------------------------------------
>
> Key: FLINK-40915
> URL: https://issues.apache.org/jira/browse/FLINK-40915
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / Planner
> Reporter: Fabian Hueske
> Priority: Major
>
> In `StreamNonDeterministicUpdatePlanVisitor.visitJoin`, the generic join
> handling rejects a non-deterministic join condition whenever the join output
> may carry updates (build side updates) or for LEFT joins. The LATERAL
> SNAPSHOT join (LSJ) currently goes through this generic check, but it is
> stricter than necessary for LSJ: the LSJ output is append-only, and the join
> condition is evaluated only once per probe row at join time. It is never
> re-evaluated when build rows are retracted (build retractions match the
> operator's internal whole-row-keyed multiset by row equality), so a
> non-deterministic condition cannot cause the retraction-matching corruption
> the check guards against. As a result, valid LSJ queries with a
> non-deterministic join condition (e.g. an updating build side, or a LEFT LSJ
> even with insert-only inputs) are rejected unnecessarily under TRY_RESOLVE.
> Proposed change:
> * exclude StreamPhysicalLateralSnapshotJoin from the
> non-deterministic-condition check in visitJoin.
> * Add tests covering a non-deterministic join condition with an updating
> build side and a LEFT LSJ variant, and confirm regular-join behavior is
> unchanged (NonDeterministicDagTest).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)