InvisibleProgrammer commented on code in PR #5554:
URL: https://github.com/apache/hive/pull/5554#discussion_r1854054288


##########
jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java:
##########
@@ -744,12 +744,12 @@ public <T> T getObject(int columnIndex, Class<T> type) 
throws SQLException {
     };
   }
 
-  public String getURL() throws SQLException {
-    throw new SQLFeatureNotSupportedException("Method not supported");
+  public String getURL() {
+    return connection.getConnectedUrl();
   }
 
   public String getUserName() throws SQLException {
-    throw new SQLFeatureNotSupportedException("Method not supported");
+    return connection.getConnParams().getSessionVars().get("user");

Review Comment:
   > HiveConnection#getSessionValue(String, String) and 
HiveConnection#getUserName() are both private methods. I guess what you mean is?
   
   Yes, something like that. 
   
   > Changing the org.apache.hive.jdbc.TestJdbcDriver doesn't seem intuitive 
enough, should I create a org.apache.hive.jdbc.TestHiveDatabaseMetaData class?
   
   Excuse me, wrong copy-paste. So, there is already a test class here: 
https://github.com/apache/hive/blob/master/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestHiveDatabaseMetaData.java
   
   



-- 
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-unsubscr...@hive.apache.org

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


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

Reply via email to