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

    https://github.com/apache/spark/pull/20531#discussion_r167391819
  
    --- Diff: python/pyspark/sql/tests.py ---
    @@ -4509,23 +4523,32 @@ def weighted_mean(v, w):
             return weighted_mean
     
         def test_manual(self):
    +        from pyspark.sql.functions import pandas_udf, array
    +
             df = self.data
             sum_udf = self.pandas_agg_sum_udf
             mean_udf = self.pandas_agg_mean_udf
    -
    -        result1 = df.groupby('id').agg(sum_udf(df.v), 
mean_udf(df.v)).sort('id')
    +        mean_arr_udf = pandas_udf(
    +            self.pandas_agg_mean_udf.func,
    --- End diff --
    
    Hm .. let's do it separately for type coercion stuff in another issue. I 
think we need another iteration for it.


---

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

Reply via email to