[SPARK-4522][SQL] Parse schema with missing metadata.
This is just a quick fix for 1.2. SPARK-4523 describes a more complete solution. Author: Michael Armbrust <michael@databricks.com> Closes #3392 from marmbrus/parquetMetadata and squashes the following commits: bcc6626 [Michael Armbrust] Parse schema with missing metadata.
This commit is contained in:
parent
8cd6eea629
commit
90a6a46bd1
|
@ -84,6 +84,12 @@ object DataType {
|
|||
("nullable", JBool(nullable)),
|
||||
("type", dataType: JValue)) =>
|
||||
StructField(name, parseDataType(dataType), nullable, Metadata.fromJObject(metadata))
|
||||
// Support reading schema when 'metadata' is missing.
|
||||
case JSortedObject(
|
||||
("name", JString(name)),
|
||||
("nullable", JBool(nullable)),
|
||||
("type", dataType: JValue)) =>
|
||||
StructField(name, parseDataType(dataType), nullable)
|
||||
}
|
||||
|
||||
@deprecated("Use DataType.fromJson instead", "1.2.0")
|
||||
|
|
Loading…
Reference in a new issue