rdblue commented on code in PR #4525:
URL: https://github.com/apache/iceberg/pull/4525#discussion_r863326742
##########
api/src/main/java/org/apache/iceberg/types/Types.java:
##########
@@ -473,7 +494,11 @@ public NestedField asRequired() {
if (!isOptional) {
return this;
}
- return new NestedField(false, id, name, type, doc);
+ return new NestedField(false, id, name, type, doc, initialDefault,
writeDefault);
+ }
+
+ public NestedField updateWriteDefault(Object newWriteDefault) {
Review Comment:
There's precedent for returning a slightly modified version of the field
with the `asRequired` and `asOptional` methods, but this method name doesn't
make it clear to me that the original field isn't being modified. I think
`withWriteDefault` is slightly better, although not great.
--
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]