FANNG1 commented on PR #577: URL: https://github.com/apache/iceberg-rust/pull/577#issuecomment-2320796097
> Hi, @FANNG1 Thanks for your contribution. The reason why we use `UnboundPartitionSpec` rather `PartitionSpec` is to simplify the usage of this method. `PartitionSpec` is bound to a schema, and spec id, field ids are supposed to be meaningful. These ids are not supposed to be passed by user, but by the catalog implementation. I agree that `PartitionSpec` is bound to a schema which is not user friendly, but when building `UnboundPartitionSpec`, we need source column id not name, it seems not friendly too? How about Using a separate TableRequestBuilder to build the `TableCreation`, in which `PartitionSpec` is generated by a more user friendly interfaces, WDYT? ```rust pub struct TableCreation { /// The name of the table. pub name: String, /// The location of the table. #[builder(default, setter(strip_option))] pub location: Option<String>, /// The schema of the table. pub schema: Schema, /// The partition spec of the table, could be None. #[builder(default, setter(strip_option, into))] pub partition_spec: Option<PartitionSpec>, /// The sort order of the table. #[builder(default, setter(strip_option))] pub sort_order: Option<SortOrder>, /// The properties of the table. #[builder(default)] pub properties: HashMap<String, 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: 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