Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The AbstractJsonRowRecordReader when trying to find the correct schema for a given record it may come with a wrong one.
For example:
Suppose the following record:
{ "dataCollection":[ { "record": { "integer": 1, "boolean": true } }, { "record": { "integer": 2, "string": "stringValue2" } } ] }
Even if the schema is correctly set (which may not be the case as infer schema itself has a similar issue),
the second record
{ "record": { "integer": 2, "string": "stringValue2" } }
will be assigned the schema of the first (["integer" : "INT", "boolean" : "BOOLEAN"] instead of ["integer" : "INT", "string" : "STRING"]).
This will cause the fields that are not present in the schema (in this case "string") to be omitted when writing it out.
Attachments
Issue Links
- links to