flyrain commented on code in PR #4683:
URL: https://github.com/apache/iceberg/pull/4683#discussion_r869758662
##########
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 idToPosition(int fieldId) {
+ for (int i = 0; i < struct.fields().size(); i++) {
Review Comment:
yeah, I don't have to have this method in that case, thanks for the
suggestion! I can do
```
this.columnIsDeletedPosition =
requestedSchema.columns().indexOf(MetadataColumns.IS_DELETED.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]