You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Prasad Chakka (JIRA)" <ji...@apache.org> on 2010/02/17 19:16:28 UTC

[jira] Created: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

'create if not exists' fails for a table name with 'select' in it
-----------------------------------------------------------------

                 Key: HIVE-1176
                 URL: https://issues.apache.org/jira/browse/HIVE-1176
             Project: Hadoop Hive
          Issue Type: Bug
          Components: Metastore, Query Processor
            Reporter: Prasad Chakka



hive> create table if not exists tmp_select(s string, c string, n int);
org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
        at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
        at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
        at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
        at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
        at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
        at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
        ... 15 more

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


[jira] Updated: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar updated HIVE-1176:
-----------------------------------

    Attachment: HIVE-1176-4.patch

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Paul Yang commented on HIVE-1176:
---------------------------------

@John - good point! In which case, we'll probably need to fix up some of the other unit tests with a create table.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

@Paul: I just tested the patch (HIVE-1176-2.patch) on latest trunk and it seems to apply cleanly. Can you please try again and see if it works? Also, can you post the errors that you are seeing? If necessary, I can break down the patch into single-file units to help with applying it. Just let me know either way.


> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Updated: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar updated HIVE-1176:
-----------------------------------

    Attachment: HIVE-1176.patch
                HIVE-1176.lib-files.tar.gz

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>         Attachments: HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Updated: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

John Sichi updated HIVE-1176:
-----------------------------

           Status: Resolved  (was: Patch Available)
     Hadoop Flags: [Reviewed]
    Fix Version/s: 0.7.0
       Resolution: Fixed

Committed.  Thanks Arvind!


> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0, 0.7.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176-5.patch, HIVE-1176-6.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Updated: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar updated HIVE-1176:
-----------------------------------

    Attachment: HIVE-1176-6.patch

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176-5.patch, HIVE-1176-6.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Paul Yang commented on HIVE-1176:
---------------------------------

I was going to look at it again today, but looks like I'll get to it around mid-day tomorrow? Will keep this posted.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Paul Yang commented on HIVE-1176:
---------------------------------

Can you elaborate on what you mean by 'some collections were being fetched as semi-populated proxies with missing session context leading to NPEs'? Is there something I can do to reproduce this?

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>         Attachments: HIVE-1176-1.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Updated: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Carl Steinbach updated HIVE-1176:
---------------------------------

      Description: 
hive> create table if not exists tmp_select(s string, c string, n int);
org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
        at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
        at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
        at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
        at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
        at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
        at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
        ... 15 more

  was:

hive> create table if not exists tmp_select(s string, c string, n int);
org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
        at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
        at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
        at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
        at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
        at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
        at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
        ... 15 more

    Fix Version/s:     (was: 0.7.0)

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176-5.patch, HIVE-1176-6.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

John Sichi commented on HIVE-1176:
----------------------------------

Just one more change needed...please add an ORDER BY to the select in the testcase.  This is required to avoid spurious diffs later since without ORDER BY, the query result order is non-deterministic.

After that I'll run through tests and commit.


> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Updated: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar updated HIVE-1176:
-----------------------------------

    Attachment: HIVE-1176-3.patch

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

@Paul: You suggestions are fair enough. I have incorporated all changes you suggested except for the pre-drop based on @John's response. Let me know if you guys need any further tweaking of this patch.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

bq. Can you elaborate on what you mean by 'some collections were being fetched as semi-populated proxies with missing session context leading to NPEs'? Is there something I can do to reproduce this?

@Paul: Here are the steps to reproduce this problem:

# Startout with a clean workspace checkout and apply the updated patch HIVE-1176-2.patch. 
# Manually revert the file {{metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java}} to its previous state
# run {{ant package}} from the root of the workspace
# run {{ant test}} from within metastore

