You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "John Sichi (JIRA)" <ji...@apache.org> on 2011/04/07 22:02:07 UTC

[jira] [Created] (HIVE-2099) GROUP BY rules not applied correctly for select *

GROUP BY rules not applied correctly for select *
-------------------------------------------------

                 Key: HIVE-2099
                 URL: https://issues.apache.org/jira/browse/HIVE-2099
             Project: Hive
          Issue Type: Bug
          Components: Query Processor
    Affects Versions: 0.6.0
            Reporter: John Sichi


This fails as expected:

select foo, bar from pokes group by foo;

This succeeds, which is incorrect:

select * from pokes group by foo;

I verified this as far back as 0.6, so maybe it has always been this way.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2099) GROUP BY rules not applied correctly for select *

Posted by "Chinna Rao Lalam (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chinna Rao Lalam updated HIVE-2099:
-----------------------------------

    Affects Version/s: 0.9.0
                       0.8.0
                       0.7.0
               Status: Patch Available  (was: Open)
    
> GROUP BY rules not applied correctly for select *
> -------------------------------------------------
>
>                 Key: HIVE-2099
>                 URL: https://issues.apache.org/jira/browse/HIVE-2099
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.7.0, 0.6.0, 0.8.0, 0.9.0
>            Reporter: John Sichi
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-2099.1.patch, HIVE-2099.patch
>
>
> This fails as expected:
> select foo, bar from pokes group by foo;
> This succeeds, which is incorrect:
> select * from pokes group by foo;
> I verified this as far back as 0.6, so maybe it has always been this way.

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

        

[jira] [Commented] (HIVE-2099) GROUP BY rules not applied correctly for select *

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155886#comment-13155886 ] 

jiraposter@reviews.apache.org commented on HIVE-2099:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2922/
-----------------------------------------------------------

Review request for hive and John Sichi.


Summary
-------

Select * case provided group by validation like select columns list is subset or equal to the group by columns list. If it violates this validation will throw exception.


This addresses bug HIVE-2099.
    https://issues.apache.org/jira/browse/HIVE-2099


Diffs
-----

  trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 1203044 
  trunk/ql/src/test/queries/clientnegative/groupby_select_all.q PRE-CREATION 
  trunk/ql/src/test/queries/clientnegative/groupby_select_all_alias.q PRE-CREATION 
  trunk/ql/src/test/queries/clientnegative/groupby_select_all_join.q PRE-CREATION 
  trunk/ql/src/test/queries/clientnegative/groupby_select_all_subquery.q PRE-CREATION 
  trunk/ql/src/test/queries/clientnegative/groupby_select_all_subquery_unionall.q PRE-CREATION 
  trunk/ql/src/test/queries/clientpositive/groupby_select_all.q PRE-CREATION 
  trunk/ql/src/test/results/clientnegative/groupby_select_all.q.out PRE-CREATION 
  trunk/ql/src/test/results/clientnegative/groupby_select_all_alias.q.out PRE-CREATION 
  trunk/ql/src/test/results/clientnegative/groupby_select_all_join.q.out PRE-CREATION 
  trunk/ql/src/test/results/clientnegative/groupby_select_all_subquery.q.out PRE-CREATION 
  trunk/ql/src/test/results/clientnegative/groupby_select_all_subquery_unionall.q.out PRE-CREATION 
  trunk/ql/src/test/results/clientpositive/groupby_select_all.q.out PRE-CREATION 

Diff: https://reviews.apache.org/r/2922/diff


Testing
-------

All unit tests passed and added new testcases


Thanks,

chinna


                
> GROUP BY rules not applied correctly for select *
> -------------------------------------------------
>
>                 Key: HIVE-2099
>                 URL: https://issues.apache.org/jira/browse/HIVE-2099
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-2099.1.patch, HIVE-2099.patch
>
>
> This fails as expected:
> select foo, bar from pokes group by foo;
> This succeeds, which is incorrect:
> select * from pokes group by foo;
> I verified this as far back as 0.6, so maybe it has always been this way.

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

        

[jira] [Commented] (HIVE-2099) GROUP BY rules not applied correctly for select *

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159043#comment-13159043 ] 

jiraposter@reviews.apache.org commented on HIVE-2099:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2922/#review3550
-----------------------------------------------------------



trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
<https://reviews.apache.org/r/2922/#comment7911>

    Rather than adding special-case code to handle this, wouldn't it be better to make genColListRegex call genExprNodeDesc (which is what normally detects the error)?  This would avoid extra code, and would also make this apply to the other regex cases.
    


- John


