You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "sukhendu chakraborty (JIRA)" <ji...@apache.org> on 2012/05/17 21:04:09 UTC

[jira] [Commented] (HIVE-1449) Table aliases in order by clause lead to semantic analysis failure

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

sukhendu chakraborty commented on HIVE-1449:
--------------------------------------------

I have slightly different symptoms but they seem to be related:


select  dist Group1 , count(*) x from cars_tab order by dist;
FAILED: Error in semantic analysis: Line 1:43 Invalid table alias or column reference dist

However, if I use the column alias (Group1), it passes:
select  dist Group1 , count(*) x from cars_tab order by Group1;
                
> Table aliases in order by clause lead to semantic analysis failure
> ------------------------------------------------------------------
>
>                 Key: HIVE-1449
>                 URL: https://issues.apache.org/jira/browse/HIVE-1449
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>
> A simple statement of the form
> select a.account_id, count(1) from tmp_ash_test2 a group by a.account_id order by a.account_id;
> throws a sematic analysis exception
> where as
> select a.account_id, count(1) from tmp_ash_test2 a group by a.account_id order by account_id;
> works fine (the second query does not have the table alias a in the order by clause.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira