my-vegetable-has-exploded commented on code in PR #106: URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1410103369
########## crates/iceberg/src/spec/partition.rs: ########## @@ -60,6 +60,44 @@ impl PartitionSpec { } } +/// Reference to [`UnboundPartitionSpec`]. +pub type UnboundPartitionSpecRef = Arc<UnboundPartitionSpec>; +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, TypedBuilder)] +#[serde(rename_all = "kebab-case")] +/// Unbound partition field can be built without a schema and later bound to a schema. +pub struct UnboundPartitionField { + /// A source column id from the table’s schema + pub source_id: i32, + /// A partition field id that is used to identify a partition field and is unique within a partition spec. + /// In v2 table metadata, it is unique across all partition specs. + #[builder(default, setter(strip_option))] + pub partition_id: Option<i32>, + /// A partition name. + pub name: String, + /// A transform that is applied to the source column to produce a partition value. + pub transform: Transform, +} + +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default, Builder)] +#[serde(rename_all = "kebab-case")] +#[builder(setter(prefix = "with"))] +/// Unbound partition spec can be built without a schema and later bound to a schema. +pub struct UnboundPartitionSpec { Review Comment: Sure! -- 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