Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
git.commit.id.abbrev=3c6d0ef
Data Set :
{ "rm": [ {"rptd": [{ "a": "foo"},{"b":"boo"}]} ], "rm1":[{"a":"foo"},{"b":"boo"}] }
The below query tries to apply a filter on field which does not exist. However the field is still present in a different element of the same array.
select rm[0].rptd[0] from `temp.json` where rm[0].rptd[0].b = 'boo'; Query failed: Query failed: Failure while running fragment., index: -4, length: 4 (expected: range(0, 16384)) [ 01887113-c758-41bf-96d1-5eede9b1e411 on qa-node191.qa.lab:31010 ] [ 01887113-c758-41bf-96d1-5eede9b1e411 on qa-node191.qa.lab:31010 ]
The above query should result in an empty result.The above error only happens when we apply a filter on a nested array element. The below query works fine
0: jdbc:drill:schema=dfs.drillTestDir> select rm1[0].a from `nested.json` where rm1[0].b = 'boo';
+------------+
| EXPR$0 |
+------------+
+------------+
Attached the log file.