Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/21389#discussion_r189924257
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/json/JsonUtils.scala
---
@@ -48,4 +49,33 @@ object JsonUtils {
json.sample(withReplacement = false, options.samplingRatio, 1)
}
}
+
+ /**
+ * Verify if the schema is supported in JSON datasource.
+ */
+ def verifySchema(schema: StructType): Unit = {
--- End diff --
Since supported types are specific to data sources, I think we need to
verify a schema in each file format implementations. But, yes.... these
built-in format (orc and parquet) has the same supported types, so it might be
better to move the code `veryfySchema` into somewhere (e.g., `DataSourceUtils`
or something) for avoiding code duplication....
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]