rzhang10 commented on code in PR #6004:
URL: https://github.com/apache/iceberg/pull/6004#discussion_r1005324713


##########
api/src/main/java/org/apache/iceberg/types/Types.java:
##########
@@ -412,43 +412,75 @@ public int hashCode() {
 
   public static class NestedField implements Serializable {
     public static NestedField optional(int id, String name, Type type) {
-      return new NestedField(true, id, name, type, null);
+      return new NestedField(true, id, name, type, null, null, null);
     }
 
     public static NestedField optional(int id, String name, Type type, String 
doc) {
-      return new NestedField(true, id, name, type, doc);
+      return new NestedField(true, id, name, type, doc, null, null);
+    }
+
+    public static NestedField optional(

Review Comment:
   The reason is that I need to instantiate a `NestedField` with default value 
in the `TestReadDefaultValues` class, but this class lives in the iceberg-data 
module , which is not the same package as `types.java` in the API module.
   
   I can annotate this method as `VisibleForTesting` and/or `Beta` , do you 
think that works?



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