You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2026/06/24 05:20:54 UTC
[PR] [SPARK-57649][SQL][TESTS] Regenerate stale datetime-formatting.sql.out.java21 golden file [spark]
HyukjinKwon opened a new pull request, #56720:
URL: https://github.com/apache/spark/pull/56720
### What changes were proposed in this pull request?
[SPARK-57575](https://issues.apache.org/jira/browse/SPARK-57575) added two `TIME`-type `to_char`/`to_varchar` queries to `datetime-formatting.sql` and regenerated `datetime-formatting.sql.out` and `datetime-formatting-legacy.sql.out`, but not the Java 21 variant `datetime-formatting.sql.out.java21`. This PR regenerates the Java 21 golden by appending the two new `TIME`-type query blocks (their `HH:mm:ss` output is not locale/JDK sensitive, so it matches the default golden), restoring the expected 36 query blocks.
### Why are the changes needed?
`SQLQueryTestSuite` uses the `.out.java21` golden for any JDK >= 21, so the stale file breaks the scheduled **Maven (Scala 2.13, JDK 21)** and **Maven (Scala 2.13, JDK 25)** builds:
```
datetime-formatting.sql
Expected 109, but got 103 blocks in result file 'datetime-formatting.sql.out.java21'. Try regenerating the result files.
```
### Does this PR introduce _any_ user-facing change?
No. Test-only.
### How was this patch tested?
- **Before (failing job):** [`Build / Maven (Scala 2.13, JDK 21)` → `sql#core - extended tests`](https://github.com/apache/spark/actions/runs/28035705490/job/82998279873) — `datetime-formatting.sql *** FAILED ***`.
- **After (passing):** ran `sql/testOnly org.apache.spark.sql.SQLQueryTestSuite -- -z datetime-formatting` on JDK 21 → [✅ all tests passed](https://github.com/HyukjinKwon/spark/actions/runs/28065758228/job/83089561688) (`Tests: succeeded 6, failed 0`).
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.8
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57649][SQL][TESTS] Regenerate stale datetime-formatting.sql.out.java21 golden file [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #56720:
URL: https://github.com/apache/spark/pull/56720#issuecomment-4788360878
Merged to master and branch-4.x.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57649][SQL][TESTS] Regenerate stale datetime-formatting.sql.out.java21 golden file [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #56720: [SPARK-57649][SQL][TESTS] Regenerate stale datetime-formatting.sql.out.java21 golden file
URL: https://github.com/apache/spark/pull/56720
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57649][SQL][TESTS] Regenerate stale datetime-formatting.sql.out.java21 golden file [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #56720:
URL: https://github.com/apache/spark/pull/56720#issuecomment-4786340819
**Self-review (code-review skill, high effort) — posted as a comment, not an approval.**
Scope: 1 file, +16/-0 (golden test resource only). Findings below.
### Correctness ✅
- The two appended blocks are **byte-identical** to the corresponding `TIME`-type blocks in the default `datetime-formatting.sql.out` (confirmed via `diff`). This is expected: `HH:mm:ss`/`HH:mm:ss.SSSSSS` formatting uses only numeric time fields, which are not locale/CLDR/JDK-sensitive, so the JDK 21 output equals the default.
- Block count restored to **36** (matches the default golden and the input's query count), which is exactly what resolves `Expected 109, but got 103 blocks`.
- The pre-existing JDK-specific divergence (the `3` vs `5` block earlier in the file) is untouched; the new blocks are appended after it, so they don't interact.
- Verified green on JDK 21: `SQLQueryTestSuite -z datetime-formatting` → `Tests: succeeded 6, failed 0` (linked in the PR description).
### Minor note (process / `CLAUDE.md`)
- The repo `CLAUDE.md` says: *"DO NOT edit the generated golden files (`.sql.out`) directly. Always regenerate them when needed."* This change hand-appends the two blocks rather than running `SPARK_GENERATE_GOLDEN_FILES=1`. Mitigation: the result is **verified equivalent** to a regeneration — the appended output is identical to the default golden and the suite passes on JDK 21. Happy to regenerate via the script instead if a reviewer prefers the canonical path.
No correctness or behavioral concerns. Test-only change.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org