spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viirya <...@git.apache.org>
Subject [GitHub] spark issue #17874: [SPARK-20612][SQL] Throw exception when there is unresol...
Date Mon, 08 May 2017 03:52:30 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message