hvanhovell commented on code in PR #48479:
URL: https://github.com/apache/spark/pull/48479#discussion_r1932298841
##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/ClientDataFrameStatSuite.scala:
##########
@@ -264,4 +264,13 @@ class ClientDataFrameStatSuite extends ConnectFunSuite
with RemoteSparkSession {
}
assert(error3.getCondition === "DATATYPE_MISMATCH.VALUE_OUT_OF_RANGE")
}
+
+ test("SPARK-49961: transform type should be consistent") {
+ val session = spark
+ import session.implicits._
+ val ds = Seq(1, 2).toDS()
+ val f: Dataset[Int] => Dataset[Int] = d => d.selectExpr("(value + 1)
value").as[Int]
+ val transformed = ds.transform(f)
+ assert(transformed.collect().sorted === Array(2, 3))
Review Comment:
This would normally fail with a ClassCastException right?
--
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]