xupefei commented on code in PR #49111: URL: https://github.com/apache/spark/pull/49111#discussion_r1918712274
########## connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/KeyValueGroupedDatasetE2ETestSuite.scala: ########## @@ -454,12 +455,43 @@ class KeyValueGroupedDatasetE2ETestSuite extends QueryTest with RemoteSparkSessi test("reduceGroups") { val ds = Seq("abc", "xyz", "hello").toDS() + val ddd = ds.groupByKey(_.length).reduceGroups(_ + _) checkDatasetUnorderly( ds.groupByKey(_.length).reduceGroups(_ + _), (3, "abcxyz"), (5, "hello")) } + object IntSumAgg extends Aggregator[Int, Int, Int] { + def zero: Int = 0 + def reduce(b: Int, a: Int): Int = b + a + def merge(b1: Int, b2: Int): Int = b1 + b2 + def finish(reduction: Int): Int = reduction + def bufferEncoder: Encoder[Int] = Encoders.scalaInt + def outputEncoder: Encoder[Int] = Encoders.scalaInt + } + + test("agg with mapValues") { Review Comment: I added more. It's enough now. -- 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