From 05fa9facea4630bd20b2ea62686e2232185afe40 Mon Sep 17 00:00:00 2001 From: "yi.wu" Date: Thu, 2 Jan 2020 09:33:19 +0800 Subject: [PATCH] format config name --- docs/sql-migration-guide.md | 2 +- .../src/main/scala/org/apache/spark/sql/internal/SQLConf.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sql-migration-guide.md b/docs/sql-migration-guide.md index 98cfe2a33ff8..76e075d18ab1 100644 --- a/docs/sql-migration-guide.md +++ b/docs/sql-migration-guide.md @@ -95,7 +95,7 @@ license: | - Since Spark 3.0, if `hive.default.fileformat` is not found in `Spark SQL configuration` then it will fallback to hive-site.xml present in the `Hadoop configuration` of `SparkContext`. - - Since Spark 3.0, Spark will cast `String` to `Date/TimeStamp` in binary comparisons with dates/timestamps. The previous behaviour of casting `Date/Timestamp` to `String` can be restored by setting `spark.sql.legacy.typeCoercion.datetimeToString` to `true`. + - Since Spark 3.0, Spark will cast `String` to `Date/TimeStamp` in binary comparisons with dates/timestamps. The previous behaviour of casting `Date/Timestamp` to `String` can be restored by setting `spark.sql.legacy.typeCoercion.datetimeToString.enabled` to `true`. - Since Spark 3.0, when Avro files are written with user provided schema, the fields will be matched by field names between catalyst schema and avro schema instead of positions. diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala index f80ffd1c4fe5..2da67f1f705b 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala @@ -2046,7 +2046,7 @@ object SQLConf { .createWithDefault(Int.MaxValue) val LEGACY_CAST_DATETIME_TO_STRING = - buildConf("spark.sql.legacy.typeCoercion.datetimeToString") + buildConf("spark.sql.legacy.typeCoercion.datetimeToString.enabled") .doc("If it is set to true, date/timestamp will cast to string in binary comparisons " + "with String") .booleanConf