Skip to content

Commit beb6912

Browse files
committed
Fix merge
1 parent ba4a9dc commit beb6912

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVInferSchema.scala

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
package org.apache.spark.sql.catalyst.csv
1919

20-
import java.text.ParsePosition
21-
2220
import scala.util.control.Exception.allCatch
2321

2422
import org.apache.spark.rdd.RDD
@@ -30,14 +28,13 @@ import org.apache.spark.sql.types._
3028
class 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)

0 commit comments

Comments
 (0)