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


##########
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:
   `idToPosition`?  `position` might be more clear. 
   
   Also we are using `Integer` arg type, which means it can be null. Probably 
following the pattern from the `idToAlias ` above. But I am wondering if the 
`fieldId` arg should be primitive `int` type. 
   
   Also, should the return type be `Integer` and nullable just to be consistent 
with other methods in this class?



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