Skip to content
Snippets Groups Projects
Commit 90a6a46b authored by Michael Armbrust's avatar Michael Armbrust
Browse files

[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.
parent 8cd6eea6
No related branches found
No related tags found
No related merge requests found
......@@ -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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment