You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using UUIDType as a BucketTransform Partition, an error occurs during table operations such as upsert. The issue appears to be related to the partition key changing from int to str, which causes a type mismatch when the Avro encoder attempts to write an integer.
Steps to Reproduce
Create a table with UUIDType column
Configure the table to use BucketTransform on that column for partitioning
Attempt to upsert data into the table
Current Behavior
The operation fails with a TypeError as the system attempts to perform integer operations on a string value.
Expected Behavior
The operation should properly handle UUIDType columns when used with BucketTransform partitioning. The uuid bucket partition value should be 1 instead of "1"
Apache Iceberg version
0.9.0 (latest release)
Please describe the bug 🐞
Description
When using UUIDType as a BucketTransform Partition, an error occurs during table operations such as upsert. The issue appears to be related to the partition key changing from int to str, which causes a type mismatch when the Avro encoder attempts to write an integer.
Steps to Reproduce
Current Behavior
The operation fails with a TypeError as the system attempts to perform integer operations on a string value.
Expected Behavior
The operation should properly handle UUIDType columns when used with BucketTransform partitioning. The uuid bucket partition value should be
1
instead of"1"
Error Stack Trace
Potential Fix
The issue appears to be in the type handling in
partition_record_value
function when initialPartitionKey
with thePartitionFieldValue
.iceberg-python/pyiceberg/partitioning.py
Lines 385 to 406 in 996a7ba
Would add Union type for
value
to handle the transformed value.iceberg-python/pyiceberg/partitioning.py
Lines 469 to 471 in 996a7ba
Willingness to contribute
The text was updated successfully, but these errors were encountered: