szehon-ho commented on a change in pull request #4372:
URL: https://github.com/apache/iceberg/pull/4372#discussion_r831759668
##########
File path: api/src/main/java/org/apache/iceberg/Schema.java
##########
@@ -109,6 +109,8 @@ public Schema(int schemaId, List<NestedField> columns,
Map<String, Integer> alia
static void validateIdentifierField(int fieldId, Map<Integer,
Types.NestedField> idToField,
Map<Integer, Integer>
idToParent) {
Types.NestedField field = idToField.get(fieldId);
+ Preconditions.checkArgument(field != null,
+ "Can not add filedId %d as an identifier field: field not exists",
fieldId);
Review comment:
Typo 'fileId'. Should we put something like 'field with id %s'?
Also, I thought Preconditions only supports %s, does this actually work?
https://javadoc.io/doc/com.google.guava/guava/latest/com/google/common/base/Preconditions.html
--
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]