hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiraposter@reviews.apache.org (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-2567) Some CTAS queries with * and group by don't work.
Date Fri, 11 Nov 2011 23:48:54 GMT

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

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


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

(Updated 2011-11-11 23:47:08.652126)


Review request for Ning Zhang and namit jain.


Summary
-------

To introduce proper support for the problem would require a lot of work I believe. Yet this
patch seems to do the job pretty well, and with very good chance doesn't break anything :).


When user puts tablename.columnname in group by, then the name of the column from * won't
be columname but tablename_columnname, to allow ctas with * and joins on tables that share
column names (like in the test). In very rare cases it may lead to duplicate column anyway,
as shown in the negative test.

This isn't the final resolution of the problem (as that would require substantial changes),
yet at least this allows hive to support many use cases with ctas, * and group by. 

I also run all the tests (with -overwrite option)  for this change, the tests executed correctly
and no output file for any already existing test had been changed. 


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


Diffs
-----

  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java 1199920 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 1199920 
  trunk/ql/src/test/queries/clientnegative/ctas_group_by_failure1.q PRE-CREATION 
  trunk/ql/src/test/queries/clientpositive/input48.q PRE-CREATION 
  trunk/ql/src/test/results/clientnegative/ctas_group_by_failure1.q.out PRE-CREATION 
  trunk/ql/src/test/results/clientpositive/input48.q.out PRE-CREATION 

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


Testing
-------

Worked on some sample queries. 

Unit tests work too.


Thanks,

Robert


                
> Some CTAS queries with * and group by don't work.
> -------------------------------------------------
>
>                 Key: HIVE-2567
>                 URL: https://issues.apache.org/jira/browse/HIVE-2567
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Robert Surówka
>            Assignee: Robert Surówka
>            Priority: Minor
>         Attachments: HIVE-2567.1.patch
>
>


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

       

Mime
View raw message