pvary commented on code in PR #17513:
URL: https://github.com/apache/iceberg/pull/17513#discussion_r3711542564
##########
api/src/main/java/org/apache/iceberg/types/TypeUtil.java:
##########
@@ -291,6 +291,25 @@ public static List<Types.NestedField>
ancestorFields(Schema schema, int fieldId)
return parents;
}
+ /**
+ * Returns whether a field may contain null values.
+ *
+ * <p>A field may be null if it is optional or if any field that contains it
is optional. A
Review Comment:
Do we need the second sentence?
`A required field nested in an optional struct is null whenever that struct
is null.`
Maybe something like this:
```
* Returns whether a field can evaluate to null within the given schema.
*
* <p>A field can be null if it is declared optional, or if it is nested
* inside an optional field. For example, a required field inside an
* optional struct is effectively null whenever that struct is null.
*
* <p>If the field is not present in the schema, this method returns true
* because its nullability cannot be determined.
```
--
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]