wmoustafa commented on code in PR #6004:
URL: https://github.com/apache/iceberg/pull/6004#discussion_r1156281132
##########
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:
It is hard to move the test class to another package since all the Avro
dependencies will break in this case. I have updated the PR to make both
`optional` and the `NestedField` constructor protected and inherited
`NestedField` class in the test class. However, that has the risk of having to
downgrade `NestedFiled` constructor to private in the future once this
workaround is no longer needed.
Another option is to keep both as private, and use reflection in the test to
access them as a temporary workaround.
--
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]