diff --git a/sql/core/src/test/resources/sql-tests/inputs/binary.sql b/sql/core/src/test/resources/sql-tests/inputs/binary.sql index 8e9e908723744..8cd33eccaaf07 100644 --- a/sql/core/src/test/resources/sql-tests/inputs/binary.sql +++ b/sql/core/src/test/resources/sql-tests/inputs/binary.sql @@ -1,4 +1,4 @@ ---SET spark.sql.binaryOutputStyle=UTF8; +--SET spark.sql.binaryOutputStyle=UTF8 SELECT X''; SELECT X'4561736F6E2059616F20323031382D31312D31373A31333A33333A3333'; diff --git a/sql/core/src/test/resources/sql-tests/inputs/binary_base64.sql b/sql/core/src/test/resources/sql-tests/inputs/binary_base64.sql index 3fc59d1312256..853eedd51773f 100644 --- a/sql/core/src/test/resources/sql-tests/inputs/binary_base64.sql +++ b/sql/core/src/test/resources/sql-tests/inputs/binary_base64.sql @@ -1,3 +1,3 @@ --IMPORT binary.sql ---SET spark.sql.binaryOutputStyle=BASE64; +--SET spark.sql.binaryOutputStyle=BASE64 diff --git a/sql/core/src/test/resources/sql-tests/inputs/binary_basic.sql b/sql/core/src/test/resources/sql-tests/inputs/binary_basic.sql index 20edbf5a3bd88..1a5b64bdf7e05 100644 --- a/sql/core/src/test/resources/sql-tests/inputs/binary_basic.sql +++ b/sql/core/src/test/resources/sql-tests/inputs/binary_basic.sql @@ -1,4 +1,4 @@ --IMPORT binary.sql ---SET spark.sql.binaryOutputStyle=BASIC; +--SET spark.sql.binaryOutputStyle=BASIC diff --git a/sql/core/src/test/resources/sql-tests/inputs/binary_hex.sql b/sql/core/src/test/resources/sql-tests/inputs/binary_hex.sql index a237d7a252ca8..7863da737a72f 100644 --- a/sql/core/src/test/resources/sql-tests/inputs/binary_hex.sql +++ b/sql/core/src/test/resources/sql-tests/inputs/binary_hex.sql @@ -1,3 +1,3 @@ --IMPORT binary.sql ---SET spark.sql.binaryOutputStyle=HEX; +--SET spark.sql.binaryOutputStyle=HEX diff --git a/sql/core/src/test/resources/sql-tests/inputs/binary_hex_discrete.sql b/sql/core/src/test/resources/sql-tests/inputs/binary_hex_discrete.sql index ba7796ca4e2f0..282a7634cbc5e 100644 --- a/sql/core/src/test/resources/sql-tests/inputs/binary_hex_discrete.sql +++ b/sql/core/src/test/resources/sql-tests/inputs/binary_hex_discrete.sql @@ -1,3 +1,3 @@ --IMPORT binary.sql ---SET spark.sql.binaryOutputStyle=HEX_DISCRETE; +--SET spark.sql.binaryOutputStyle=HEX_DISCRETE diff --git a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/ThriftServerQueryTestSuite.scala b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/ThriftServerQueryTestSuite.scala index 627e5c4950a9c..026b2388c593c 100644 --- a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/ThriftServerQueryTestSuite.scala +++ b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/ThriftServerQueryTestSuite.scala @@ -103,11 +103,7 @@ class ThriftServerQueryTestSuite extends SQLQueryTestSuite with SharedThriftServ // SPARK-42921 "timestampNTZ/datetime-special-ansi.sql", // SPARK-47264 - "collations.sql", - "binary_hex.sql", - "binary_hex_discrete.sql", - "binary_basic.sql", - "binary_base64.sql" + "collations.sql" ) override def runQueries( @@ -135,13 +131,15 @@ class ThriftServerQueryTestSuite extends SQLQueryTestSuite with SharedThriftServ } // Run the SQL queries preparing them for comparison. - val outputs: Seq[QueryTestOutput] = queries.map { sql => - val (_, output) = handleExceptions(getNormalizedResult(statement, sql)) - // We might need to do some query canonicalization in the future. - ExecutionOutput( - sql = sql, - schema = Some(""), - output = output.mkString("\n").replaceAll("\\s+$", "")) + val outputs: Seq[QueryTestOutput] = withSQLConf(configSet: _*) { + queries.map { sql => + val (_, output) = handleExceptions(getNormalizedResult(statement, sql)) + // We might need to do some query canonicalization in the future. + ExecutionOutput( + sql = sql, + schema = Some(""), + output = output.mkString("\n").replaceAll("\\s+$", "")) + } } // Read back the golden file.