Fokko commented on code in PR #2155:
URL: https://github.com/apache/iceberg-python/pull/2155#discussion_r2270218139
##########
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:
If I read the spec carefully, I think it only allows for promoting to
_primitive types_:
<img width="848" height="540" alt="image"
src="https://github.com/user-attachments/assets/dfd49aad-de4f-486f-acbb-69a0d688be6c"
/>
So, it cannot be promoted to a `{List,Map,Struct}Type`.
--
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]