dongjoon-hyun commented on PR #60711: URL: https://github.com/apache/spark/pull/60711#issuecomment-7044172712
Thank you, @LuciferYang, for the two rounds of careful review with concrete repros. Each of them found a form that the fix missed, and they made it much better. To summarize the current version (f4f259395ef, rebased onto master after SPARK-62091): - `ExtractFiltersAndInnerJoins` no longer flattens a join or filter below the top one whose condition has a throwable or non-deterministic conjunct, so it is joined as one plan, with its condition, and the joins above it are still reordered. Comma joins over such a join or filter plan hash joins again, as on master. - `ReorderJoin` does not reorder the joins when the top join has such a condition, so `CombineFilters` can not merge a `WHERE` clause above it, e.g. one with a correlated scalar subquery, after that condition. Putting the kept conditions into the condition of the top join instead would make an equality that can fail, such as `CAST(t1.s AS INT) = t2.g`, a join key that is evaluated before the throwable condition. - When the top filter has such a condition, the `Filter` above the joins takes its place, as before, so the SPARK-61930 tests pass with the same plans. The queries from your reviews and the earlier spark-test review return the rows that the joins as written produce in ANSI mode, with whole-stage codegen on and off and in interpreted mode. The catalyst optimizer suites, `JoinSuite` and the plan stability suites pass locally without golden file changes. -- 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]
