nastra commented on a change in pull request #4372:
URL: https://github.com/apache/iceberg/pull/4372#discussion_r832370839
##########
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:
maybe change it to `Preconditions.checkArgument(null != field, "Cannot
use fieldId %s: field does not exist", fieldId);`
--
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]