Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.0.0
-
None
-
None
Description
There is incorrect output in case of JSON file with complex nested data.
JSON:
{ "Field1" : { } } { "Field1" : { "InnerField1": {"key1":"value1"}, "InnerField2": {"key2":"value2"} } } { "Field1" : { "InnerField3" : ["value3", "value4"], "InnerField4" : ["value5", "value6"] } }
Query:
select Field1 from dfs.`/tmp/example.json`
Incorrect result:
+---------------------------+ | Field1 | +---------------------------+ {"InnerField1":{},"InnerField2":{},"InnerField3":[],"InnerField4":[]} {"InnerField1":{"key1":"value1"},"InnerField2" {"key2":"value2"},"InnerField3":[],"InnerField4":[]} {"InnerField1":{},"InnerField2":{},"InnerField3":["value3","value4"],"InnerField4":["value5","value6"]} +--------------------------+
Theres is no need to output missing fields. In case of deeply nested structure we will get unreadable result for user.
Correct result:
+--------------------------+ | Field1 | +--------------------------+ |{} {"InnerField1":{"key1":"value1"},"InnerField2":{"key2":"value2"}} {"InnerField3":["value3","value4"],"InnerField4":["value5","value6"]} +--------------------------+
Attachments
Issue Links
- is duplicated by
-
DRILL-5523 Revert if condition in UnionAllRecordBatch changed in DRILL-5419
- Resolved
- is related to
-
DRILL-3806 add metadata for untyped null and simple type promotion
- Open
- relates to
-
DRILL-4007 json reader treats empty list inconsistently,
- Open
-
DRILL-4555 JsonReader does not support nulls in lists
- Open
-
DRILL-4754 Missing values are not missing
- Open
-
DRILL-5033 Query on JSON that has null as value for each key
- Open
-
DRILL-5396 A flatten query on top of 2 files with one record each causes oversize allocation error randomly
- Open
-
DRILL-5521 IndexOutOfBoundsException during union all for map types
- Open
-
DRILL-5534 convert_from on a json map with null value produces an NPE
- Open
-
DRILL-5756 CONVERT_FROM_JSON on a non-existent column throws NullPointerException
- Open
-
DRILL-1913 Drill did not correctly preserve output field's case sensitivity
- Open
-
DRILL-5288 Duplicate key names must be caught in JSON data
- Open
-
DRILL-4842 SELECT * on JSON data results in NumberFormatException
- Reviewable
-
DRILL-1257 Handle schema mutations within a batch
- Open
-
DRILL-3444 Implement Is Not Null/Is Null on List of objects - [isnotnull(MAP-REPEATED)] error
- Open
-
DRILL-1255 Allow change from integer to double type and vice versa in JSON reader
- Open
-
DRILL-1344 Nested json object null is treated as {}
- Open
-
DRILL-1644 Promote data types where prudent
- Open
-
DRILL-1646 Drill cannot handle empty array/list types in JSON documents
- Open
-
DRILL-1767 Add support for nullable maps
- Open
-
DRILL-1768 Add multi-type support for numeric types in complex writer. (invisible up-promotion)
- Open
-
DRILL-3831 Allow null values in lists
- Open
-
DRILL-5283 Support "is not present" as subtype of "is null" for JSON data
- Open
-
DRILL-1554 Assign NULL value for empty text fields in JSON data sources
- Open
-
DRILL-4710 Document Drill's JSON processing rules
- Open
- links to