ldsantos0911 commented on code in PR #2155:
URL: https://github.com/apache/iceberg-python/pull/2155#discussion_r2271025458


##########
pyiceberg/schema.py:
##########
@@ -1618,6 +1618,11 @@ def promote(file_type: IcebergType, read_type: 
IcebergType) -> IcebergType:
         raise ResolveError(f"Cannot promote {file_type} to {read_type}")
 
 
[email protected](UnknownType)
+def _(file_type: UnknownType, read_type: IcebergType) -> IcebergType:
+    return read_type  # Per V3 Spec, "Unknown" can be promoted to any type

Review Comment:
   I interpreted this as promotions available for a primitive type rather than 
promotions to a primitive type. i.e. UnknownType is a primitive type and these 
are the types it can be promoted to. It should be easy enough to change, so I'm 
fine either way. But, to me it would make sense that if a 
`{List,Map,Struct}Type` field is nullable and a `null` PyArrow field is being 
evaluated for compatibility, that evaluation should succeed. What are your 
thoughts?



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