kevinjqliu commented on code in PR #13445:
URL: https://github.com/apache/iceberg/pull/13445#discussion_r2296799616
##########
orc/src/main/java/org/apache/iceberg/orc/ORCSchemaUtil.java:
##########
@@ -229,13 +231,23 @@ 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());
+
+ Preconditions.checkArgument(
+ list.elementType().typeId() != Type.TypeID.UNKNOWN,
+ "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);
+
Review Comment:
nit: i was going to ask about map keyType as well and then i saw the
previous discussion. Others might have the same question, can we add a comment
here about how key is required?
--
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]