-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Since JSON schema draft 4 object definition supports a required property. This property is an array of fields that should be present in the object instance.
Fields that are not required can be undefined. However, Spark schemas don't support undefined columns. At the moment not-nullable and no-required fields are marked as not-nullable in the generated Spark schema.
JSON Schema:
{
"type": "object",
"required": [],
"properties": {
"size": {
"type": "integer"
}
}
}The current Spark schema being generated (serialized as JSON):
{
"type" : "struct",
"fields" : [ {
"name" : "size",
"type" : "long",
"nullable" : false,
"metadata" : { }
} ]
}Proposed Spark schema (serialized as JSON):
{
"type" : "struct",
"fields" : [ {
"name" : "size",
"type" : "long",
"nullable" : true,
"metadata" : { }
} ]
}Metadata
Metadata
Assignees
Labels
No labels