You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/01/05 04:37:49 UTC

[GitHub] [spark] AngersZhuuuu commented on pull request #29087: [SPARK-28227][SQL] Support TRANSFORM with aggregation/window/lateralView

AngersZhuuuu commented on pull request #29087:
URL: https://github.com/apache/spark/pull/29087#issuecomment-754389257


   @maropu All comment done, But I find with
   `SET spark.sql.legacy.parser.havingWithoutGroupByAsWhere=true;`
    `SELECT 1 FROM range(10) HAVING true`  will failed with 
   ```
   -- !query
   SELECT 1 FROM range(10) HAVING true
   -- !query schema
   struct<>
   -- !query output
   org.apache.spark.sql.AnalysisException
   unresolved operator 'UnresolvedHaving cast(true as boolean)
   ```
   Seem not same with the migration guide 
   ```
     - In Spark version 2.3 and earlier, HAVING without GROUP BY is treated as WHERE. This means, `SELECT 1 FROM range(10) HAVING true` is executed as `SELECT 1 FROM range(10) WHERE true`  and returns 10 rows. This violates SQL standard, and has been fixed in Spark 2.4. Since Spark 2.4, HAVING without GROUP BY is treated as a global aggregate, which means `SELECT 1 FROM range(10) HAVING true` will return only one row. To restore the previous behavior, set `spark.sql.legacy.parser.havingWithoutGroupByAsWhere` to `true`.
   ```
   And I did't see any UT about this feature. any thing wrong? Should I fix this problem with a new jira ticket?
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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