zhengruifeng commented on code in PR #38914:
URL: https://github.com/apache/spark/pull/38914#discussion_r1041728393


##########
python/pyspark/sql/tests/connect/test_connect_function.py:
##########
@@ -413,6 +412,22 @@ def test_aggregation_functions(self):
             sdf.groupBy("a").agg(SF.percentile_approx(sdf.b, [0.1, 
0.9])).toPandas(),
         )
 
+        # test count_distinct
+        self.assert_eq(
+            cdf.select(CF.count_distinct("b"), 
CF.count_distinct(cdf.c)).toPandas(),
+            sdf.select(SF.count_distinct("b"), 
SF.count_distinct(sdf.c)).toPandas(),
+        )
+        # The output column names of 'groupBy.agg(count_distinct)' in PySpark

Review Comment:
   this incorrect column name seems not easy to fix, since it should not be 
related to this PR, I change the column names and compare the values here.



-- 
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-unsubscr...@spark.apache.org

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


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

Reply via email to