kasakrisz commented on code in PR #3470:
URL: https://github.com/apache/hive/pull/3470#discussion_r934483714
##########
jdbc-handler/src/main/java/org/apache/hive/storage/jdbc/dao/GenericJdbcDatabaseAccessor.java:
##########
@@ -89,23 +92,76 @@ public List<String> getColumnNames(Configuration conf)
throws HiveJdbcDatabaseAc
ResultSetMetaData metadata = rs.getMetaData();
int numColumns = metadata.getColumnCount();
- List<String> columnNames = new ArrayList<String>(numColumns);
+ List<T> columnMeta = new ArrayList<>(numColumns);
for (int i = 0; i < numColumns; i++) {
- columnNames.add(metadata.getColumnName(i + 1));
+ columnMeta.add(colAccessor.get(metadata, i + 1));
}
- return columnNames;
+ return columnMeta;
}
catch (Exception e) {
- LOGGER.error("Error while trying to get column names.", e);
- throw new HiveJdbcDatabaseAccessException("Error while trying to get
column names: " + e.getMessage(), e);
+ throw new HiveJdbcDatabaseAccessException("", e);
Review Comment:
nit
```
throw new HiveJdbcDatabaseAccessException(e);
```
or
```
throw new HiveJdbcDatabaseAccessException("Error while trying to get column
metadata", e);
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]