[
https://issues.apache.org/jira/browse/DRILL-2106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14297280#comment-14297280
]
Rahul Challapalli commented on DRILL-2106:
------------------------------------------
Looks like the actual issue has nothing to do with order by. Check the below
queries
{code}
select lst from (select uid, flatten(d.lst_lst) lst from `data.json` d) s1;
+------------+
| lst |
+------------+
| [1,2,3,4,5] |
| [2,3,4,5,6] |
+------------+
{code}
The output from the below query does not looks right. The second column should
be a list
{code}
select flatten(lst), lst from (select uid, flatten(d.lst_lst) lst from
`data.json` d) s1;
+------------+------------+
| EXPR$0 | lst |
+------------+------------+
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
+------------+------------+
{code}
> Flatten together with order by on a list within a list is causing an error
> --------------------------------------------------------------------------
>
> Key: DRILL-2106
> URL: https://issues.apache.org/jira/browse/DRILL-2106
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Operators
> Reporter: Rahul Challapalli
> Assignee: Mehant Baid
> Priority: Critical
> Attachments: error.log
>
>
> git.commit.id.abbrev=3e33880
> Data Set :
> {code}
> {
> "uid" : 1,
> "lst_lst" : [[1,2,3,4,5],[2,3,4,5,6]]
> }
> {code}
> The below query fails
> {code}
> select flatten(lst) from (select uid, flatten(d.lst_lst) lst from
> `temp4.json` d) s1 order by s1.lst[3];
> {code}
> When we remove the top level flatten the below query works
> {code}
> select uid from (select uid, flatten(d.lst_lst) lst from `temp4.json` d) s1
> order by s1.lst[3];
> {code}
> Attached the error log
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)