tomsisso commented on code in PR #49190:
URL: https://github.com/apache/spark/pull/49190#discussion_r1886237168


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/udaf.scala:
##########
@@ -519,6 +519,7 @@ case class ScalaAggregator[IN, BUF, OUT](
   def withNewInputAggBufferOffset(newInputAggBufferOffset: Int): 
ScalaAggregator[IN, BUF, OUT] =
     copy(inputAggBufferOffset = newInputAggBufferOffset)
 
+  @transient
   private[this] lazy val inputProjection = UnsafeProjection.create(children)

Review Comment:
   thanks for looking. lazy vals are not a problem in general if they are 
serializable, the problem is that this inputProjection field holds an instance 
of GeneratedClass$SpecificUnsafeProjection, which is not serializable and fails 
the serialization of AggregatingAccumulator used by observe 
(AggregatingAccumulator -> typedImperatives -> ScalaAggregator -> 
inputProjection).
   



##########
sql/core/src/test/scala/org/apache/spark/sql/util/DataFrameCallbackSuite.scala:
##########
@@ -18,18 +18,17 @@
 package org.apache.spark.sql.util
 
 import java.lang.{Long => JLong}
-
 import scala.collection.mutable.ArrayBuffer
-

Review Comment:
   reverted, thanks



-- 
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]

Reply via email to