You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Chinna Rao Lalam (JIRA)" <ji...@apache.org> on 2011/02/08 16:30:58 UTC

[jira] Created: (HIVE-1973) Getting error when join on tables where name of table has uppercase letters

Getting error when join on tables where name of table has uppercase letters
---------------------------------------------------------------------------

                 Key: HIVE-1973
                 URL: https://issues.apache.org/jira/browse/HIVE-1973
             Project: Hive
          Issue Type: Bug
          Components: Query Processor
    Affects Versions: 0.5.0
         Environment: Hadoop 0.20.1, Hive0.5.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).
            Reporter: Chinna Rao Lalam
            Assignee: Chinna Rao Lalam


When execute a join query on tables containing Uppercase letters in the table names hit an exception

 Ex:
{noformat}
  create table a(b int);
  create table tabForJoin(b int,c int);

  select * from a join tabForJoin on(a.b=tabForJoin.b);

  Got an exception like this
  FAILED: Error in semantic analysis:  Invalid Table Alias tabForJoin
{noformat}

But if i give without capital letters ,It is working

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

        

[jira] Commented: (HIVE-1973) Getting error when join on tables where name of table has uppercase letters

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

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


1) In method parseJoinCondPopulateAlias present in SemanticAnalyzer.java  table name (tabForJoin) is converted to lower-case and compared using equals() with the actual name so it returned false and it resulted in the exception. 

So instead of comparing with the actual name convert that to lower-case and compare.

2) In genJoinOperator() present in SemanticAnalyzer.java retrieving the operator from the  map using the table name but map contains the table name with lower-case so it returns null.

So while getting from the map give the name with lower-case.

> Getting error when join on tables where name of table has uppercase letters
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-1973
>                 URL: https://issues.apache.org/jira/browse/HIVE-1973
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.5.0, 0.7.0
>         Environment: Hadoop 0.20.1, Hive0.5.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).
>            Reporter: Chinna Rao Lalam
>            Assignee: Chinna Rao Lalam
>
> When execute a join query on tables containing Uppercase letters in the table names hit an exception
>  Ex:
> {noformat}
>   create table a(b int);
>   create table tabForJoin(b int,c int);
>   select * from a join tabForJoin on(a.b=tabForJoin.b);
>   Got an exception like this
>   FAILED: Error in semantic analysis:  Invalid Table Alias tabForJoin
> {noformat}
> But if i give without capital letters ,It is working

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

        

[jira] Updated: (HIVE-1973) Getting error when join on tables where name of table has uppercase letters

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

Carl Steinbach updated HIVE-1973:
---------------------------------

    Affects Version/s: 0.7.0

Verified that this fails on trunk:

{code}
hive> select * from a join tabForJoin on (a.b = tabForJoin.b);
select * from a join tabForJoin on (a.b = tabForJoin.b);
FAILED: Error in semantic analysis: line 1:42 Invalid Table Alias tabForJoin
hive> select * from a join tabforjoin on (a.b = tabForJoin.b);
OK
Time taken: 5.618 seconds
hive>
{code}

> Getting error when join on tables where name of table has uppercase letters
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-1973
>                 URL: https://issues.apache.org/jira/browse/HIVE-1973
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.5.0, 0.7.0
>         Environment: Hadoop 0.20.1, Hive0.5.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).
>            Reporter: Chinna Rao Lalam
>            Assignee: Chinna Rao Lalam
>
> When execute a join query on tables containing Uppercase letters in the table names hit an exception
>  Ex:
> {noformat}
>   create table a(b int);
>   create table tabForJoin(b int,c int);
>   select * from a join tabForJoin on(a.b=tabForJoin.b);
>   Got an exception like this
>   FAILED: Error in semantic analysis:  Invalid Table Alias tabForJoin
> {noformat}
> But if i give without capital letters ,It is working

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

        

[jira] Updated: (HIVE-1973) Getting error when join on tables where name of table has uppercase letters

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

Chinna Rao Lalam updated HIVE-1973:
-----------------------------------

    Status: Patch Available  (was: Open)

> Getting error when join on tables where name of table has uppercase letters
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-1973
>                 URL: https://issues.apache.org/jira/browse/HIVE-1973
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.5.0, 0.7.0
>         Environment: Hadoop 0.20.1, Hive0.5.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).
>            Reporter: Chinna Rao Lalam
>            Assignee: Chinna Rao Lalam
>
> When execute a join query on tables containing Uppercase letters in the table names hit an exception
>  Ex:
> {noformat}
>   create table a(b int);
>   create table tabForJoin(b int,c int);
>   select * from a join tabForJoin on(a.b=tabForJoin.b);
>   Got an exception like this
>   FAILED: Error in semantic analysis:  Invalid Table Alias tabForJoin
> {noformat}
> But if i give without capital letters ,It is working

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

        

[jira] Updated: (HIVE-1973) Getting error when join on tables where name of table has uppercase letters

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

Namit Jain updated HIVE-1973:
-----------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

Committed. Thanks Chinna Rao Lalam

> Getting error when join on tables where name of table has uppercase letters
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-1973
>                 URL: https://issues.apache.org/jira/browse/HIVE-1973
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.5.0, 0.7.0
>         Environment: Hadoop 0.20.1, Hive0.5.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).
>            Reporter: Chinna Rao Lalam
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-1973.patch
>
>
> When execute a join query on tables containing Uppercase letters in the table names hit an exception
>  Ex:
> {noformat}
>   create table a(b int);
>   create table tabForJoin(b int,c int);
>   select * from a join tabForJoin on(a.b=tabForJoin.b);
>   Got an exception like this
>   FAILED: Error in semantic analysis:  Invalid Table Alias tabForJoin
> {noformat}
> But if i give without capital letters ,It is working

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

        

