zhengruifeng opened a new pull request, #48235:
URL: https://github.com/apache/spark/pull/48235
### What changes were proposed in this pull request?
Make tests of `INVALID_PARAMETER_VALUE.CHARSET` deterministic
### Why are the changes needed?
`VALID_CHARSETS` is a Set, so `VALID_CHARSETS.mkString(", ")` is
non-deterministic, and cause failures in different environments, e.g.
```
org.scalatest.exceptions.TestFailedException:
ansi/string-functions.sql
Expected "...sets" : "UTF-16LE, U[TF-8, UTF-32, UTF-16BE, UTF-16, US-ASCII,
ISO-8859-1]",
"functionName...", but got "...sets" : "UTF-16LE, U[S-ASCII, ISO-8859-1,
UTF-8, UTF-32, UTF-16BE, UTF-16]",
"functionName..." Result did not match for query #93
select encode('hello', 'WINDOWS-1252')
at
org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:472)
at
org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:471)
at
org.scalatest.funsuite.AnyFunSuite.newAssertionFailedException(AnyFunSuite.scala:1564)
at org.scalatest.Assertions.assertResult(Assertions.scala:847)
at org.scalatest.Assertions.assertResult$(Assertions.scala:842)
at
org.scalatest.funsuite.AnyFunSuite.assertResult(AnyFunSuite.scala:1564)
```
### Does this PR introduce _any_ user-facing change?
No, test only
### How was this patch tested?
updated tests
### Was this patch authored or co-authored using generative AI tooling?
no
--
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]