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 2022/08/01 12:54:57 UTC
[GitHub] [hive] kasakrisz commented on a diff in pull request #3470: HIVE-26350: IndexOutOfBoundsException when generating splits for external JDBC table with partition column
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: 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