juliuszsompolski commented on code in PR #57323:
URL: https://github.com/apache/spark/pull/57323#discussion_r3625242420


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/AggregatingAccumulator.scala:
##########
@@ -299,4 +314,57 @@ object AggregatingAccumulator {
       typedImperatives.toArray,
       SQLConf.get)
   }
+
+  /**
+   * Create an aggregating accumulator for the given functions and input 
schema.
+   */
+  def apply(functions: Seq[Expression], inputAttributes: Seq[Attribute]): 
AggregatingAccumulator = {
+    val c = buildAccumulatorArgs(functions, inputAttributes)
+    new AggregatingAccumulator(
+      c.bufferSchema,
+      c.initialValues,
+      c.updateExpressions,
+      c.mergeExpressions,
+      c.resultExpressions,
+      c.imperatives,
+      c.typedImperatives,
+      c.conf)
+  }
+
+  def apply(

Review Comment:
   nit: add scaladoc to remaining added functions, noting which ones also 
register the returned acc.



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