kbendick commented on a change in pull request #3531:
URL: https://github.com/apache/iceberg/pull/3531#discussion_r747699817
##########
File path:
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveSchemaConverter.java
##########
@@ -64,7 +64,7 @@ static Type convert(TypeInfo typeInfo, boolean autoConvert) {
List<Types.NestedField> result = new ArrayList<>(names.size());
for (int i = 0; i < names.size(); ++i) {
result.add(Types.NestedField.optional(id++, names.get(i),
convertType(typeInfos.get(i)),
- comments.isEmpty() ? null : comments.get(i)));
+ comments.isEmpty() || i >= comments.size() ? null :
comments.get(i)));
Review comment:
Nit: Possibly add surrounding braces since this ternary is inline as an
argument.
--
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]