Skip to content

Commit

Permalink
[SPARK-4522][SQL] Parse schema with missing metadata.
Browse files Browse the repository at this point in the history
This is just a quick fix for 1.2.  SPARK-4523 describes a more complete solution.

Author: Michael Armbrust <michael@databricks.com>

Closes apache#3392 from marmbrus/parquetMetadata and squashes the following commits:

bcc6626 [Michael Armbrust] Parse schema with missing metadata.
  • Loading branch information
marmbrus committed Nov 21, 2014
1 parent 8cd6eea commit 90a6a46
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 90a6a46

Please sign in to comment.