You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2023/08/16 03:38:45 UTC

[GitHub] [spark] LuciferYang commented on a diff in pull request #42508: [SPARK-44795][CONNECT][TESTS][FOLLOWUP] Fix test case `REPL class in UDF` for Scala 2.13

LuciferYang commented on code in PR #42508:
URL: https://github.com/apache/spark/pull/42508#discussion_r1295345327


##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/application/ReplE2ESuite.scala:
##########
@@ -283,10 +283,14 @@ class ReplE2ESuite extends RemoteSparkSession with BeforeAndAfterEach {
   test("REPL class in UDF") {
     val input = """
         |case class MyTestClass(value: Int)
-        |spark.range(2).map(i => MyTestClass(i.toInt)).collect()
+        |spark.range(2).
+        |  map(i => MyTestClass(i.toInt)).
+        |  collect().
+        |  map(mtc => s"MyTestClass(${mtc.value})").
+        |  mkString("[", ", ", "]")
       """.stripMargin
     val output = runCommandsInShell(input)
-    assertContains("Array[MyTestClass] = Array(MyTestClass(0), MyTestClass(1))", output)
+    assertContains("""String = "[MyTestClass(0), MyTestClass(1)]"""", output)

Review Comment:
   cc @hvanhovell similar as https://github.com/apache/spark/pull/42485, `REPL class in UDF` also need fix for Scala 2.13 ...



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org