On 2011-11-23 14:06:54, chinna wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2922/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-11-23 14:06:54)
bq.  
bq.  
bq.  Review request for hive and John Sichi.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Select * case provided group by validation like select columns list is subset or equal to the group by columns list. If it violates this validation will throw exception.
bq.  
bq.  
bq.  This addresses bug HIVE-2099.
bq.      https://issues.apache.org/jira/browse/HIVE-2099
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 1203044 
bq.    trunk/ql/src/test/queries/clientnegative/groupby_select_all.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientnegative/groupby_select_all_alias.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientnegative/groupby_select_all_join.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientnegative/groupby_select_all_subquery.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientnegative/groupby_select_all_subquery_unionall.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientpositive/groupby_select_all.q PRE-CREATION 
bq.    trunk/ql/src/test/results/clientnegative/groupby_select_all.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientnegative/groupby_select_all_alias.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientnegative/groupby_select_all_join.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientnegative/groupby_select_all_subquery.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientnegative/groupby_select_all_subquery_unionall.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientpositive/groupby_select_all.q.out PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/2922/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  All unit tests passed and added new testcases
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  chinna
bq.  
bq.


                
> GROUP BY rules not applied correctly for select *
> -------------------------------------------------
>
>                 Key: HIVE-2099
>                 URL: https://issues.apache.org/jira/browse/HIVE-2099
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.6.0, 0.7.0, 0.8.0, 0.9.0
>            Reporter: John Sichi
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-2099.1.patch, HIVE-2099.patch
>
>
> This fails as expected:
> select foo, bar from pokes group by foo;
> This succeeds, which is incorrect:
> select * from pokes group by foo;
> I verified this as far back as 0.6, so maybe it has always been this way.

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

        

[jira] [Updated] (HIVE-2099) GROUP BY rules not applied correctly for select *

Posted by "Chinna Rao Lalam (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chinna Rao Lalam updated HIVE-2099:
-----------------------------------

    Attachment: HIVE-2099.1.patch
    
> GROUP BY rules not applied correctly for select *
> -------------------------------------------------
>
>                 Key: HIVE-2099
>                 URL: https://issues.apache.org/jira/browse/HIVE-2099
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-2099.1.patch, HIVE-2099.patch
>
>
> This fails as expected:
> select foo, bar from pokes group by foo;
> This succeeds, which is incorrect:
> select * from pokes group by foo;
> I verified this as far back as 0.6, so maybe it has always been this way.

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

        

[jira] [Updated] (HIVE-2099) GROUP BY rules not applied correctly for select *

Posted by "John Sichi (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Sichi updated HIVE-2099:
-----------------------------

    Status: Open  (was: Patch Available)
    
> GROUP BY rules not applied correctly for select *
> -------------------------------------------------
>
>                 Key: HIVE-2099
>                 URL: https://issues.apache.org/jira/browse/HIVE-2099
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.7.0, 0.6.0, 0.8.0, 0.9.0
>            Reporter: John Sichi
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-2099.1.patch, HIVE-2099.patch
>
>
> This fails as expected:
> select foo, bar from pokes group by foo;
> This succeeds, which is incorrect:
> select * from pokes group by foo;
> I verified this as far back as 0.6, so maybe it has always been this way.

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

        

[jira] [Commented] (HIVE-2099) GROUP BY rules not applied correctly for select *

Posted by "Chinna Rao Lalam (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155885#comment-13155885 ] 

Chinna Rao Lalam commented on HIVE-2099:
----------------------------------------

Select * case provided group by validation like select columns list is subset or equal to the group by columns list. If it violates this validation will throw exception.
                
> GROUP BY rules not applied correctly for select *
> -------------------------------------------------
>
>                 Key: HIVE-2099
>                 URL: https://issues.apache.org/jira/browse/HIVE-2099
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-2099.1.patch, HIVE-2099.patch
>
>
> This fails as expected:
> select foo, bar from pokes group by foo;
> This succeeds, which is incorrect:
> select * from pokes group by foo;
> I verified this as far back as 0.6, so maybe it has always been this way.

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

        

[jira] [Updated] (HIVE-2099) GROUP BY rules not applied correctly for select *

Posted by "Chinna Rao Lalam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chinna Rao Lalam updated HIVE-2099:
-----------------------------------

    Attachment: HIVE-2099.patch

> GROUP BY rules not applied correctly for select *
> -------------------------------------------------
>
>                 Key: HIVE-2099
>                 URL: https://issues.apache.org/jira/browse/HIVE-2099
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>         Attachments: HIVE-2099.patch
>
>
> This fails as expected:
> select foo, bar from pokes group by foo;
> This succeeds, which is incorrect:
> select * from pokes group by foo;
> I verified this as far back as 0.6, so maybe it has always been this way.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HIVE-2099) GROUP BY rules not applied correctly for select *

Posted by "Chinna Rao Lalam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chinna Rao Lalam reassigned HIVE-2099:
--------------------------------------

    Assignee: Chinna Rao Lalam

> GROUP BY rules not applied correctly for select *
> -------------------------------------------------
>
>                 Key: HIVE-2099
>                 URL: https://issues.apache.org/jira/browse/HIVE-2099
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-2099.patch
>
>
> This fails as expected:
> select foo, bar from pokes group by foo;
> This succeeds, which is incorrect:
> select * from pokes group by foo;
> I verified this as far back as 0.6, so maybe it has always been this way.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira