dongjoon-hyun edited a comment on issue #27233: [SPARK-29701][SQL] Correct behaviours of group analytical queries when empty input given URL: https://github.com/apache/spark/pull/27233#issuecomment-577487224 @tgravescs . Yes, it does. However, this is correctly a SQL correctness issue. Technically, `PostgreSQL` is the only one implementing it according to the SQL standard. `SQL:1999` defines `()` as the grand total and the query is translated into the following roughly. ```sql ... (other clause) UNION ALL SELECT CAST(NULL AS DTPC1) AS CNPC1, CAST(NULL AS DTPC2) AS CNPC2, ... # `grand total` FROM ... ``` The test case in this PR description is used in PostgreSQL from the beginning of its `Support GROUPING SETS, CUBE and ROLLUP` commit (May 15, 2015) - https://github.com/postgres/postgres/commit/f3d3118532175541a9a96ed78881a3b04a057128#diff-3472ecc50256022c66e79b1aad4075d2R78
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org