Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/23201#discussion_r238141831
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JsonInferSchema.scala
---
@@ -121,7 +121,18 @@ private[sql] class JsonInferSchema(options:
JSONOptions) extends Serializable {
DecimalType(bigDecimal.precision, bigDecimal.scale)
}
decimalTry.getOrElse(StringType)
- case VALUE_STRING => StringType
+ case VALUE_STRING =>
+ val stringValue = parser.getText
+ if ((allCatch opt
options.timestampFormat.parse(stringValue)).isDefined) {
--- End diff --
I haven't tested this by myself but I think it has the same problem
(https://github.com/apache/spark/pull/23202#discussion_r238141702)
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]