myz540 commented on issue #1790:
URL: 
https://github.com/apache/iceberg-python/issues/1790#issuecomment-2733588912

   @kevinjqliu Would you be able to provide an example for the 
`BucketTransform`?
   
   I have tried two things and gotten errors for both:
   
   ```python
   def create_lems_partitions_bucket():
       return PartitionSpec(
           PartitionField(
               source_id=1,
               field_id=1,
               transform=BucketTransform(num_buckets=1000),
               name="sid",
           ),
           PartitionField(
               source_id=2,
               field_id=2,
               transform=BucketTransform(num_buckets=100),
               name="gene",
           ),
       )
   ```
   
   yields error: `ValueError: Could not find in old schema: 1: sid: 
bucket[1000](1)`
   
   ```python
   def create_lems_partitions_bucket():
       return PartitionSpec(
           PartitionField(
               source_id=1,
               field_id=1000,
               transform=BucketTransform(num_buckets=1000),
               name="sid_bucket",
           ),
           PartitionField(
               source_id=2,
               field_id=2000,
               transform=BucketTransform(num_buckets=100),
               name="gene_bucket",
           ),
       )
   ```
   
   yields error: `ValueError: Could not find in old schema: 1000: sid_bucket: 
bucket[1000](1)`


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to