hvanhovell commented on code in PR #47839:
URL: https://github.com/apache/spark/pull/47839#discussion_r1726150923


##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/UserDefinedFunctionE2ETestSuite.scala:
##########
@@ -380,23 +387,23 @@ class UserDefinedFunctionE2ETestSuite extends QueryTest 
with RemoteSparkSession
   }
 
   test("UDAF custom Aggregator - toColumn") {
-    val session: SparkSession = spark
-    import session.implicits._
+    val encoder = Encoders.product[UdafTestInput]
     val aggCol = new CompleteUdafTestInputAggregator().toColumn
-    val ds = spark.range(10).withColumn("extra", col("id") * 
2).as[UdafTestInput]
-
+    val ds = spark.range(10).withColumn("extra", col("id") * 2).as(encoder)
     assert(ds.select(aggCol).head() == 135) // 45 + 90
-    assert(ds.agg(aggCol).head().getLong(0) == 135) // 45 + 90

Review Comment:
   This does not work in classic either :)... So removing it. I have added a 
test case below to high light what is supposed to work. cc @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]

Reply via email to