You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Carl Steinbach (JIRA)" <ji...@apache.org> on 2011/06/21 00:08:47 UTC

[jira] [Created] (HIVE-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

Can't use DB qualified column names in WHERE or GROUP BY clauses
----------------------------------------------------------------

                 Key: HIVE-2228
                 URL: https://issues.apache.org/jira/browse/HIVE-2228
             Project: Hive
          Issue Type: Bug
          Components: Query Processor
    Affects Versions: 0.7.0
            Reporter: Carl Steinbach


Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:

{noformat}
hive> CREATE DATABASE db1;
OK

hive> CREATE TABLE db1.t(a INT, b INT);
OK

hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'

hive> SELECT * FROM db1.t t WHERE t.a > 100;
OK

hive> SELECT * FROM db1.t GROUP BY db1.t.a;
FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'

hive> SELECT * FROM db1.t t GROUP BY t.a;
OK
{noformat}

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

        

[jira] [Commented] (HIVE-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Zhenxiao Luo commented on HIVE-2228:
------------------------------------

propose to add dbName into ColumnInfo. The logic is mainly in  TypeCheckProcFactory. While, lots of updates in TestParse.

Review Request submitted at:
https://reviews.facebook.net/D5913
                
> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema, Query Processor, SQL
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2228.1.patch.txt
>
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HIVE-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Zhenxiao Luo commented on HIVE-2228:
------------------------------------

Comments addressed. Review Request submitted at:
https://reviews.facebook.net/D5913
                
> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema, Query Processor, SQL
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2228.1.patch.txt, HIVE-2228.2.patch.txt
>
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Zhenxiao Luo updated HIVE-2228:
-------------------------------

    Attachment: HIVE-2228.2.patch.txt
    
> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema, Query Processor, SQL
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2228.1.patch.txt, HIVE-2228.2.patch.txt
>
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (HIVE-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Carl Steinbach reassigned HIVE-2228:
------------------------------------

    Assignee: Zhenxiao Luo
    
> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>            Assignee: Zhenxiao Luo
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

--
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-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Carl Steinbach updated HIVE-2228:
---------------------------------

    Component/s: SQL
                 Database/Schema
    
> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema, Query Processor, SQL
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>            Assignee: Zhenxiao Luo
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

--
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-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Carl Steinbach updated HIVE-2228:
---------------------------------

    Fix Version/s:     (was: 0.8.0)

> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

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

        

[jira] [Updated] (HIVE-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Zhenxiao Luo updated HIVE-2228:
-------------------------------

    Status: Patch Available  (was: Open)
    
> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema, Query Processor, SQL
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2228.1.patch.txt
>
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HIVE-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Zhenxiao Luo commented on HIVE-2228:
------------------------------------

@Namit: Thanks for the comment.
You are correct, none of the other clauses working: SORT BY, ORDER BY, CLUSTER BY, and DISTRIBUTE BY.

I filed HIVE-3542 and link with this ticket.
                
> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema, Query Processor, SQL
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2228.1.patch.txt
>
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Carl Steinbach updated HIVE-2228:
---------------------------------

    Fix Version/s: 0.8.0

> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>             Fix For: 0.8.0
>
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

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

        

[jira] [Updated] (HIVE-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Zhenxiao Luo updated HIVE-2228:
-------------------------------

    Status: Patch Available  (was: Open)
    
> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema, Query Processor, SQL
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2228.1.patch.txt, HIVE-2228.2.patch.txt
>
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Zhenxiao Luo updated HIVE-2228:
-------------------------------

    Attachment: HIVE-2228.1.patch.txt
    
> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema, Query Processor, SQL
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2228.1.patch.txt
>
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HIVE-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Namit Jain commented on HIVE-2228:
----------------------------------

Isn't it true for other clauses also ?
I mean, order by, sort by, distribute by etc.
It is OK if you want to do that in a follow-up, but wanted to confirm.
                
> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema, Query Processor, SQL
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2228.1.patch.txt
>
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2228) Can't use DB qualified column names in WHERE or GROUP BY clauses

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

Namit Jain updated HIVE-2228:
-----------------------------

    Status: Open  (was: Patch Available)

minor comments on phabricator
                
> Can't use DB qualified column names in WHERE or GROUP BY clauses
> ----------------------------------------------------------------
>
>                 Key: HIVE-2228
>                 URL: https://issues.apache.org/jira/browse/HIVE-2228
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema, Query Processor, SQL
>    Affects Versions: 0.7.0
>            Reporter: Carl Steinbach
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2228.1.patch.txt
>
>
> Hive doesn't allow you to use DB qualified column names in the WHERE or GROUP BY clauses. The workaround is to define a table alias:
> {noformat}
> hive> CREATE DATABASE db1;
> OK
> hive> CREATE TABLE db1.t(a INT, b INT);
> OK
> hive> SELECT * FROM db1.t WHERE db1.t.a > 100;
> FAILED: Error in semantic analysis: Line 1:26 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t WHERE t.a > 100;
> OK
> hive> SELECT * FROM db1.t GROUP BY db1.t.a;
> FAILED: Error in semantic analysis: Line 1:29 Invalid table alias or column reference 'db1'
> hive> SELECT * FROM db1.t t GROUP BY t.a;
> OK
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira