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


##########
python/pyiceberg/schema.py:
##########
@@ -1364,3 +1364,11 @@ def _(file_type: DecimalType, read_type: IcebergType) -> 
IcebergType:
             raise ResolveError(f"Cannot reduce precision from {file_type} to 
{read_type}")
     else:
         raise ResolveError(f"Cannot promote an decimal to {read_type}")
+
+
[email protected](FixedType)
+def _(file_type: FixedType, read_type: IcebergType) -> IcebergType:
+    if isinstance(read_type, UUIDType) and len(file_type) == 16:

Review Comment:
   One minor request. Could you add a small comment here explaining why this 
promotion is there? That PyArrow reads a Parquet UUID as FixedBytes, and 
therefore we need to allow this promotion.



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