[jira] Updated: (HIVE-1973) Getting error when join on tables where name of table has uppercase letters

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

Chinna Rao Lalam updated HIVE-1973:
-----------------------------------

    Status: Patch Available  (was: Open)

> Getting error when join on tables where name of table has uppercase letters
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-1973
>                 URL: https://issues.apache.org/jira/browse/HIVE-1973
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.5.0, 0.7.0
>         Environment: Hadoop 0.20.1, Hive0.5.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).
>            Reporter: Chinna Rao Lalam
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-1973.patch
>
>
> When execute a join query on tables containing Uppercase letters in the table names hit an exception
>  Ex:
> {noformat}
>   create table a(b int);
>   create table tabForJoin(b int,c int);
>   select * from a join tabForJoin on(a.b=tabForJoin.b);
>   Got an exception like this
>   FAILED: Error in semantic analysis:  Invalid Table Alias tabForJoin
> {noformat}
> But if i give without capital letters ,It is working

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

        

[jira] Commented: (HIVE-1973) Getting error when join on tables where name of table has uppercase letters

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

Namit Jain commented on HIVE-1973:
----------------------------------

+1

looks good since we are storing lower case names by default in the metastore


hive> create table tblOne(a string, b string);
create table tblOne(a string, b string);
OK
Time taken: 2.663 seconds
hive> create table tblone(a string, b string);
create table tblone(a string, b string);
FAILED: Error in metadata: AlreadyExistsException(message:Table tblone already exists)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
hive> drop table tblone;
drop table tblone;
OK
Time taken: 2.148 seconds
hive> 


> Getting error when join on tables where name of table has uppercase letters
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-1973
>                 URL: https://issues.apache.org/jira/browse/HIVE-1973
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.5.0, 0.7.0
>         Environment: Hadoop 0.20.1, Hive0.5.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).
>            Reporter: Chinna Rao Lalam
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-1973.patch
>
>
> When execute a join query on tables containing Uppercase letters in the table names hit an exception
>  Ex:
> {noformat}
>   create table a(b int);
>   create table tabForJoin(b int,c int);
>   select * from a join tabForJoin on(a.b=tabForJoin.b);
>   Got an exception like this
>   FAILED: Error in semantic analysis:  Invalid Table Alias tabForJoin
> {noformat}
> But if i give without capital letters ,It is working

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

        

[jira] Updated: (HIVE-1973) Getting error when join on tables where name of table has uppercase letters

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

Chinna Rao Lalam updated HIVE-1973:
-----------------------------------

    Status: Open  (was: Patch Available)

> Getting error when join on tables where name of table has uppercase letters
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-1973
>                 URL: https://issues.apache.org/jira/browse/HIVE-1973
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.5.0, 0.7.0
>         Environment: Hadoop 0.20.1, Hive0.5.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).
>            Reporter: Chinna Rao Lalam
>            Assignee: Chinna Rao Lalam
>
> When execute a join query on tables containing Uppercase letters in the table names hit an exception
>  Ex:
> {noformat}
>   create table a(b int);
>   create table tabForJoin(b int,c int);
>   select * from a join tabForJoin on(a.b=tabForJoin.b);
>   Got an exception like this
>   FAILED: Error in semantic analysis:  Invalid Table Alias tabForJoin
> {noformat}
> But if i give without capital letters ,It is working

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

        

[jira] Updated: (HIVE-1973) Getting error when join on tables where name of table has uppercase letters

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

Carl Steinbach updated HIVE-1973:
---------------------------------

    Fix Version/s: 0.8.0

> Getting error when join on tables where name of table has uppercase letters
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-1973
>                 URL: https://issues.apache.org/jira/browse/HIVE-1973
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.5.0, 0.7.0
>         Environment: Hadoop 0.20.1, Hive0.5.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).
>            Reporter: Chinna Rao Lalam
>            Assignee: Chinna Rao Lalam
>             Fix For: 0.8.0
>
>         Attachments: HIVE-1973.patch
>
>
> When execute a join query on tables containing Uppercase letters in the table names hit an exception
>  Ex:
> {noformat}
>   create table a(b int);
>   create table tabForJoin(b int,c int);
>   select * from a join tabForJoin on(a.b=tabForJoin.b);
>   Got an exception like this
>   FAILED: Error in semantic analysis:  Invalid Table Alias tabForJoin
> {noformat}
> But if i give without capital letters ,It is working

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

[jira] Updated: (HIVE-1973) Getting error when join on tables where name of table has uppercase letters

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

Chinna Rao Lalam updated HIVE-1973:
-----------------------------------

    Attachment: HIVE-1973.patch

> Getting error when join on tables where name of table has uppercase letters
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-1973
>                 URL: https://issues.apache.org/jira/browse/HIVE-1973
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.5.0, 0.7.0
>         Environment: Hadoop 0.20.1, Hive0.5.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).
>            Reporter: Chinna Rao Lalam
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-1973.patch
>
>
> When execute a join query on tables containing Uppercase letters in the table names hit an exception
>  Ex:
> {noformat}
>   create table a(b int);
>   create table tabForJoin(b int,c int);
>   select * from a join tabForJoin on(a.b=tabForJoin.b);
>   Got an exception like this
>   FAILED: Error in semantic analysis:  Invalid Table Alias tabForJoin
> {noformat}
> But if i give without capital letters ,It is working

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