ajithme commented on a change in pull request #24762: [SPARK-27907][SQL]
HiveUDAF with 0 rows throw NPE when try to serialize
URL: https://github.com/apache/spark/pull/24762#discussion_r289523376
##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUDFs.scala
##########
@@ -474,7 +474,10 @@ private[hive] case class HiveUDAFFunction(
override def serialize(buffer: HiveUDAFBuffer): Array[Byte] = {
// Serializes an `AggregationBuffer` that holds partial aggregation
results so that we can
// shuffle it for global aggregation later.
- aggBufferSerDe.serialize(buffer.buf)
+ aggBufferSerDe.serialize(Option(buffer) match {
Review comment:
Done
----------------------------------------------------------------
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]