Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/catalog/rest/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,18 @@ pub struct CreateTableRequest {
/// Name of the table to create
pub name: String,
/// Optional table location. If not provided, the server will choose a location.
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
/// Table schema
pub schema: Schema,
/// Optional partition specification. If not provided, the table will be unpartitioned.
#[serde(skip_serializing_if = "Option::is_none")]
pub partition_spec: Option<UnboundPartitionSpec>,
/// Optional sort order for the table
#[serde(skip_serializing_if = "Option::is_none")]
pub write_order: Option<SortOrder>,
/// Whether to stage the create for a transaction (true) or create immediately (false)
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_create: Option<bool>,
/// Optional properties to set on the table
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
Expand Down
2 changes: 2 additions & 0 deletions crates/iceberg/src/spec/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ pub struct UnboundPartitionField {
/// 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(fallback = field_id_opt)))]
#[serde(skip_serializing_if = "Option::is_none")]
pub field_id: Option<i32>,
/// A partition name.
pub name: String,
Expand All @@ -260,6 +261,7 @@ pub struct UnboundPartitionField {
#[serde(rename_all = "kebab-case")]
pub struct UnboundPartitionSpec {
/// Identifier for PartitionSpec
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) spec_id: Option<i32>,
/// Details of the partition spec
pub(crate) fields: Vec<UnboundPartitionField>,
Expand Down
Loading