You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Lars Francke (JIRA)" <ji...@apache.org> on 2014/09/08 10:20:28 UTC

[jira] [Commented] (HIVE-695) sort by does not support columns along with table alias when there is a group by

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

Lars Francke commented on HIVE-695:
-----------------------------------

I just checked and it's still an issue in Hive 0.12

> sort by does not support columns along with table alias when there is a group by
> --------------------------------------------------------------------------------
>
>                 Key: HIVE-695
>                 URL: https://issues.apache.org/jira/browse/HIVE-695
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Raghotham Murthy
>            Priority: Minor
>
> The following query works:
> select a.userid from pageviews a where a.ds = '2009-07-21' sort by a.userid; 
> However, the query below results in an error:
> select a.userid, count(1) from pageviews a where a.ds = '2009-07-21' group by a.userid sort by a.userid; 
> FAILED: Error in semantic analysis: line 1:109 Invalid Table Alias or Column Reference a
> We should either not allow sort by after a group by or allow sort by to have column aliases always.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)