[ 
https://issues.apache.org/jira/browse/HIVE-18189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16274900#comment-16274900
 ] 

Sergey Shelukhin commented on HIVE-18189:
-----------------------------------------

The test appears to have failed. In general, looks good. One nit:
{noformat}
node = (ASTNode) colNode.getChild(0);
+            if (node != null
{noformat}
in a couple places; it seems like length needs to be checked before accessing 
the element by index, and null check is unnecessary cause it will throw if it's 
absent right now.

> 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
>
>
> 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)

Reply via email to