hvanhovell commented on code in PR #42485:
URL: https://github.com/apache/spark/pull/42485#discussion_r1294100654
##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/application/ReplE2ESuite.scala:
##########
@@ -274,6 +274,11 @@ class ReplE2ESuite extends RemoteSparkSession with
BeforeAndAfterEach {
| collect()
""".stripMargin
val output = runCommandsInShell(input)
- assertContains("Array[MyTestClass] = Array(MyTestClass(1),
MyTestClass(3))", output)
+ // SPARK-44791: The result printed by Scala 2.13 is
+ // `Array[MyTestClass] = Array(MyTestClass(value = 1), MyTestClass(value =
3))`,
+ // remove all `value =` from output to keep it the same as the result of
Scala 2.12.
+ assertContains(
+ "Array[MyTestClass] = Array(MyTestClass(1), MyTestClass(3))",
+ output.replaceAll("value = ", ""))
Review Comment:
I would just change the result in code, e.g. (untested):
```scala
val input = """
|case class MyTestClass(value: Int)
|spark.range(4).
| filter($"id" % 2 === 1).
| select($"id".cast("int").as("value")).
| as[MyTestClass].
| collect().
| map(mtc => s"MyTestClass(${mtc.value})")
| mkString("[", ", ", "]")
""".stripMargin
val output = runCommandsInShell(input)
assertContains("String = [MyTestClass(1), MyTestClass(3)]", output)
```
--
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]