diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/schema/SchemaHelper.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/schema/SchemaHelper.scala index 4111757043e..29d720c533d 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/schema/SchemaHelper.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/schema/SchemaHelper.scala @@ -27,7 +27,7 @@ import org.apache.spark.sql.types._ object SchemaHelper { /** - * Spark 3.3.0 DataType TimestampNTZType's class name. + * Spark 3.4.0 DataType TimestampNTZType's class name. */ final val TIMESTAMP_NTZ = "TimestampNTZType$" diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala index 51a54148fc5..27766e7c624 100644 --- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala +++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala @@ -80,9 +80,13 @@ class SparkOperationSuite extends WithSparkSQLEngine with HiveMetadataTests with // since spark3.3.0 if (SPARK_ENGINE_MAJOR_MINOR_VERSION._1 > 3 || (SPARK_ENGINE_MAJOR_MINOR_VERSION._1 == 3 && SPARK_ENGINE_MAJOR_MINOR_VERSION._2 >= 3)) { - schema = schema.add("c18", "timestamp_ntz", nullable = true, "18") - .add("c19", "interval day", nullable = true, "19") - .add("c20", "interval year", nullable = true, "20") + schema = schema.add("c18", "interval day", nullable = true, "18") + .add("c19", "interval year", nullable = true, "19") + } + // since spark3.4.0 + if (SPARK_ENGINE_MAJOR_MINOR_VERSION._1 > 3 || + (SPARK_ENGINE_MAJOR_MINOR_VERSION._1 == 3 && SPARK_ENGINE_MAJOR_MINOR_VERSION._2 >= 4)) { + schema = schema.add("c20", "timestamp_ntz", nullable = true, "20") } val ddl = @@ -120,9 +124,9 @@ class SparkOperationSuite extends WithSparkSQLEngine with HiveMetadataTests with STRUCT, BINARY, STRUCT, - TIMESTAMP, OTHER, - OTHER) + OTHER, + TIMESTAMP) var pos = 0 diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/SparkQueryTests.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/SparkQueryTests.scala index 7a5c0b94712..1cc55554ffc 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/SparkQueryTests.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/SparkQueryTests.scala @@ -175,8 +175,8 @@ trait SparkQueryTests extends HiveJDBCTestHelper { } test("execute statement - select timestamp_ntz") { - assume(SPARK_ENGINE_MAJOR_MINOR_VERSION._1 >= 3 - && SPARK_ENGINE_MAJOR_MINOR_VERSION._2 > 2) + assume(SPARK_ENGINE_MAJOR_MINOR_VERSION._1 > 3 || + (SPARK_ENGINE_MAJOR_MINOR_VERSION._1 == 3 && SPARK_ENGINE_MAJOR_MINOR_VERSION._2 >= 4)) withJdbcStatement() { statement => val resultSet = statement.executeQuery( "SELECT make_timestamp_ntz(2022, 03, 24, 18, 08, 31.800) AS col")