Skip to content

Commit

Permalink
HIVE-15540: Impl DatabaseMetaData#getURL() and `DatabaseMetaData#ge…
Browse files Browse the repository at this point in the history
…tUserName()` for HiveServer2 JDBC Driver
  • Loading branch information
linghengqian committed Nov 22, 2024
1 parent afe05b9 commit 598a367
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -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().getHiveConfs().get("user");
}

public ResultSet getVersionColumns(String catalog, String schema, String table)
Expand Down

0 comments on commit 598a367

Please sign in to comment.