You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ning Zhang (JIRA)" <ji...@apache.org> on 2009/11/04 16:01:33 UTC

[jira] Created: (HIVE-912) table name in CTAS should be case-insensitive

table name in CTAS should be case-insensitive
---------------------------------------------

                 Key: HIVE-912
                 URL: https://issues.apache.org/jira/browse/HIVE-912
             Project: Hadoop Hive
          Issue Type: Bug
            Reporter: Ning Zhang
            Assignee: Ning Zhang
         Attachments: Hive-912.patch



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-912) table name in CTAS should be case-insensitive

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

Ning Zhang updated HIVE-912:
----------------------------

    Attachment: Hive-912_3.patch

Fixed the test file as commented by Namit.

> table name in CTAS should be case-insensitive
> ---------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: Hive-912.patch, Hive-912_2.patch, Hive-912_3.patch
>
>
> Table created in CTAS should be case sensitive. Currently the moveTask at the end of CTAS doesn't convert table name to lower case. This makes subsequent accessing to the table impossible since they are looking for lower case table names. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-912) table name in CTAS should be case-insensitive

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

Namit Jain commented on HIVE-912:
---------------------------------

+1

looks good

> table name in CTAS should be case-insensitive
> ---------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: Hive-912.patch, Hive-912_2.patch, Hive-912_3.patch
>
>
> Table created in CTAS should be case sensitive. Currently the moveTask at the end of CTAS doesn't convert table name to lower case. This makes subsequent accessing to the table impossible since they are looking for lower case table names. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-912) table name in CTAS should be case-insensitive

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

Namit Jain commented on HIVE-912:
---------------------------------

Can you remove the new table nzhang_Tmp in ctas.q at the end ?
Some of the tests are failing because of that.

> table name in CTAS should be case-insensitive
> ---------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: Hive-912.patch, Hive-912_2.patch
>
>
> Table created in CTAS should be case sensitive. Currently the moveTask at the end of CTAS doesn't convert table name to lower case. This makes subsequent accessing to the table impossible since they are looking for lower case table names. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-912) table name in CTAS should be case-insensitive

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

Ning Zhang updated HIVE-912:
----------------------------

    Description: Table created in CTAS should be case sensitive. Currently the moveTask at the end of CTAS doesn't convert table name to lower case. This makes subsequent accessing to the table impossible since they are looking for lower case table names.   (was: Found the issue is not only limited to CTAS, it is true for all create-table statement. Modify the title and will upload a new patch.)
        Summary: table name in CTAS should be case-insensitive  (was: table name in DDL should be case-insensitive)

> table name in CTAS should be case-insensitive
> ---------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: Hive-912.patch, Hive-912_2.patch
>
>
> Table created in CTAS should be case sensitive. Currently the moveTask at the end of CTAS doesn't convert table name to lower case. This makes subsequent accessing to the table impossible since they are looking for lower case table names. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-912) table name in CTAS should be case-insensitive

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

Namit Jain commented on HIVE-912:
---------------------------------

+1

looks good
will merge if the tests pass

> table name in CTAS should be case-insensitive
> ---------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: Hive-912.patch, Hive-912_2.patch
>
>
> Table created in CTAS should be case sensitive. Currently the moveTask at the end of CTAS doesn't convert table name to lower case. This makes subsequent accessing to the table impossible since they are looking for lower case table names. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-912) table name in DDL should be case-insensitive

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

Ning Zhang commented on HIVE-912:
---------------------------------

I think most DDL cases works fine (case insensitive). I have manually tested some and all works.  But I've seen diffs in the POSTHOOK when running unittests. Some examples are uniquejoin.q.out
    [junit] < POSTHOOK: Output: default@t1
    [junit] ---
    [junit] > POSTHOOK: Output: default@T1

My change will be to convert table names to lower case in the createTableDesc at the very beginning of analyzing DDL statement. This will guarantee all code paths using the createTableDesc will see lower cased table names. 

> table name in DDL should be case-insensitive
> --------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: Hive-912.patch
>
>
> Found the issue is not only limited to CTAS, it is true for all create-table statement. Modify the title and will upload a new patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-912) table name in DDL should be case-insensitive

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

Prasad Chakka commented on HIVE-912:
------------------------------------

are you about the regular create table stmt is case sensitive? I remember putting some unit-tests for that.

> table name in DDL should be case-insensitive
> --------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: Hive-912.patch
>
>
> Found the issue is not only limited to CTAS, it is true for all create-table statement. Modify the title and will upload a new patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-912) table name in DDL should be case-insensitive

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

Ning Zhang updated HIVE-912:
----------------------------

    Attachment: Hive-912_2.patch

I thought Oracle's syntax would be put double quote around identifiers so that they won't be interpreted as keywords (e.g. "--tablename" won't be interpretated as comment). Hive use the back single quote for that purpose. I don't know whether Oracle preseves case though. 

Anyway, I changed it back to use case-sensitive names in createTableDesc but only convert to lower case when moveTask move to a file. A new patch is attached. Also added a simple test case for non-CTAS in case there isn't one. 

> table name in DDL should be case-insensitive
> --------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: Hive-912.patch, Hive-912_2.patch
>
>
> Found the issue is not only limited to CTAS, it is true for all create-table statement. Modify the title and will upload a new patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-912) table name in DDL should be case-insensitive

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

Ning Zhang updated HIVE-912:
----------------------------

    Description: Found the issue is not only limited to CTAS, it is true for all create-table statement. Modify the title and will upload a new patch.
        Summary: table name in DDL should be case-insensitive  (was: table name in CTAS should be case-insensitive)

> table name in DDL should be case-insensitive
> --------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: Hive-912.patch
>
>
> Found the issue is not only limited to CTAS, it is true for all create-table statement. Modify the title and will upload a new patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-912) table name in CTAS should be case-insensitive

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

Ning Zhang updated HIVE-912:
----------------------------

    Attachment: Hive-912.patch

Uploading patch Hive-912.patch.

> table name in CTAS should be case-insensitive
> ---------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: Hive-912.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-912) table name in DDL should be case-insensitive

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

Namit Jain commented on HIVE-912:
---------------------------------

The changes look good - just a minor comment.
Do you need to change odbc/src/cpp/hiveclienthelper.cpp ?

Also, can you add a test for create table (not ctas) also ?


> table name in DDL should be case-insensitive
> --------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: Hive-912.patch
>
>
> Found the issue is not only limited to CTAS, it is true for all create-table statement. Modify the title and will upload a new patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-912) table name in DDL should be case-insensitive

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

Namit Jain commented on HIVE-912:
---------------------------------

Also, I remember Oracle used to support "" for preserving case sensitive stuff.
What will happen in that case with Hive ?

> table name in DDL should be case-insensitive
> --------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: Hive-912.patch
>
>
> Found the issue is not only limited to CTAS, it is true for all create-table statement. Modify the title and will upload a new patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HIVE-912) table name in CTAS should be case-insensitive

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

Namit Jain resolved HIVE-912.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 0.5.0
     Hadoop Flags: [Reviewed]

Committed. Thanks Ning

> table name in CTAS should be case-insensitive
> ---------------------------------------------
>
>                 Key: HIVE-912
>                 URL: https://issues.apache.org/jira/browse/HIVE-912
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>             Fix For: 0.5.0
>
>         Attachments: Hive-912.patch, Hive-912_2.patch, Hive-912_3.patch
>
>
> Table created in CTAS should be case sensitive. Currently the moveTask at the end of CTAS doesn't convert table name to lower case. This makes subsequent accessing to the table impossible since they are looking for lower case table names. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.