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

[jira] [Created] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

Carl Steinbach created HIVE-3121:
------------------------------------

             Summary: JDBC driver's getCatalogs() method returns schema/db information
                 Key: HIVE-3121
                 URL: https://issues.apache.org/jira/browse/HIVE-3121
             Project: Hive
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 0.9.0
            Reporter: Carl Steinbach




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

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

Richard Ding updated HIVE-3121:
-------------------------------

    Status: Patch Available  (was: Open)

patch attached.
                
> JDBC driver's getCatalogs() method returns schema/db information
> ----------------------------------------------------------------
>
>                 Key: HIVE-3121
>                 URL: https://issues.apache.org/jira/browse/HIVE-3121
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>         Attachments: hive-3121.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

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

Prasad Mujumdar commented on HIVE-3121:
---------------------------------------

Looks fine to me overall. A few minor comments/suggestions
- getSchemaTerm() should return "schema"
- getCatalogTerm() should return ""
- I think it would be helpful to rename the getTableCatalog() in JdbcColumn and JdbcTable classes

                
> JDBC driver's getCatalogs() method returns schema/db information
> ----------------------------------------------------------------
>
>                 Key: HIVE-3121
>                 URL: https://issues.apache.org/jira/browse/HIVE-3121
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>         Attachments: hive-3121.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

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

Richard Ding commented on HIVE-3121:
------------------------------------

@Carl: code review request is posted. Should the request be automatically posted to the jira?
                
> JDBC driver's getCatalogs() method returns schema/db information
> ----------------------------------------------------------------
>
>                 Key: HIVE-3121
>                 URL: https://issues.apache.org/jira/browse/HIVE-3121
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>         Attachments: hive-3121.patch, hive-3121_1.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

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

Carl Steinbach commented on HIVE-3121:
--------------------------------------

@Richard: Please post a code review request on reviews.apache.org. Thanks.
                
> JDBC driver's getCatalogs() method returns schema/db information
> ----------------------------------------------------------------
>
>                 Key: HIVE-3121
>                 URL: https://issues.apache.org/jira/browse/HIVE-3121
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>         Attachments: hive-3121.patch, hive-3121_1.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

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

Richard Ding updated HIVE-3121:
-------------------------------

    Attachment: hive-3121.patch
    
> JDBC driver's getCatalogs() method returns schema/db information
> ----------------------------------------------------------------
>
>                 Key: HIVE-3121
>                 URL: https://issues.apache.org/jira/browse/HIVE-3121
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>         Attachments: hive-3121.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

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

Carl Steinbach commented on HIVE-3121:
--------------------------------------

@Richard: That would be great! Can you please attach your patch? Thanks.
                
> JDBC driver's getCatalogs() method returns schema/db information
> ----------------------------------------------------------------
>
>                 Key: HIVE-3121
>                 URL: https://issues.apache.org/jira/browse/HIVE-3121
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

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

Richard Ding commented on HIVE-3121:
------------------------------------

+1

We have implemented the following and will be happy to contribute the patch.

{code}
DatabaseMetaData::getCatalogs()  ==>  return EMPTY ResultSet

DatabaseMetaData::getSchemas()  ==>  return HiveInterface::get_all_databases()

DatabaseMetaData::getTables(...)  ==>  Always ignore catalog argument.
{code} 




                
> JDBC driver's getCatalogs() method returns schema/db information
> ----------------------------------------------------------------
>
>                 Key: HIVE-3121
>                 URL: https://issues.apache.org/jira/browse/HIVE-3121
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

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

Richard Ding commented on HIVE-3121:
------------------------------------

I posted review request here: https://reviews.apache.org/r/5490/
                
> JDBC driver's getCatalogs() method returns schema/db information
> ----------------------------------------------------------------
>
>                 Key: HIVE-3121
>                 URL: https://issues.apache.org/jira/browse/HIVE-3121
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>            Assignee: Richard Ding
>         Attachments: hive-3121_1.patch, hive-3121.patch
>
>


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

[jira] [Commented] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

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

Carl Steinbach commented on HIVE-3121:
--------------------------------------

@Richard: Sorry for the slow response. Unfortunately the code review link does not get automatically posted to JIRA. Can you please paste the link here? Thanks.
                
> JDBC driver's getCatalogs() method returns schema/db information
> ----------------------------------------------------------------
>
>                 Key: HIVE-3121
>                 URL: https://issues.apache.org/jira/browse/HIVE-3121
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>            Assignee: Richard Ding
>         Attachments: hive-3121_1.patch, hive-3121.patch
>
>


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

[jira] [Updated] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

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

Richard Ding updated HIVE-3121:
-------------------------------

    Attachment: hive-3121_1.patch

Thanks Prasad. Attaching patch to address comments.
                
> JDBC driver's getCatalogs() method returns schema/db information
> ----------------------------------------------------------------
>
>                 Key: HIVE-3121
>                 URL: https://issues.apache.org/jira/browse/HIVE-3121
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>         Attachments: hive-3121.patch, hive-3121_1.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

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

Richard Ding updated HIVE-3121:
-------------------------------

    Assignee: Richard Ding
    
> JDBC driver's getCatalogs() method returns schema/db information
> ----------------------------------------------------------------
>
>                 Key: HIVE-3121
>                 URL: https://issues.apache.org/jira/browse/HIVE-3121
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>            Assignee: Richard Ding
>         Attachments: hive-3121_1.patch, hive-3121.patch
>
>


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

[jira] [Commented] (HIVE-3121) JDBC driver's getCatalogs() method returns schema/db information

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

Carl Steinbach commented on HIVE-3121:
--------------------------------------

HiveDatabaseMetadata.getCatalogs() currently returns the list of databases/schemas defined in the metastore, which is incorrect. In fact, HiveDatabaseMetadata.getSchemas() should return this information, and getCatalogs() should return an empty result set. Hive currently doesn't implement the concept of a catalog, and instead borrowed MySQL's convention of using both DATABASE and SCHEMA to identify the same class of catalog objects that allow you to partition your tables into separate namespaces.

This blurb (http://stackoverflow.com/questions/7942520/relationship-between-catalog-schema-user-and-database-instance) probably does a better job of summarizing these relationships:

{quote}
In MySQL:

* server instance == catalog == set of schemas managed by same execution engine
* schema == database == a namespace within the server where tables are stored
* user == named account, who can connect to server and use objects in database or in other dbs
* to identify any object you need (schema name + object name)
{quote}

                
> JDBC driver's getCatalogs() method returns schema/db information
> ----------------------------------------------------------------
>
>                 Key: HIVE-3121
>                 URL: https://issues.apache.org/jira/browse/HIVE-3121
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira