Skip to content

Conversation

@HyukjinKwon
Copy link
Member

What changes were proposed in this pull request?

This PR is a minor followup of #37973 to match the pattern of either ArrayBuffer (Scala 2.12) or List (Scala 2.13) in "Struct Star Expansion" test case at SQLQuerySuite.scala.

Why are the changes needed?

Currently, the test fails with Scala 2.13 (https://github.com/apache/spark/actions/runs/3146198025/jobs/5114388079):

[info] - Struct Star Expansion *** FAILED *** (1 second, 801 milliseconds)
[info]   Map("attributes" -> "List(a)") did not equal Map("attributes" -> "ArrayBuffer(a)") (SparkFunSuite.scala:328)
[info]   Analysis:
[info]   JavaCollectionWrappers$JMapWrapper(attributes: List(a) -> ArrayBuffer(a))
[info]   org.scalatest.exceptions.TestFailedException:
[info]   at org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:472)
[info]   at org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:471)
[info]   at org.scalatest.Assertions$.newAssertionFailedException(Assertions.scala:1231)
[info]   at org.scalatest.Assertions$AssertionsHelper.macroAssert(Assertions.scala:1295)
[info]   at org.apache.spark.SparkFunSuite.checkError(SparkFunSuite.scala:328)
[info]   at org.apache.spark.SparkFunSuite.checkError(SparkFunSuite.scala:369)

We should also consider Scala 2.13 case.

Does this PR introduce any user-facing change?

No, test-only.

How was this patch tested?

Manually tested:

scala> "List(a)".matches("(ArrayBuffer|List)\\(a\\)")
res0: Boolean = true

scala> "ArrayBuffer(a)".matches("(ArrayBuffer|List)\\(a\\)")
res1: Boolean = true

@github-actions github-actions bot added the SQL label Sep 29, 2022
@HyukjinKwon
Copy link
Member Author

Merged to master.

@LuciferYang
Copy link
Contributor

Late LGTM

@HyukjinKwon HyukjinKwon deleted the SPARK-40540-followup branch January 15, 2024 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants