Skip to content

Commit

Permalink
[Bug] [Seatunnel-web] [HiveJDBC] Duplicate columns are displayed in s…
Browse files Browse the repository at this point in the history
…ource (#221)
  • Loading branch information
arshadmohammad authored Oct 6, 2024
1 parent 1545c3b commit 033a4b3
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,7 @@ protected List<String> getTableNames(Map<String, String> requestParams, String d
List<String> tableNames = new ArrayList<>();
try (Connection connection = getHiveConnection(requestParams)) {
ResultSet resultSet =
connection
.getMetaData()
.getTables(dbName, dbName, null, new String[] {"TABLE"});
connection.getMetaData().getTables(null, dbName, null, new String[] {"TABLE"});
while (resultSet.next()) {
String tableName = resultSet.getString("TABLE_NAME");
if (StringUtils.isNotBlank(tableName)) {
Expand All @@ -200,7 +198,7 @@ protected List<TableField> getTableFields(
try (Connection connection = getHiveConnection(requestParams)) {
DatabaseMetaData metaData = connection.getMetaData();
String primaryKey = getPrimaryKey(metaData, dbName, tableName);
ResultSet resultSet = metaData.getColumns(dbName, null, tableName, null);
ResultSet resultSet = metaData.getColumns(null, dbName, tableName, null);
while (resultSet.next()) {
TableField tableField = new TableField();
String columnName = resultSet.getString("COLUMN_NAME");
Expand Down

0 comments on commit 033a4b3

Please sign in to comment.