File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 1717
1818package org .apache .spark .sql .catalyst .csv
1919
20- import java .text .ParsePosition
21-
2220import scala .util .control .Exception .allCatch
2321
2422import org .apache .spark .rdd .RDD
@@ -30,14 +28,13 @@ import org.apache.spark.sql.types._
3028class CSVInferSchema (val options : CSVOptions ) extends Serializable {
3129
3230 @ transient
33- private lazy val timestampParser = TimestampFormatter (
31+ private lazy val timestampFormatter = TimestampFormatter (
3432 options.timestampFormat,
3533 options.timeZone,
3634 options.locale)
3735 @ transient
3836 private lazy val dateFormatter = DateFormatter (
3937 options.dateFormat,
40- options.timeZone,
4138 options.locale)
4239
4340 private val decimalParser = {
@@ -167,7 +164,7 @@ class CSVInferSchema(val options: CSVOptions) extends Serializable {
167164 }
168165
169166 private def tryParseTimestamp (field : String ): DataType = {
170- if ((allCatch opt timestampParser .parse(field)).isDefined) {
167+ if ((allCatch opt timestampFormatter .parse(field)).isDefined) {
171168 TimestampType
172169 } else {
173170 tryParseDate(field)
You can’t perform that action at this time.
0 commit comments