cloud-fan commented on a change in pull request #24149: [SPARK-27207][SQL] :
Ensure aggregate buffers are initialized again for So…
URL: https://github.com/apache/spark/pull/24149#discussion_r281723417
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/TypedImperativeAggregateSuite.scala
##########
@@ -210,6 +211,14 @@ class TypedImperativeAggregateSuite extends QueryTest
with SharedSQLContext {
checkAnswer(query, expected)
}
+ test("SPARK-27207: Ensure aggregate buffers are initialized again for
SortBasedAggregate") {
+ withSQLConf("spark.sql.objectHashAggregate.sortBased.fallbackThreshold" ->
"5") {
+ val df = data.toDF("value", "key").coalesce(2)
+ val query = df.groupBy($"key").agg(typedMax2($"value"), count($"value"),
typedMax2($"value"))
+ query.show(10, false)
Review comment:
nit: we should not use `show` in the test. Let's use `checkAnswer`.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]