flyrain commented on code in PR #4683:
URL: https://github.com/apache/iceberg/pull/4683#discussion_r866194048


##########
api/src/main/java/org/apache/iceberg/Schema.java:
##########
@@ -381,6 +381,22 @@ public String idToAlias(Integer fieldId) {
     return null;
   }
 
+  /**
+   * Returns the index of the given field id.
+   *
+   * @param fieldId a column id in this schema
+   * @return the index of the field in the schema, or -1 if one wasn't found
+   */
+  public int idToIndex(Integer fieldId) {

Review Comment:
   Even this place uses `int`, I'd prefer to use `int` for the parameter as 
well. It is unnecessary to do this boxing and unboxing.
   
https://github.com/apache/iceberg/blob/44c1d00b37f0d7fc2e978baad4f7a861a8335cf0/api/src/main/java/org/apache/iceberg/types/Types.java#L479



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

Reply via email to