LuciferYang commented on code in PR #42968: URL: https://github.com/apache/spark/pull/42968#discussion_r1328213649
########## python/pyspark/sql/functions.py: ########## @@ -3765,12 +3765,12 @@ def collect_set(col: "ColumnOrName") -> Column: Example 1: Collect values from a single column DataFrame >>> from pyspark.sql import functions as sf - >>> df = spark.createDataFrame([(2,), (5,), (5,)], ('age',)) + >>> df = spark.createDataFrame([(5,), (5,), (5,)], ('age',)) >>> df.select(sf.collect_set('age')).show() +----------------+ |collect_set(age)| +----------------+ - | [5, 2]| + | [5]| Review Comment: Sorry, this doctest produced different results when using Scala 2.12 and Scala 2.13. When using Scala 2.12, this test case prints `[5, 2]`, but when using Scala 2.13, this test case prints `[2, 5]`. Skip or simplify it? Which one do you think is better? @zhengruifeng @HyukjinKwon https://github.com/apache/spark/actions/runs/6209111340/job/16856005714 ``` ********************************************************************** File "/__w/spark/spark/python/pyspark/sql/connect/functions.py", line 1030, in pyspark.sql.connect.functions.collect_set Failed example: df.select(sf.collect_set('age')).show() Expected: +----------------+ |collect_set(age)| +----------------+ | [5, 2]| +----------------+ Got: +----------------+ |collect_set(age)| +----------------+ | [2, 5]| +----------------+ <BLANKLINE> ********************************************************************** 1 of 9 in pyspark.sql.connect.functions.collect_set ***Test Failed*** 1 failures. Had test failures in pyspark.sql.connect.functions with python3.9; see logs. Error: running /__w/spark/spark/python/run-tests --modules=pyspark-connect --parallelism=1 ; received return code 255 Error: Process completed with exit code 19. ``` -- 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