From 9d0e8e59b612121959430806e7fe05d4164030a4 Mon Sep 17 00:00:00 2001 From: Hyukjin Kwon Date: Wed, 24 Jun 2026 09:07:15 +0900 Subject: [PATCH] [SPARK-57649][SQL][TESTS] Regenerate stale datetime-formatting.sql.out.java21 golden file ### What changes were proposed in this pull request? 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 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 (`SQLQueryTestSuite.scala`), so the stale file breaks the scheduled Maven (Scala 2.13, JDK 21) and 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? Ran the affected golden tests on JDK 21 and confirmed they pass (see PR description for CI links). ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.8 Co-authored-by: Isaac --- .../results/datetime-formatting.sql.out.java21 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sql/core/src/test/resources/sql-tests/results/datetime-formatting.sql.out.java21 b/sql/core/src/test/resources/sql-tests/results/datetime-formatting.sql.out.java21 index 3ed7e08c88bd1..80fb48ec14aa1 100644 --- a/sql/core/src/test/resources/sql-tests/results/datetime-formatting.sql.out.java21 +++ b/sql/core/src/test/resources/sql-tests/results/datetime-formatting.sql.out.java21 @@ -450,3 +450,19 @@ select date_format(timestamp_ntz'2023-08-18 09:13:14.123456', 'yyyy-MM-dd HH:mm: struct -- !query output 2023-08-18 09:13:14.123456 2023-08-18 09:13:14.123456 2023-08-18 09:13:14.123456 + + +-- !query +select to_char(TIME'12:13:14', 'HH:mm:ss'), to_varchar(TIME'12:13:14', 'HH:mm:ss') +-- !query schema +struct +-- !query output +12:13:14 12:13:14 + + +-- !query +select to_char(TIME'23:59:59.123456', 'HH:mm:ss.SSSSSS'), to_varchar(TIME'23:59:59.123456', 'HH:mm:ss.SSSSSS') +-- !query schema +struct +-- !query output +23:59:59.123456 23:59:59.123456