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

    https://github.com/apache/spark/pull/20531#discussion_r166654101
  
    --- 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 --
    
    Btw, we can have this to be a follow up and I can do it too


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to