File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
sql/hive/src/main/scala/org/apache/spark/sql/hive Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ import org.apache.spark.sql.SparkSession
4141import org .apache .spark .sql .catalyst .InternalRow
4242import org .apache .spark .sql .catalyst .expressions ._
4343import org .apache .spark .sql .catalyst .util .DateTimeUtils
44- import org .apache .spark .sql .internal .SQLConf
4544import org .apache .spark .unsafe .types .UTF8String
4645import org .apache .spark .util .{SerializableConfiguration , Utils }
4746
@@ -229,7 +228,7 @@ class HadoopTableReader(
229228 partitionKeyAttrs.foreach { case (attr, ordinal) =>
230229 val partOrdinal = partitionKeys.indexOf(attr)
231230 row(ordinal) = Cast (Literal (rawPartValues(partOrdinal)), attr.dataType,
232- Option (SQLConf .get .sessionLocalTimeZone)).eval(null )
231+ Option (sparkSession.sessionState.conf .sessionLocalTimeZone)).eval(null )
233232 }
234233 }
235234
Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ import org.apache.spark.sql.execution._
3737import org .apache .spark .sql .execution .metric .SQLMetrics
3838import org .apache .spark .sql .hive ._
3939import org .apache .spark .sql .hive .client .HiveClientImpl
40- import org .apache .spark .sql .internal .SQLConf
4140import org .apache .spark .sql .types .{BooleanType , DataType }
4241import org .apache .spark .util .Utils
4342
@@ -105,7 +104,8 @@ case class HiveTableScanExec(
105104 hadoopConf)
106105
107106 private def castFromString (value : String , dataType : DataType ) = {
108- Cast (Literal (value), dataType, Option (SQLConf .get.sessionLocalTimeZone)).eval(null )
107+ Cast (Literal (value), dataType,
108+ Option (sparkSession.sessionState.conf.sessionLocalTimeZone)).eval(null )
109109 }
110110
111111 private def addColumnMetadataToConf (hiveConf : Configuration ): Unit = {
You can’t perform that action at this time.
0 commit comments