Github user viirya commented on the issue:
https://github.com/apache/spark/pull/18652
@baibaichen Thanks for providing the info.
In the case of Filter, actually rand is already with initial seed in each
worker. I'm not sure if this is the reason preventing us from doing this.
The main concern I have for now, is multiple non-deterministic joining
conditions (not joining keys). Pushing down multiple non-deterministic joining
conditions changes the number of calls of the expressions. That is the example
you showed: there are `rand(c.site_categ_skid) < 0.5` and `rand(a.pltfm_id)
>=0.5`. If no push down, you may only call the first rand and skip the second
one. With push down, you call both rands for each rows in two tables.
The less concern for me, is non-deterministic joining keys. Under current
SparkSQL join implementations, joining keys are evaluated exactly once on rows
in two joining tables, so we won't change the number of calls of the
expressions. IIUC, it is safer to push down non-deterministic joining keys.
Please correct me if I'm wrong in this part.
> Since the result highly depends on internal execution engine, there is no
standard behavior.
I'd tend to agree with that based on the thoughts on this recently. So for
now my proposal is to:
1. Support non-deterministic joining keys pushdown.
2. Add a config to control it. Default is disable.
3. Not support non-deterministic joining conditions pushdown for now.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]