uros-db commented on code in PR #56891:
URL: https://github.com/apache/spark/pull/56891#discussion_r3528838573
##########
sql/core/src/test/scala/org/apache/spark/sql/DataFrameAggregateSuite.scala:
##########
@@ -132,6 +132,17 @@ class DataFrameAggregateSuite extends SharedSparkSession
)
}
+ test("cube()/rollup() with no grouping columns return one grand-total row
over empty input") {
+ // With no grouping columns, cube()/rollup() lower to a global aggregate
(the grand total),
+ // which returns one row even over empty input -- like an aggregation with
no GROUP BY clause.
+ // This is the DataFrame-API surface for the empty CUBE/ROLLUP case (not
expressible in SQL).
+ checkAnswer(spark.range(0).cube().count(), Row(0L))
Review Comment:
Added to ClientE2ETestSuite (14544d66880); validated by Connect CI since
it's a RemoteSparkSession E2E test.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]