Github user viirya commented on the issue:
https://github.com/apache/spark/pull/17874
`select a from t where b > 0` works. However, it can be seen logically as:
Project [a]
Filter [b > 0]
Relation t [a, b]
It seems to me Spark also parses the above SQL query like this way.
There is an order of evaluation in SQL systems. E.g, MySQL:
select a from test where b > 2; // works. where is evaluated before
select
select a from test having b > 2; // not works. having is evaluated
after select
`df.select("y").where("x=1")` sematically asks a projection of just `y`
attribute before filtering. It seems to me that it is different with the SQL
query.
---
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]