Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/22226#discussion_r214572336
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonUtils.scala
---
@@ -32,29 +32,29 @@ object JacksonUtils {
}
}
- /**
- * Verify if the schema is supported in JSON parsing.
- */
- def verifySchema(schema: StructType): Unit = {
- def verifyType(name: String, dataType: DataType): Unit = dataType
match {
- case NullType | BooleanType | ByteType | ShortType | IntegerType |
LongType | FloatType |
- DoubleType | StringType | TimestampType | DateType | BinaryType
| _: DecimalType =>
+ def verifyType(name: String, dataType: DataType): Unit = dataType match {
--- End diff --
We can do:
```
def verifyType(name: String, dataType: DataType): Unit = {
dataType match {
case ...
}
}
```
to reduce the diff.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]