cloud-fan commented on a change in pull request #25024: [SPARK-27296][SQL] User 
Defined Aggregators that do not ser/de on each input row
URL: https://github.com/apache/spark/pull/25024#discussion_r307820547
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/expressions/udaf.scala
 ##########
 @@ -165,3 +165,140 @@ abstract class MutableAggregationBuffer extends Row {
   /** Update the ith value of this buffer. */
   def update(i: Int, value: Any): Unit
 }
+
+/**
+ * The base class for implementing user-defined imperative aggregator (UDIA).
+ *
+ * @tparam A the aggregating type: implements the aggregation logic.
+ *
+ * @since 3.0.0
+ */
+@Experimental
+abstract class UserDefinedImperativeAggregator[A] extends Serializable {
 
 Review comment:
   DataFrame is `Dataset[Row]`, so `Aggregator[Row, BUF, OUT]` can operate on 
DataFrame AFAIK.
   
   It seems we can also add a new registering API that can register an 
`Aggregator[Row, BUF, OUT]` as an UDAF and call it in SQL/PySpark.
   
   cc @viirya to confirm.

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

Reply via email to