MaxGekk commented on a change in pull request #34474:
URL: https://github.com/apache/spark/pull/34474#discussion_r741980466



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproximatePercentile.scala
##########
@@ -226,7 +226,7 @@ object ApproximatePercentile {
    *
    * @param summaries underlying probabilistic data structure 
[[QuantileSummaries]].
    */
-  class PercentileDigest(private var summaries: QuantileSummaries) {
+  class PercentileDigest(private var summaries: QuantileSummaries) extends 
Serializable {

Review comment:
       hmm, there are special methods for (de-)serialization of 
`PercentileDigest`:
   
https://github.com/apache/spark/blob/08123a3795683238352e5bf55452de381349fdd9/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproximatePercentile.scala#L212-L218
   Do you know why the methods are used instead of extending of `Serializable`?
   
   cc @cloud-fan 

##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproximatePercentile.scala
##########
@@ -226,7 +226,7 @@ object ApproximatePercentile {
    *
    * @param summaries underlying probabilistic data structure 
[[QuantileSummaries]].
    */
-  class PercentileDigest(private var summaries: QuantileSummaries) {
+  class PercentileDigest(private var summaries: QuantileSummaries) extends 
Serializable {

Review comment:
       hmm, there are special methods for (de-)serialization of 
`PercentileDigest`:
   
https://github.com/apache/spark/blob/08123a3795683238352e5bf55452de381349fdd9/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproximatePercentile.scala#L212-L218
   Do you know why the methods are used instead of extending of `Serializable`?
   
   cc @cloud-fan 




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