pratham76 commented on PR #58656:
URL: https://github.com/apache/spark/pull/58656#issuecomment-7076548810
@cloud-fan Rebased onto master again. One interaction needed a fix beyond
the textual conflicts: SPARK-61927 now keeps the throwable conjuncts written
last in a `Filter` above the joins the subqueries are rewritten to. That
`Filter` wraps the anti join of the `NOT IN` arm, just as a later subquery
conjunct does, so the top-down pass reaches it in the `case j: Join` arm.
Without accounting for it, the in-place residual policy from the last round
would keep a truth-only nested `NOT IN` that the join-condition rewrite then
rewrites positively, dropping rows. The `NOT IN` arm now treats its anti join
as wrapped when a later subquery conjunct follows or any conjunct stays up
(`wrappedLater = i < lastConjunct || stayUp.nonEmpty`), with the arm comment
updated to match.
The new case in the `NOT IN` residual test uses a trailing `IF(a > 100,
raise_error('unreachable'), true)` conjunct. It checks that the `Filter` sits
above the anti join and asserts the standard answer under each join-condition
setting. Without the `stayUp` condition it returns `2, 3` instead of `1, 2, 3`.
The commit SHAs changed with the rebase again; the description is updated.
PTAL, thanks!
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]