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


##########
api/src/main/java/org/apache/iceberg/types/TypeUtil.java:
##########
@@ -222,6 +222,30 @@ public static Map<Integer, Integer> 
indexParents(Types.StructType struct) {
     return ImmutableMap.copyOf(visit(struct, new IndexParents()));
   }
 
+  /**
+   * Searches in the given schema for all parent fields of the given field ID. 
If the field ID is
+   * defined in a nested type, then all of its parent fields are returned. If 
the field ID is not
+   * nested, an empty list is returned.
+   *
+   * @param schema The schema to search for the field ID
+   * @param fieldId The field ID to find the parents of
+   * @return A list of all parent fields of the given field ID if the field ID 
points to a nested
+   *     field. If the field ID is not a nested field, then an empty list is 
returned.
+   */
+  public static List<Types.NestedField> findParents(Schema schema, int 
fieldId) {

Review Comment:
   nit: method name `ancestorFields`?



##########
api/src/main/java/org/apache/iceberg/expressions/UnboundPredicate.java:
##########
@@ -155,6 +158,11 @@ private Expression bindUnaryOperation(BoundTerm<T> 
boundTerm) {
     }
   }
 
+  private boolean allParentFieldsAreRequired(StructType struct, int fieldId) {

Review Comment:
   nit: `allAncestorFieldsAreRequired`



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