RussellSpitzer commented on a change in pull request #1336:
URL: https://github.com/apache/iceberg/pull/1336#discussion_r470402797



##########
File path: api/src/main/java/org/apache/iceberg/types/IndexByName.java
##########
@@ -128,9 +157,15 @@ private void addField(String name, int fieldId) {
     }
 
     Integer existingFieldId = nameToId.put(fullName, fieldId);
-    if (existingFieldId != null && !"element".equals(name) && 
!"value".equals(name)) {
-      throw new ValidationException(
-          "Invalid schema: multiple fields for name %s: %s and %s", fullName, 
existingFieldId, fieldId);
+    ValidationException.check(existingFieldId == null,
+        "Invalid schema: multiple fields for name %s: %s and %s", fullName, 
existingFieldId, fieldId);
+
+    // if the short name is not

Review comment:
       unfinished comment?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to