cloud-fan commented on a change in pull request #24144: [SPARK-24935][SQL] fix 
Hive UDAF with two aggregation buffers
URL: https://github.com/apache/spark/pull/24144#discussion_r267295076
 
 

 ##########
 File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUDFs.scala
 ##########
 @@ -352,29 +352,21 @@ private[hive] case class HiveUDAFFunction(
     HiveEvaluator(evaluator, 
evaluator.init(GenericUDAFEvaluator.Mode.PARTIAL1, inputInspectors))
   }
 
-  // The UDAF evaluator used to merge partial aggregation results.
+  // The UDAF evaluator used to consume partial aggregation results and 
produce final results.
+  // Hive `ObjectInspector` used to inspect final results.
   @transient
-  private lazy val partial2ModeEvaluator = {
 
 Review comment:
   We don't need a partial2 evaluator and a final evaluator. We just need one 
final evaluator.
   
   The partial2 evaluator consumes agg buffer and produces agg buffer, while 
the final evaluator consumers agg buffer and produce final result. That said, 
the final evaluator can execute `merge`, and we don't need the partial2 
evaluator.

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