Commit db81fa6
committed
[SPARK-57560][SQL][TEST][FOLLOWUP] Update the Java 21 golden file for TIME try arithmetic tests
### What changes were proposed in this pull request?
This is a follow-up of #56819, addressing the Java 21/25 build failures reported there.
#56819 added TIME cases to `try_arithmetic.sql` and regenerated the base golden files. However, `nonansi/try_arithmetic.sql.out` has a Java-21-specific variant `nonansi/try_arithmetic.sql.out.java21` (the suite reads it when `Utils.isJavaVersionAtLeast21`, because JDK-4511638 changes the `toString` of `Float`/`Double`). That `.java21` variant was left stale -- it was missing the new TIME rows -- so on Java 21+ the test compared actual output (with TIME rows) against the stale golden file and failed.
This PR adds the new TIME rows to `nonansi/try_arithmetic.sql.out.java21`. The only genuine Java 21 difference in this file remains the `try_divide(1, (2147483647 + 1))` double output:
- Java 8/11/17: `-4.6566128730773926E-10`
- Java 21+: `-4.656612873077393E-10`
The new TIME outputs (time values, NULLs, and day-time intervals) are Java-version stable, so they are identical in the base and `.java21` files. The ANSI `try_arithmetic.sql.out` needs no `.java21` variant because that `try_divide` double query only appears in non-ANSI mode (in ANSI mode the inner `2147483647 + 1` overflows).
### Why are the changes needed?
To fix the Java 21/25 build failures observed after #56819 was merged, e.g.:
- https://github.com/apache/spark/actions/runs/28359601002/job/84013737500
- https://github.com/apache/spark/actions/runs/28406731869/job/84173152434
### Does this PR introduce _any_ user-facing change?
No. Test-only.
### How was this patch tested?
- Verified `nonansi/try_arithmetic.sql.out.java21` differs from the base `nonansi/try_arithmetic.sql.out` by exactly the one `try_divide` double line, consistent with the existing Java 21 golden file convention.
- `build/sbt 'sql/testOnly org.apache.spark.sql.SQLQueryTestSuite -- -z try_arithmetic'`
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Cursor
Closes #56894 from MaxGekk/time-try-eval-java21.
Authored-by: Maxim Gekk <max.gekk@gmail.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>1 parent 1409d88 commit db81fa6
1 file changed
Lines changed: 104 additions & 0 deletions
Lines changed: 104 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
170 | 218 | | |
171 | 219 | | |
172 | 220 | | |
| |||
465 | 513 | | |
466 | 514 | | |
467 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
468 | 572 | | |
469 | 573 | | |
470 | 574 | | |
| |||
0 commit comments