Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.6.0
-
None
-
None
Description
When querying avro data, if the schema has a record before the array, then the results are incorrect.
Schema:
{ "c_record":
, "d_array": [
{"nested_d_string": "str0"}]}
Query:
select t.c_record, t.d_array[0].nested_d_string from dfs_test.`file.avro` t;
Expected Result:
{"nested_c_string":"str0"}str0
Actual Result:
{"nested_c_string":"str0","d_array":[
]} null
As you can see, the result is incorrect. This issue seems to happen only when a record is included before an array in the avro schema.
However, if the array is included before the record, then the query returns the correct result. Refer to the following schema:
{ "d_array": [
], "c_record": {"nested_c_string": "str0"}}