uros-b commented on code in PR #57375:
URL: https://github.com/apache/spark/pull/57375#discussion_r3621586837
##########
sql/core/src/test/scala/org/apache/spark/sql/ApproxTopKSuite.scala:
##########
@@ -575,6 +578,20 @@ class ApproxTopKSuite extends SharedSparkSession {
"CAST('13:00:00.123' AS TIME(3))"))
)
+ test("SPARK-58069: serialize an empty approx_top_k_combine buffer") {
Review Comment:
The new regression test is a pure in-JVM round-trip of
serialize()/deserialize(); it never drives the reported failure through a real
SQL query with a shuffle-forced empty partition (e.g. a REPARTITION or UNION of
empty + non-empty approx_top_k_accumulate). It also exercises only the concrete
maxItemsTracked = 100 variant, not the VOID_MAX_ITEMS_TRACKED = -1 placeholder
that the size-unspecified production path (createAggregationBuffer) actually
creates. An end-to-end SQL test (and a VOID variant) would faithfully guard the
failure this PR claims to fix.
--
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]