Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gengliangwang committed Jul 1, 2021
1 parent ad97b52 commit a3c64e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Expand Up @@ -2828,9 +2828,10 @@ object SQLConf {
val TIMESTAMP_TYPE =
buildConf("spark.sql.timestampType")
.doc("Configures the default timestamp type of Spark SQL, including SQL DDL and Cast " +
"clause. Setting the configuration as TIMESTAMP_NTZ will use TIMESTAMP WITHOUT TIME " +
"ZONE as the default type while putting it as TIMESTAMP_LTZ will use TIMESTAMP WITH " +
"LOCAL TIME ZONE. Before the 3.2.0 release, Spark only supports the TIMESTAMP WITH " +
s"clause. Setting the configuration as ${TimestampTypes.TIMESTAMP_NTZ.toString} will " +
"use TIMESTAMP WITHOUT TIME ZONE as the default type while putting it as " +
s"${TimestampTypes.TIMESTAMP_LTZ.toString} will use TIMESTAMP WITH LOCAL TIME ZONE. " +
"Before the 3.2.0 release, Spark only supports the TIMESTAMP WITH " +
"LOCAL TIME ZONE type.")
.version("3.2.0")
.stringConf
Expand Down
Expand Up @@ -25,7 +25,9 @@ import org.apache.spark.sql.types.{StructField, StructType, TimestampNTZType, Ti
import org.apache.spark.util.ResetSystemProperties

// Test suite for setting the default timestamp type of Spark SQL
class TimestampTypeSuite extends QueryTest with SharedSparkSession with ResetSystemProperties {
class SetDefaultTimestampTypeSuite extends QueryTest
with SharedSparkSession
with ResetSystemProperties {
test("Create and Alter Table") {
Seq(("TIMESTAMP_NTZ", TimestampNTZType), ("TIMESTAMP_LTZ", TimestampType)).foreach {
case (v, dt) =>
Expand Down

0 comments on commit a3c64e8

Please sign in to comment.