You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by HyukjinKwon <gi...@git.apache.org> on 2018/06/06 07:48:26 UTC

[GitHub] spark pull request #21082: [SPARK-22239][SQL][Python] Enable grouped aggrega...

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

    https://github.com/apache/spark/pull/21082#discussion_r193320743
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/PythonUDF.scala ---
    @@ -34,7 +34,12 @@ object PythonUDF {
         e.isInstanceOf[PythonUDF] && SCALAR_TYPES.contains(e.asInstanceOf[PythonUDF].evalType)
       }
     
    -  def isGroupAggPandasUDF(e: Expression): Boolean = {
    +  def isGroupedAggPandasUDF(e: Expression): Boolean = {
    +    e.isInstanceOf[PythonUDF] &&
    +      e.asInstanceOf[PythonUDF].evalType == PythonEvalType.SQL_GROUPED_AGG_PANDAS_UDF
    +  }
    +
    +  def isWindowPandasUDF(e: Expression): Boolean = {
    --- End diff --
    
    @icexelloss, can we maybe do:
    
    ```
    def isWindowPandasUDF(e: Expression): = isGroupedAggPandasUDF(e)
    ```
    
    and explain why they can be same ..


---

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