chris-twiner commented on code in PR #48479:
URL: https://github.com/apache/spark/pull/48479#discussion_r1932382328


##########
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:
   it shouldn't have a runtime issue as your original impl was base class => 
base class casting, in fact I'm not sure why the cast was there.  Most of the 
errors are compilation related. There are some "gaps" (per last comment of 
mine) with this.type and java.



-- 
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