You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-50984][SQL][TESTS] Make ExpressionImplUtilsSuite robust by matching JDK msgs via regex
### What changes were proposed in this pull request?
This PR aims to make `ExpressionImplUtilsSuite` robust and simpler by matching JDK msgs via regex.
### Why are the changes needed?
Historically, the error messages are different across JDK versions.
https://github.com/apache/spark/blob/44966c94b686df72b827307d3c3eadc6804abaf2/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionImplUtilsSuite.scala#L290-L295
In JDK 17.0.14, the error messages are different in some distributions. Note that it succeeds with GitHub Action Zulu distribution.
```
[info] - AesEncrypt Expected Errors *** FAILED *** (8 milliseconds)
...
[info] Analysis:
[info] JavaCollectionWrappers$JMapWrapper("detailMessage":
"Input length not multiple of 16 bytes" ->
"Input length must be multiple of 16 when decrypting with padded cipher")
```
We had better make it more robust.
### Does this PR introduce _any_ user-facing change?
No. This is a test-only change.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes#49661 from dongjoon-hyun/SPARK-50984.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
0 commit comments