Github user cloud-fan commented on the pull request:

    https://github.com/apache/spark/pull/12342#issuecomment-209209559
  
    My general thoughts about filter push down: If the filter's condition is 
non-deterministic, we shouldn't push it down through some operators that will 
change the number or order of the input rows, e.g. set operations, others 
should be ok, e.g. the following optimization is allowed:
    ```
    // From:
    df.select('a, 'b).filter('c > rand(42))
    // To:
    df.filter('c > rand(42)).select('a, 'b)
    ```
    If the underlying operator contains non-deterministic expression, filter 
push down is not allowed. Currently only 4 operator may contain 
non-deterministic expression: Project, Filter, Aggregate, Window


---
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]

Reply via email to