Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21650#discussion_r205865029
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/python/ExtractPythonUDFs.scala
 ---
    @@ -94,36 +95,61 @@ object ExtractPythonUDFFromAggregate extends 
Rule[LogicalPlan] {
      */
     object ExtractPythonUDFs extends Rule[SparkPlan] with PredicateHelper {
     
    -  private def hasPythonUDF(e: Expression): Boolean = {
    +  private case class EvalTypeHolder(private var evalType: Int = -1) {
    --- End diff --
    
    yup. I do avoid nested functions but I found here is where is's needed. If 
it's clear when it's set and unset within a function, I think the shorter one 
is fine.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to