You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by blrunner <gi...@git.apache.org> on 2016/03/30 08:20:15 UTC

[GitHub] tajo pull request: TAJO-2103: JdbcMetadataProviderBase need to dif...

GitHub user blrunner opened a pull request:

    https://github.com/apache/tajo/pull/990

    TAJO-2103: JdbcMetadataProviderBase need to differentiate between database name in DBMS and database name in Tajo.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/blrunner/tajo jdbc-mapped-database

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tajo/pull/990.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #990
    
----
commit 5d8bfcc1bedc0de0dff82aa22784ca5286cb4662
Author: JaeHwa Jung <bl...@apache.org>
Date:   2016-03-28T04:31:41Z

    Add mappedDatabaseName to JdbcMetadataProviderBase

commit 81f6e6ff53dd498a36e76c25285e28c6ce662e1f
Author: JaeHwa Jung <bl...@apache.org>
Date:   2016-03-28T05:05:03Z

    Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into jdbc-mapped-database

commit 809fb3de39d7ec9ef253df015bae9fbe60412414
Author: JaeHwa Jung <bl...@apache.org>
Date:   2016-03-30T01:20:28Z

    Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into jdbc-mapped-database

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-2103: JdbcMetadataProviderBase need to dif...

Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on the pull request:

    https://github.com/apache/tajo/pull/990#issuecomment-219886726
  
    Could you explain the purpose of this patch? 
    
    See setDatabase() in the below. The variable 'database' already contains 'mapped_dbname'.
    ```
    public JdbcTablespace(String name, URI uri, JSONObject config) {
        super(name, uri, config);
        setDatabase();
        setJdbcProperties();
      }
    
      private void setDatabase() {
        if (config.containsKey(CONFIG_KEY_MAPPED_DATABASE)) {
          database = this.config.getAsString(CONFIG_KEY_MAPPED_DATABASE);
        } else {
          database = ConnectionInfo.fromURI(uri).database();
        }
      }
    ```
    
    But, your patch changes as the below. It's a duplicate.
    ```
    public MetadataProvider getMetadataProvider() {
       return new PgSQLMetadataProvider(this, database, ConnectionInfo.fromURI(uri).database());
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---