LuciferYang commented on code in PR #46849:
URL: https://github.com/apache/spark/pull/46849#discussion_r1680369394
##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/UserDefinedFunctionE2ETestSuite.scala:
##########
@@ -388,6 +378,66 @@ class UserDefinedFunctionE2ETestSuite extends QueryTest
with RemoteSparkSession
.head()
assert(result == 135) // 45 + 90
}
+
+ test("UDAF custom Aggregator - toColumn") {
+ val session: SparkSession = spark
+ import session.implicits._
+ val aggCol = new CompleteUdafTestInputAggregator().toColumn
+ val ds = spark.range(10).withColumn("extra", col("id") *
2).as[UdafTestInput]
+
+ assert(ds.select(aggCol).head() == 135) // 45 + 90
+ assert(ds.agg(aggCol).head().getLong(0) == 135) // 45 + 90
+ }
+
+ test("UDAF custom Aggregator - multiple extends - toColumn") {
Review Comment:
https://github.com/apache/spark/actions/runs/9957362132/job/27509200696

Both tests 'UDAF custom Aggregator - toColumn' and 'UDAF custom Aggregator -
multiple extends - toColumn' failed during Maven daily testing. Do you have
time to fix them? @xupefei
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]