spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From icexelloss <...@git.apache.org>
Subject [GitHub] spark pull request #19872: [SPARK-22274][PYTHON][SQL] User-defined aggregati...
Date Wed, 17 Jan 2018 16:08:37 GMT
Github user icexelloss commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19872#discussion_r162097736
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/python/ExtractPythonUDFs.scala
---
    @@ -39,18 +38,20 @@ object ExtractPythonUDFFromAggregate extends Rule[LogicalPlan] {
        */
       private def belongAggregate(e: Expression, agg: Aggregate): Boolean = {
         e.isInstanceOf[AggregateExpression] ||
    +      PythonUDF.isGroupAggPandasUDF(e) ||
           agg.groupingExpressions.exists(_.semanticEquals(e))
       }
     
       private def hasPythonUdfOverAggregate(expr: Expression, agg: Aggregate): Boolean =
{
         expr.find {
    -      e => e.isInstanceOf[PythonUDF] && e.find(belongAggregate(_, agg)).isDefined
    +      e => PythonUDF.isScalarPythonUDF(e) && e.find(belongAggregate(_, agg)).isDefined
         }.isDefined
       }
     
       private def extract(agg: Aggregate): LogicalPlan = {
         val projList = new ArrayBuffer[NamedExpression]()
         val aggExpr = new ArrayBuffer[NamedExpression]()
    +
    --- End diff --
    
    Reverted


---

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


Mime
View raw message