DavidEscott commented on issue #2030:
URL: 
https://github.com/apache/iceberg-python/issues/2030#issuecomment-2902134199

   Not in my use-case, because I also want to specify the `PartitionSpec` for 
`create_table`. From what I can tell the signature of `catalog.create_table` 
doesn't work at present.
   
   `create_table` suggests that it can accept a `pa.Schema` while 
simultaneously accepting a `PartitionSpec` and `SortOrder`. In order to 
construct a `PartitionSpec` you have to provide `PartitionField`s and for those 
you need the `field_id`s, which you don't have because it is a `pa.schema` and 
even if you did have ids, they wouldn't be guaranteed to align.
   
   It seems that one of the following should be done:
   
   - A utility function needs to be provided to convert the `pa.schema` to an 
iceberg schema AND apply the field id numbering.
   - Or `PartitionSpec` and `SortOrder` of create table need to be able to work 
with the names of columns instead of the `field_id`s.
   - Or remove PartitionSpec/SortOrder from create table and instead direct 
users to create the table as an empty object, and then apply the partitioning 
and sorting rules to the table skeleton.
   
   


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