[ https://issues.apache.org/jira/browse/DRILL-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Parth Chandra updated DRILL-2099: --------------------------------- Fix Version/s: 0.9.0 > 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 - Data Types, Execution - Relational Operators > Reporter: Rahul Challapalli > Assignee: Mehant Baid > Priority: Critical > Fix For: 0.9.0 > > Attachments: error.log > > > 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)