From 524134c57732bc97ba5fd4a014589d39a3372c4a Mon Sep 17 00:00:00 2001 From: yangjie01 Date: Thu, 12 Sep 2024 07:17:28 -0700 Subject: [PATCH] [SPARK-49578][SQL][TESTS][FOLLOWUP] Regenerate Java 21 golden file for `postgreSQL/float4.sql` and `postgreSQL/int8.sql` ### What changes were proposed in this pull request? This pr regenerate Java 21 golden file for `postgreSQL/float4.sql` and `postgreSQL/int8.sql` to fix Java 21 daily test. ### Why are the changes needed? Fix Java 21 daily test: - https://github.com/apache/spark/actions/runs/10823897095/job/30030200710 ``` [info] - postgreSQL/float4.sql *** FAILED *** (1 second, 100 milliseconds) [info] postgreSQL/float4.sql [info] Expected "...arameters" : { [info] "[ansiConfig" : "\"spark.sql.ansi.enabled\"", [info] "]expression" : "'N A ...", but got "...arameters" : { [info] "[]expression" : "'N A ..." Result did not match for query #11 [info] SELECT float('N A N') (SQLQueryTestSuite.scala:663) ... [info] - postgreSQL/int8.sql *** FAILED *** (2 seconds, 474 milliseconds) [info] postgreSQL/int8.sql [info] Expected "...arameters" : { [info] "[ansiConfig" : "\"spark.sql.ansi.enabled\"", [info] "]sourceType" : "\"BIG...", but got "...arameters" : { [info] "[]sourceType" : "\"BIG..." Result did not match for query #66 [info] SELECT CAST(q1 AS int) FROM int8_tbl WHERE q2 <> 456 (SQLQueryTestSuite.scala:663) ... [info] *** 2 TESTS FAILED *** [error] Failed: Total 3559, Failed 2, Errors 0, Passed 3557, Ignored 4 [error] Failed tests: [error] org.apache.spark.sql.SQLQueryTestSuite [error] (sql / Test / test) sbt.TestsFailedException: Tests unsuccessful ``` ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - Pass Github Acitons - Manual checked: `build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite" with Java 21, all test passed ` ### Was this patch authored or co-authored using generative AI tooling? No Closes #48089 from LuciferYang/SPARK-49578-FOLLOWUP. Authored-by: yangjie01 Signed-off-by: Dongjoon Hyun --- .../sql-tests/results/postgreSQL/float4.sql.out.java21 | 7 ------- .../sql-tests/results/postgreSQL/int8.sql.out.java21 | 4 ---- 2 files changed, 11 deletions(-) diff --git a/sql/core/src/test/resources/sql-tests/results/postgreSQL/float4.sql.out.java21 b/sql/core/src/test/resources/sql-tests/results/postgreSQL/float4.sql.out.java21 index 6126411071bc1..3c2189c399639 100644 --- a/sql/core/src/test/resources/sql-tests/results/postgreSQL/float4.sql.out.java21 +++ b/sql/core/src/test/resources/sql-tests/results/postgreSQL/float4.sql.out.java21 @@ -97,7 +97,6 @@ org.apache.spark.SparkNumberFormatException "errorClass" : "CAST_INVALID_INPUT", "sqlState" : "22018", "messageParameters" : { - "ansiConfig" : "\"spark.sql.ansi.enabled\"", "expression" : "'N A N'", "sourceType" : "\"STRING\"", "targetType" : "\"FLOAT\"" @@ -122,7 +121,6 @@ org.apache.spark.SparkNumberFormatException "errorClass" : "CAST_INVALID_INPUT", "sqlState" : "22018", "messageParameters" : { - "ansiConfig" : "\"spark.sql.ansi.enabled\"", "expression" : "'NaN x'", "sourceType" : "\"STRING\"", "targetType" : "\"FLOAT\"" @@ -147,7 +145,6 @@ org.apache.spark.SparkNumberFormatException "errorClass" : "CAST_INVALID_INPUT", "sqlState" : "22018", "messageParameters" : { - "ansiConfig" : "\"spark.sql.ansi.enabled\"", "expression" : "' INFINITY x'", "sourceType" : "\"STRING\"", "targetType" : "\"FLOAT\"" @@ -196,7 +193,6 @@ org.apache.spark.SparkNumberFormatException "errorClass" : "CAST_INVALID_INPUT", "sqlState" : "22018", "messageParameters" : { - "ansiConfig" : "\"spark.sql.ansi.enabled\"", "expression" : "'nan'", "sourceType" : "\"STRING\"", "targetType" : "\"DECIMAL(10,0)\"" @@ -393,7 +389,6 @@ org.apache.spark.SparkArithmeticException "errorClass" : "CAST_OVERFLOW", "sqlState" : "22003", "messageParameters" : { - "ansiConfig" : "\"spark.sql.ansi.enabled\"", "sourceType" : "\"FLOAT\"", "targetType" : "\"INT\"", "value" : "2.1474836E9" @@ -419,7 +414,6 @@ org.apache.spark.SparkArithmeticException "errorClass" : "CAST_OVERFLOW", "sqlState" : "22003", "messageParameters" : { - "ansiConfig" : "\"spark.sql.ansi.enabled\"", "sourceType" : "\"FLOAT\"", "targetType" : "\"INT\"", "value" : "-2.147484E9" @@ -461,7 +455,6 @@ org.apache.spark.SparkArithmeticException "errorClass" : "CAST_OVERFLOW", "sqlState" : "22003", "messageParameters" : { - "ansiConfig" : "\"spark.sql.ansi.enabled\"", "sourceType" : "\"FLOAT\"", "targetType" : "\"BIGINT\"", "value" : "-9.22338E18" diff --git a/sql/core/src/test/resources/sql-tests/results/postgreSQL/int8.sql.out.java21 b/sql/core/src/test/resources/sql-tests/results/postgreSQL/int8.sql.out.java21 index ee3f8625da8a4..e7df03dc8cadd 100755 --- a/sql/core/src/test/resources/sql-tests/results/postgreSQL/int8.sql.out.java21 +++ b/sql/core/src/test/resources/sql-tests/results/postgreSQL/int8.sql.out.java21 @@ -737,7 +737,6 @@ org.apache.spark.SparkArithmeticException "errorClass" : "CAST_OVERFLOW", "sqlState" : "22003", "messageParameters" : { - "ansiConfig" : "\"spark.sql.ansi.enabled\"", "sourceType" : "\"BIGINT\"", "targetType" : "\"INT\"", "value" : "4567890123456789L" @@ -763,7 +762,6 @@ org.apache.spark.SparkArithmeticException "errorClass" : "CAST_OVERFLOW", "sqlState" : "22003", "messageParameters" : { - "ansiConfig" : "\"spark.sql.ansi.enabled\"", "sourceType" : "\"BIGINT\"", "targetType" : "\"SMALLINT\"", "value" : "4567890123456789L" @@ -809,7 +807,6 @@ org.apache.spark.SparkArithmeticException "errorClass" : "CAST_OVERFLOW", "sqlState" : "22003", "messageParameters" : { - "ansiConfig" : "\"spark.sql.ansi.enabled\"", "sourceType" : "\"DOUBLE\"", "targetType" : "\"BIGINT\"", "value" : "9.223372036854776E20D" @@ -898,7 +895,6 @@ org.apache.spark.SparkArithmeticException "errorClass" : "CAST_OVERFLOW", "sqlState" : "22003", "messageParameters" : { - "ansiConfig" : "\"spark.sql.ansi.enabled\"", "sourceType" : "\"BIGINT\"", "targetType" : "\"INT\"", "value" : "-9223372036854775808L"