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

Zheng Shao commented on HIVE-1124:
----------------------------------

Can you make the query result deterministic by adding an "order by" at the end? 
Otherwise the tests might fail.

{code}
    [junit] diff -a -I file: -I /tmp/ -I invalidscheme: -I lastUpdateTime -I 
lastAccessTime -I owner -I transient_lastDdlTime 
/data/users/zshao/hadoop_hive_trunk/.ptest_0/build/ql/test/logs\
/clientpositive/create_view.q.out 
/data/users/zshao/hadoop_hive_trunk/.ptest_0/ql/src/test/results/clientpositive/create_view.q.out
    [junit] 869d868
    [junit] < 401       5
    [junit] 871,873c870
    [junit] < 489       4
    [junit] < 169       4
    [junit] < 277       4
    [junit] ---
    [junit] > 401       5
    [junit] 875a873,875
    [junit] > 277       4
    [junit] > 489       4
    [junit] > 169       4
{code}


> create view should expand the query text consistently
> -----------------------------------------------------
>
>                 Key: HIVE-1124
>                 URL: https://issues.apache.org/jira/browse/HIVE-1124
>             Project: Hadoop Hive
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Zheng Shao
>            Assignee: John Sichi
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1124.1.patch, HIVE-1124.2.patch
>
>
> We should expand the omitted alias in the same way in "select" and in "group 
> by".
> Hive "Group By" recognize "group by" expressions by comparing the literal 
> string.
> {code}
> hive> create view zshao_view as select d, count(1) as cnt from zshao_tt group 
> by d;
> OK
> Time taken: 0.286 seconds
> hive> select * from zshao_view;
> FAILED: Error in semantic analysis: line 1:7 Expression Not In Group By Key d 
> in definition of VIEW zshao_view [
> select d, count(1) as `cnt` from `zshao_tt` group by `zshao_tt`.`d`
> ] used as zshao_view at line 1:14
> {code}
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to