You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Rahul Challapalli (JIRA)" <ji...@apache.org> on 2015/01/26 22:34:34 UTC

[jira] [Created] (DRILL-2073) Filter on a field in a nested repeated type throws an exception

Rahul Challapalli created DRILL-2073:
----------------------------------------

             Summary: Filter on a field in a nested repeated type throws an exception
                 Key: DRILL-2073
                 URL: https://issues.apache.org/jira/browse/DRILL-2073
             Project: Apache Drill
          Issue Type: Bug
          Components: Query Planning & Optimization
            Reporter: Rahul Challapalli
            Assignee: Parth Chandra


git.commit.id.abbrev=3c6d0ef

Data Set :
{code}
{
  "rm": [
    {"rptd": [{ "a": "foo"},{"b":"boo"}]}
  ],
  "rm1":[{"a":"foo"},{"b":"boo"}]
}
{code}

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.

{code}
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 ]
{code}

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

{code}
0: jdbc:drill:schema=dfs.drillTestDir> select rm1[0].a from `nested.json` where rm1[0].b = 'boo';
+------------+
|   EXPR$0   |
+------------+
+------------+
{code}

Attached the log file.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)