You should see failures like the following:
{code}
    [junit] testPartition() failed.
    [junit] java.lang.NullPointerException
    [junit] 	at org.datanucleus.store.mapped.scostore.AbstractMapStore.validateKeyForWriting(AbstractMapStore.java:333)
    [junit] 	at org.datanucleus.store.mapped.scostore.JoinMapStore.put(JoinMapStore.java:252)
    [junit] 	at org.datanucleus.sco.backed.Map.put(Map.java:640)
    [junit] 	at org.apache.hadoop.hive.metastore.api.Table.putToParameters(Table.java:359)
    [junit] 	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table(HiveMetaStore.java:1281)
    [junit] 	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.alter_table(HiveMetaStoreClient.java:140)
    [junit] 	at org.apache.hadoop.hive.metastore.TestHiveMetaStore.testAlterTable(TestHiveMetaStore.java:728)
    [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    ...
{code}

If you look at {{src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java}} you would notice that the line causing this exception should ideally be a {{HashMap}} and not an {{org.datanucleus.store.mapped.scostore.AbstractMapStore}} as indicated by the stack trace. This happens because the datanucleus JDO framework replaces collections with its own implementation in order to allow lazy-dereferencing and optimize for database connections/queries/memory consumption etc.

Lazy loading of collections (and second class objects in general) can be disabled at a global level or at entity level. Disabling this globally is generally not recommended unless there is evidence backed by extensive testing that supports that change. Disabling at an entity level is still OK provided the entity object graph is fully dereferenced at all times. This could lead to extensive memory consumption in the system in case the entity graph is huge. 

My approach towards fixing the problem was to *not* change the default behavior in the general case. Instead I felt that it was better to circumvent this problem in the case of a remote metastore by creating a copy explicitly. If you have other suggestions on how to address this, please let me know.

Also - more information on the lazy dereferencing mechanism used by datanucleus framework can be found [here|http://www.datanucleus.org/plugins/core/sco.html].


> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Paul Yang commented on HIVE-1176:
---------------------------------

For some reason, I don't see the JDO files being deleted after applying the patch:

{code}
?      build.xml.orig
?      HIVE-1176-2.patch
?      test.log
M      eclipse-templates/.classpath
M      build.properties
M      build.xml
?      metastore/test.log
M      metastore/ivy.xml
M      metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
!      lib/jdo2-api-2.3-SNAPSHOT.LICENSE
!      lib/datanucleus-rdbms-1.1.2.LICENSE
!      lib/datanucleus-enhancer-1.1.2.LICENSE
!      lib/datanucleus-core-1.1.2.LICENSE
M      ivy/ivysettings.xml
{code}

Also, the patch works for branch 0.6 but not for trunk. Can you regenerate it?

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Paul Yang commented on HIVE-1176:
---------------------------------

@Arvind - While the test that you added is thorough, I think for this case, we might be able to get by with something simpler / faster? 

e.g.
* Use one of the existing source files or insert from an existing table like 'src'. 
* Limit to one select statement / table as we test select more extensively in other unit tests. 
* Remove the drop table statements in the beginning, as other tests aren't supposed to leave tables around at the end of their run. 
* Rename the query file to something more descriptive. This would help developers browsing the list of tests.

We don't want to sacrifice coverage, but at the same time, the whole suite of tests take quite a while to execute.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Paul Yang commented on HIVE-1176:
---------------------------------

Looks good to me

+1

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Paul Yang commented on HIVE-1176:
---------------------------------

To clarify, I am referring to the jars under /lib that should be deleted along with the *.LICENSE files.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Updated: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar updated HIVE-1176:
-----------------------------------

    Attachment: HIVE-1176-5.patch

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176-5.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Carl Steinbach commented on HIVE-1176:
--------------------------------------

@Arvind: Can you explain what the difference is between OSX sed and GNU sed? Can we rewrite the sed script so that it works on both platforms? Seems like we are probably relying on a non-POSIX feature that is present in the GNU version.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>         Attachments: HIVE-1176-1.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

John Sichi commented on HIVE-1176:
----------------------------------

What failures are you seeing on trunk for input20.q and input33.q?  I do see recent Hudson sporadic failures for the flaky negative tests script_broken_pipe1 and loadpart_err, but not input20.q and input33.q.

http://hudson.zones.apache.org/hudson/job/Hive-trunk-h0.20/


> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>         Attachments: HIVE-1176-1.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

Makes sense. Will add a test case and update the patch soon. Sorry for the misunderstanding.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

The updated patch HIVE-1176-2.patch contains the following changes:

#	modified:   build.properties
#	modified:   build.xml
#	modified:   eclipse-templates/.classpath
#	modified:   ivy/ivysettings.xml
#	deleted:    lib/datanucleus-core-1.1.2.LICENSE
#	deleted:    lib/datanucleus-core-1.1.2.jar
#	deleted:    lib/datanucleus-enhancer-1.1.2.LICENSE
#	deleted:    lib/datanucleus-enhancer-1.1.2.jar
#	deleted:    lib/datanucleus-rdbms-1.1.2.LICENSE
#	deleted:    lib/datanucleus-rdbms-1.1.2.jar
#	deleted:    lib/jdo2-api-2.3-SNAPSHOT.LICENSE
#	deleted:    lib/jdo2-api-2.3-SNAPSHOT.jar
#	modified:   metastore/ivy.xml
#	modified:   metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

John Sichi commented on HIVE-1176:
----------------------------------

+1.  Will commit when tests pass.


> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176-5.patch, HIVE-1176-6.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Updated: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar updated HIVE-1176:
-----------------------------------

      Status: Patch Available  (was: Open)
    Assignee: Arvind Prabhakar

This problem is due to [a bug in Datanucleus JDOQL|http://www.jpox.org/servlet/jira/browse/NUCCORE-427] implementation and has been fixed in version 2.0.x.

The fix is therefore to upgrade datanucleus plugins to the latest stable release.

*Details:*
- Replaced the old datanucleus plugins version 1.1.2 with the latest stable release.
- Updated jdo2-api library with the version required by datanucleus - 2.3-0ec, available from datanucleus maven repository at http://www.datanucleus.org/downloads/maven2/javax/jdo/jdo2-api/2.3-ec/, Apache licensed
- Modified the build files to suppress auto-enhancement of all complied classes, a new feature introduced in the latest version.
- Modified the HiveMetaStoreClient implementation to create deep-copies of non-primitive objects being returned from the thrift server. Without this change, some collections were being fetched as semi-populated proxies with missing session context leading to NPEs.

*Testing Done:*
Built and ran all tests. Only two failures were reported - clientpositive test for input20.q and input33.q. These tests appear to be failing on the trunk as well.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>         Attachments: HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

Also, for the specific change to {{HiveMetaStoreClient.java}} - the tests under {{metastore}} validate that the new libraries are working correctly. 

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Paul Yang commented on HIVE-1176:
---------------------------------

Tried it again, and yep, it works. Not sure what happened before. Anyway though, yeah I do see the NPE's that you mentioned. Why did this not occur before? Just changes in behavior between major versions?

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

John Sichi commented on HIVE-1176:
----------------------------------

Paul, we currently do pre-drops in the test to avoid collisions in case other tests fail, or if a negative test happens to use the same table name since there's currently no way for a negative test to clean up after itself.  It would be better if our test framework automatically cleaned out the catalog at the beginning of each test, but until we have that, pre-drop is required.


> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

@John: done. Please see the new patch attachment -  HIVE-1176-5.patch

Since a lot of good points came out of the discussion on this jira, I took the liberty of adding them to the Hive wiki for posterity. You can find it [here|http://wiki.apache.org/hadoop/Hive/TipsForAddingNewTests]. Please add to it any other points that you feel contributors should take into consideration while adding new tests.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176-5.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

John Sichi commented on HIVE-1176:
----------------------------------

Thanks for the doc Arvind.  

But for the patch:  we need the ORDER BY on the SELECT that produces results in the output log (not the INSERT).

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176-5.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Paul Yang commented on HIVE-1176:
---------------------------------

Nevermind - JVS pointed out that jars are skipped as they are binary files.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

Yes - it appears that the change in behavior can be attributed to the difference in major versions.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

@Paul: Any updates on this from your end? Thanks.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

Updated the patch so that it cleanly applies to the trunk. 

*Changes from Previous Patch:*

* This patch uses ivy to download the updated datanucleus plugins and other dependent libraries. There is no need to use the previously supplied tar.gz anymore.
* At the time the previous patch was written, the enhancer plugin version was 2.0.1 which by default would enable annotation processing. Since then version 2.0.3 has been released which [disables this behavior|http://www.datanucleus.org/servlet/jira/browse/NUCENHANCER-56]. Hence the previously submitted changes to {{javac.args}} in build.properties file are no longer necessary. This patch uses the updated version of the datanucleus enhancer plugin.
* The JDO2 API library used by datanucleus plugin is distributed by the datanucleus's public maven repository. This repository has been added to ivy configuration to automate the download.
* The connection pool libraries have been updated to work with the newer datanucleus plugins. Library {{commons-dbcp}} has been updated from 1.2.2 to 1.4, {{commons-pool}} from 1.2 to 1.5.4, and {{datanucleus-connectionpool}} from 1.0.2 to 2.0.1.
* As with the previously submitted patch, {{HiveMetaStoreClient}} implementation has been modified to create deep-copies of non-primitive objects being returned from the thrift server in order to avoid semi-populated proxies causing NPEs downstream.

*Testing Done:*

Built and ran all tests. Only two failures were reported as before - clientpositive test for input20.q and input33.q. These tests appear to be failing on the trunk as well.


> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>         Attachments: HIVE-1176-1.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

John - I debugged the failures that I was seeing for input20 and input33 and it turns out to be a subtle difference in the way the stream editor {{sed}} works on Mac vs the regular linux distribution. I installed the GNU port for {{sed}} and the failures no longer occur.

I don't think this is related to the sporadic failures that are reported on hudson.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>         Attachments: HIVE-1176-1.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

Sorry - it is not clear to me what unit test should I be writing. Can you give an example perhaps?

>From my perspective, any test that uses the metastore exercises this change. And together, all the tests form an exhaustive layer that ensures that there is no regression seeping into the system. Note that this is not a functionality change, only a change of underlying libraries. 

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Ashish Thusoo commented on HIVE-1176:
-------------------------------------

my bad. There is already a test case :)

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

yes - thats what my intention was. Thanks for catching it.


> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176-4.patch, HIVE-1176-5.patch, HIVE-1176-6.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

Updated patch with a test case attached. Please use HIVE-1176-3.patch. The changed files in this patch are as follows:


#	modified:   build.properties
#	modified:   build.xml
#	new file:   data/files/simple.txt
#	modified:   eclipse-templates/.classpath
#	modified:   ivy/ivysettings.xml
#	deleted:    lib/datanucleus-core-1.1.2.LICENSE
#	deleted:    lib/datanucleus-core-1.1.2.jar
#	deleted:    lib/datanucleus-enhancer-1.1.2.LICENSE
#	deleted:    lib/datanucleus-enhancer-1.1.2.jar
#	deleted:    lib/datanucleus-rdbms-1.1.2.LICENSE
#	deleted:    lib/datanucleus-rdbms-1.1.2.jar
#	deleted:    lib/jdo2-api-2.3-SNAPSHOT.LICENSE
#	deleted:    lib/jdo2-api-2.3-SNAPSHOT.jar
#	modified:   metastore/ivy.xml
#	modified:   metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
#	new file:   ql/src/test/queries/clientpositive/hive_1176.q
#	new file:   ql/src/test/results/clientpositive/hive_1176.q.out


> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176-3.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar commented on HIVE-1176:
----------------------------------------

I think the difference is more likely a bug in Mac OSX version of {{sed}}. Specifically, it fails to process directives with escaped tab sequence characters and instead treats it as unescaped. For example, the command to replace first occurrence of *b* in the string *abc* with a tab character *\t* fails as shown below:

{code}
$ echo "abc" | /usr/bin/sed "s@b@\t@"
atc
{code}

Whereas this works fine with the GNU distribution of sed

{code}
$ echo "abc" | /opt/local/bin/sed "s@b@\t@"
a	c
{code}

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>         Attachments: HIVE-1176-1.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Updated: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar updated HIVE-1176:
-----------------------------------

    Attachment: HIVE-1176-1.patch

This patch replaces the patch submitted before (HIVE-1176.lib-files.tar.gz and HIVE-1176.patch).

{code}
HIVE-1176-1.patch:

#	modified:   build.properties
#	modified:   build.xml
#	modified:   eclipse-templates/.classpath
#	modified:   ivy/ivysettings.xml
#	deleted:    lib/datanucleus-core-1.1.2.LICENSE
#	deleted:    lib/datanucleus-core-1.1.2.jar
#	deleted:    lib/datanucleus-enhancer-1.1.2.LICENSE
#	deleted:    lib/datanucleus-enhancer-1.1.2.jar
#	deleted:    lib/datanucleus-rdbms-1.1.2.LICENSE
#	deleted:    lib/datanucleus-rdbms-1.1.2.jar
#	deleted:    lib/jdo2-api-2.3-SNAPSHOT.LICENSE
#	deleted:    lib/jdo2-api-2.3-SNAPSHOT.jar
#	modified:   metastore/ivy.xml
#	modified:   metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
{code}

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>         Attachments: HIVE-1176-1.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Paul Yang commented on HIVE-1176:
---------------------------------

Oh, but I thought the original problem (as per title) was an exception with 'create table if not exists tmp_select(s string, c string, n int)'?

So maybe something like:

CREATE TABLE IF NOT EXISTS tmp_select(s STRING, c STRING, n INT);
DROP TABLE tmp_select;


> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Updated: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Arvind Prabhakar updated HIVE-1176:
-----------------------------------

    Attachment: HIVE-1176-2.patch

Updating the patch with latest trunk image. This is necessary since HIVE-1373 updated the eclipse classpath with connection pool libraries which will be outdated with the application of this patch. The updated version of the patch takes care of this problem by updating eclipse classpath to use the updated libraries instead. Tested out launch configuration via eclipse to make sure it is working.

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Ashish Thusoo commented on HIVE-1176:
-------------------------------------

Can you provide a reproducible test case for this bug?

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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


[jira] Commented: (HIVE-1176) 'create if not exists' fails for a table name with 'select' in it

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

Paul Yang commented on HIVE-1176:
---------------------------------

One last thing, can you include a unit test to verify the fix?

> 'create if not exists' fails for a table name with 'select' in it
> -----------------------------------------------------------------
>
>                 Key: HIVE-1176
>                 URL: https://issues.apache.org/jira/browse/HIVE-1176
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>            Reporter: Prasad Chakka
>            Assignee: Arvind Prabhakar
>             Fix For: 0.6.0
>
>         Attachments: HIVE-1176-1.patch, HIVE-1176-2.patch, HIVE-1176.lib-files.tar.gz, HIVE-1176.patch
>
>
> hive> create table if not exists tmp_select(s string, c string, n int);
> org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:441)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern(Hive.java:423)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeCreateTable(SemanticAnalyzer.java:5538)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5192)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: MetaException(message:Got exception: javax.jdo.JDOUserException JDOQL Single-String query should always start with SELECT)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:612)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaStoreClient.java:450)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTablesForDb(Hive.java:439)
>         ... 15 more

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