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


##########
orc/src/main/java/org/apache/iceberg/orc/ORCSchemaUtil.java:
##########
@@ -229,15 +231,26 @@ private static TypeDescription convert(Integer fieldId, 
Type type, boolean isReq
           Types.ListType list = (Types.ListType) type;
           TypeDescription elementType =
               convert(list.elementId(), list.elementType(), 
list.isElementRequired());
+
+          if (list.elementType().typeId().equals(Type.TypeID.UNKNOWN)) {
+            throw new IllegalArgumentException("Cannot create ListType with 
unknown element type");
+          }
+
           orcType = TypeDescription.createList(elementType);
           break;
         }
       case MAP:
         {
           Types.MapType map = (Types.MapType) type;
           TypeDescription keyType = convert(map.keyId(), map.keyType(), true);
+
+          if (map.valueType().typeId().equals(Type.TypeID.UNKNOWN)) {

Review Comment:
   Done, and that's not possible by definition. A key of a map needs to be 
required, and the UnknownType needs to be optional.



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