You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/11/30 03:40:49 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #38841: [SPARK-41325] [CONNECT] Fix missing avg() for GroupBy on DF

cloud-fan commented on code in PR #38841:
URL: https://github.com/apache/spark/pull/38841#discussion_r1035498320


##########
python/pyspark/sql/tests/connect/test_connect_basic.py:
##########
@@ -722,6 +722,19 @@ def test_write_operations(self):
         ndf = self.connect.read.table("parquet_test")
         self.assertEqual(set(df.collect()), set(ndf.collect()))
 
+    def test_agg_with_avg(self):
+        """SPARK-41325: groupby.avg()"""
+        df = (
+            self.connect.range(10)
+            .groupBy((col("id") % lit(2)).alias("moded"))

Review Comment:
   DataFrame API creates resolved `Alias` as well. I'm not sure why `UnresolvedAlias(Alias...)` is a problem.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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