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/28 23:36:36 UTC

[jira] [Created] (DRILL-2099) Order by has issues with repeated map within a repeated map

Rahul Challapalli created DRILL-2099:
----------------------------------------

             Summary: Order by has issues with repeated map within a repeated map
                 Key: DRILL-2099
                 URL: https://issues.apache.org/jira/browse/DRILL-2099
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Operators
            Reporter: Rahul Challapalli
            Assignee: Mehant Baid
            Priority: Critical


git.commit.id.abbrev=3e33880

Data Set :
{code}
{
  "uid" : 1,
  "map":{"rm": [
    {"rptd": [{ "a": "foo"},{"b":"boo"}]},
    {"rptd": [{ "a": "bar"},{"c":1},{"d":4.5}]}
  ]}
}
{code}

Query : The below query fails
{code}
select flatten(s1.rms.rptd) rptds from (select d.uid uid, flatten(d.map.rm) rms from `temp3.json` d order by d.uid) s1 ;
Query failed: RemoteRpcException: Failure while running fragment., index: -4, length: 4 (expected: range(0, 16384)) [ da0cb480-2fb8-4ea1-8d9a-ae7fc953c11d on qa-node190.qa.lab:31010 ]
[ da0cb480-2fb8-4ea1-8d9a-ae7fc953c11d on qa-node190.qa.lab:31010 ]


Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}

The below 2 queries work as expected :
1. Use filter instead of order by
{code}
select flatten(s1.rms.rptd) rptds from (select d.uid uid, flatten(d.map.rm) rms from `temp3.json` d where d.uid=1) s1 ;
{code}

2. Remove the top level flatten
{code}
select s1.uid from (select d.uid uid, flatten(d.map.rm) rms from `temp3.json` d order by d.uid) s1 ;
{code}




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