cloud-fan commented on a change in pull request #30144: URL: https://github.com/apache/spark/pull/30144#discussion_r515765822
########## File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala ########## @@ -3691,6 +3691,32 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark checkAnswer(sql("SELECT id FROM t WHERE (SELECT true)"), Row(0L)) } } + + test("SPARK-33229: Support GROUP BY use Separate columns and CUBE/ROLLUP") { + withTable("t") { + sql("CREATE TABLE t USING PARQUET AS SELECT id AS a, id AS b, id AS c FROM range(1)") + checkAnswer(sql("SELECT a, b, c, count(*) FROM t GROUP BY CUBE(a, b, c)"), + Row(0, 0, 0, 1) :: Row(0, 0, null, 1) :: + Row(0, null, 0, 1) :: Row(0, null, null, 1) :: + Row(null, 0, 0, 1) :: Row(null, 0, null, 1) :: + Row(null, null, 0, 1) :: Row(null, null, null, 1) :: Nil) + checkAnswer(sql("SELECT a, b, c, count(*) FROM t GROUP BY a, CUBE(b, c)"), Review comment: what's the semantic of it? ---------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org