[
https://issues.apache.org/jira/browse/HIVE-18189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16277284#comment-16277284
]
Sergey Shelukhin commented on HIVE-18189:
-----------------------------------------
Well, perhaps the code should be improved? As far as I understand AST cannot
have null objects but it will fail if you call .get(index) and the node doesn't
exist. [~ashutoshc] might know this better.
> Order by position does not work when cbo is disabled
> ----------------------------------------------------
>
> Key: HIVE-18189
> URL: https://issues.apache.org/jira/browse/HIVE-18189
> Project: Hive
> Issue Type: Bug
> Components: Query Planning
> Reporter: Daniel Dai
> Assignee: Daniel Dai
> Attachments: HIVE-18189.1.patch, HIVE-18189.2.patch
>
>
> Investigating a failed query:
> {code}
> set hive.cbo.enable=false;
> set hive.orderby.position.alias=true;
> select distinct age from student order by 1 desc limit 20;
> {code}
> The query does not sort the output correctly when cbo is
> disabled/inactivated. I found two issues:
> 1. "order by position" query is broken by HIVE-16774
> 2. In particular, select distinct query never work for "order by position"
> query
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)