dongjoon-hyun commented on PR #60764: URL: https://github.com/apache/spark/pull/60764#issuecomment-7083509102
Thank you for the careful measurements and for offering your checks, @sarutak. I went with a third option: this PR now keeps conjuncts in place only in a filter for which master builds a domain join anyway, i.e. one with a correlated conjunct that can not be pulled up over the `Aggregate`, one with an outer column that a parent reads, or one under a set operation. So it never adds a computation of the outer query that master does not have, and it does not need checks on the outer input or to wait for #60296. The filter in the as-of join rewrite has the as-of condition, which can not be pulled up, so it is still covered. The filters whose correlated conjuncts are all equalities, as in your probes, are left as on master and named in the TODO, so they can use the checks of #60296 in a separate change once it lands. I updated the description and the tests. While testing, I found that a correlated equality in the `ON` clause of an inner join below a filter with a non-equality correlation fails on master with `INTERNAL_ERROR: Cannot generate code for expression: outer(t)`, e.g. `SELECT * FROM t1 WHERE (SELECT max(g) FROM t2 JOIN t3 ON t2.k = t1.k AND g = gg WHERE t2.t <= t1.t) IS NOT NULL`, because the `Join` case drops the outer references that its parent needs when neither side is correlated. It is not related to this PR, and I'll file a new JIRA issue for it. -- 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]
