gmweaver commented on code in PR #2515:
URL: https://github.com/apache/iceberg-python/pull/2515#discussion_r2383558250


##########
pyiceberg/io/pyarrow.py:
##########
@@ -2089,6 +2089,9 @@ def __init__(self, iceberg_type: PrimitiveType, 
physical_type_string: str, trunc
                 physical_type_string == "FLOAT" and expected_physical_type == 
"DOUBLE"
             ):
                 pass
+            # Allow DECIMAL to be stored as FIXED_LEN_BYTE_ARRAY
+            elif physical_type_string == "FIXED_LEN_BYTE_ARRAY" and 
expected_physical_type in ("INT32", "INT64"):

Review Comment:
   Added a TODO to refactor.
   
   > INT32, INT64, and FIXED_LEN_BYTE_ARRAY are all valid phyiscal types for 
Decimal
   
   yeah, just to verify the `FIXED_LEN_BYTE_ARRAY` is covered by 
`expected_physical_type != physical_type_string:`



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