hive-dev mailing list archives

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

] commented on HIVE-2567:

This is an automatically generated e-mail. To reply, visit:

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

Review request for Ning Zhang and namit jain.


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.


  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ 1199920 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ 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 



Worked on some sample queries. 

Unit tests work too.



> Some CTAS queries with * and group by don't work.
> -------------------------------------------------
>                 Key: HIVE-2567
>                 URL:
>             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:!default.jspa
For more information on JIRA, see:


View raw message