Fokko commented on code in PR #13445:
URL: https://github.com/apache/iceberg/pull/13445#discussion_r2265422835


##########
api/src/main/java/org/apache/iceberg/types/Types.java:
##########
@@ -1160,6 +1160,10 @@ public static ListType ofRequired(int elementId, Type 
elementType) {
     private transient List<NestedField> fields = null;
 
     private ListType(NestedField elementField) {
+      Preconditions.checkArgument(
+          !elementField.type().equals(UnknownType.get()),
+          "Cannot create ListType with unknown type: %s",
+          elementField.name);

Review Comment:
   > Can't Avro represent a list of unknowns using a `NULL` schema?
   
   Yes, we can do that, but then we still store the `NullType` in the Avro 
schema. And I think that's not in line what's in the spec (unless I have a 
different interpretation of it):
   
   <img width="710" height="371" alt="image" 
src="https://github.com/user-attachments/assets/919142a7-71bf-49b7-989f-af198a5c1985";
 />
   
   When we also omit the Avro `Array`, then we have the nullability problem as 
mentioned on the devlist.
   



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