amaliujia commented on code in PR #38917: URL: https://github.com/apache/spark/pull/38917#discussion_r1040422665
########## sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala: ########## @@ -1134,6 +1134,11 @@ class DataFrameSuite extends QueryTest checkAnswer(approxSummaryDF, approxSummaryResult) } + test("SPARK-41391: Correct the output column name of groupBy.agg(count_distinct)") { + val df = person.groupBy("id").agg(count_distinct(col("name"))) + assert(df.columns === Array("id", "count(DISTINCT name)")) Review Comment: nit: does it make sense to compare with columns from the SQL example? -- 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