You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/07/27 14:28:49 UTC

[GitHub] [hive] nrg4878 commented on a change in pull request #2248: HIVE-25091: Implemented connector provider for MSSQL and Oracle

nrg4878 commented on a change in pull request #2248:
URL: https://github.com/apache/hive/pull/2248#discussion_r677504488



##########
File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/dataconnector/jdbc/AbstractJDBCConnectorProvider.java
##########
@@ -245,7 +248,12 @@ protected Connection getConnection() {
   private ResultSet fetchTablesViaDBMetaData(String regex) throws SQLException {
     ResultSet rs = null;
     try {
-      rs = getConnection().getMetaData().getTables(scoped_db, null, regex, new String[] { "TABLE" });
+        if (this.type.equalsIgnoreCase(IDataConnectorProvider.ORACLE_TYPE) ||

Review comment:
       Sorry if I missed this earlier or if this was recently added, but would it make sense to move this logic into the provider ? so the abstract provider will call something like getCatalog() and getSchema() which will return whatever is appropriate. Maybe the abstract provider can provide the default and providers can override the method. or maybe just add a util method in this class (not abstract) that returns the values for all the DBs.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org