Commit f5549d7
committed
[SPARK-50984][SQL][TESTS] Make
### 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]>ExpressionImplUtilsSuite robust by matching JDK msgs via regex1 parent 44966c9 commit f5549d7
File tree
1 file changed
+5
-13
lines changed- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions
1 file changed
+5
-13
lines changedLines changed: 5 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
287 | 285 | | |
288 | 286 | | |
289 | 287 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | 288 | | |
297 | 289 | | |
298 | 290 | | |
| |||
304 | 296 | | |
305 | 297 | | |
306 | 298 | | |
307 | | - | |
308 | | - | |
| 299 | + | |
309 | 300 | | |
310 | 301 | | |
311 | 302 | | |
| |||
318 | 309 | | |
319 | 310 | | |
320 | 311 | | |
321 | | - | |
| 312 | + | |
322 | 313 | | |
323 | 314 | | |
324 | 315 | | |
| |||
332 | 323 | | |
333 | 324 | | |
334 | 325 | | |
335 | | - | |
| 326 | + | |
336 | 327 | | |
337 | 328 | | |
338 | 329 | | |
| |||
350 | 341 | | |
351 | 342 | | |
352 | 343 | | |
353 | | - | |
| 344 | + | |
| 345 | + | |
354 | 346 | | |
355 | 347 | | |
356 | 348 | | |
| |||
0 commit comments