pub struct IcebergMetadata {Show 22 fields
pub format_version: i32,
pub table_uuid: String,
pub location: String,
pub last_sequence_number: i64,
pub next_row_id: i64,
pub last_updated_ms: i64,
pub last_column_id: i32,
pub schemas: Vec<Value>,
pub current_schema_id: i32,
pub partition_specs: Vec<Value>,
pub default_spec_id: i32,
pub last_partition_id: i32,
pub properties: HashMap<String, String>,
pub current_snapshot_id: Option<SnapshotId>,
pub snapshots: Vec<IcebergSnapshot>,
pub snapshot_log: Vec<Value>,
pub metadata_log: Vec<Value>,
pub sort_orders: Vec<Value>,
pub default_sort_order_id: i32,
pub refs: HashMap<String, Value>,
pub statistics: Vec<IcebergStatisticsRef>,
pub partition_statistics: Vec<IcebergPartitionStatsRef>,
}Fields§
§format_version: i32§table_uuid: String§location: String§last_sequence_number: i64§next_row_id: i64Iceberg V3 Row Lineage: next available globally-unique row ID. Incremented by record_count for each new data file at commit time. Absent (0) in V2 tables — field is ignored when format-version < 3.
last_updated_ms: i64§last_column_id: i32§schemas: Vec<Value>§current_schema_id: i32§partition_specs: Vec<Value>§default_spec_id: i32§last_partition_id: i32§properties: HashMap<String, String>§current_snapshot_id: Option<SnapshotId>§snapshots: Vec<IcebergSnapshot>§snapshot_log: Vec<Value>§metadata_log: Vec<Value>§sort_orders: Vec<Value>§default_sort_order_id: i32§refs: HashMap<String, Value>§statistics: Vec<IcebergStatisticsRef>Iceberg V3 statistics files (Puffin). Only written for format-version=3.
partition_statistics: Vec<IcebergPartitionStatsRef>Partition statistics files (Parquet). Written for partitioned tables on every commit.
Referenced under "partition-statistics" in metadata.json (Iceberg spec §3.6).
Enables Spark/Trino to do partition-level aggregations without scanning data files.
Implementations§
Source§impl IcebergMetadata
impl IcebergMetadata
Sourcepub fn new(
location: &str,
policy: &VectorStoragePolicy,
format_version: u8,
partition_column_type: Option<&str>,
partition_fields: &[PartitionDef],
) -> Self
pub fn new( location: &str, policy: &VectorStoragePolicy, format_version: u8, partition_column_type: Option<&str>, partition_fields: &[PartitionDef], ) -> Self
Create a new metadata.json for a fresh AI-Lake table.
format_version: 2 = Iceberg V2 (default); 3 = Iceberg V3 opt-in.
V3 tables are append/update compatible; equality deletes and partition
statistics require future phases (see docs/specs/ICEBERG_V3.md).
partition_column_type: Iceberg type of the partition column (“string”, “uuid”, “int”, “long”).
Defaults to “string” when None. Only used when policy.partition_by is set.
pub fn to_json(&self) -> AilakeResult<String>
pub fn from_json(s: &str) -> AilakeResult<Self>
pub fn to_table_metadata(&self) -> TableMetadata
Trait Implementations§
Source§impl Debug for IcebergMetadata
impl Debug for IcebergMetadata
Source§impl<'de> Deserialize<'de> for IcebergMetadata
impl<'de> Deserialize<'de> for IcebergMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for IcebergMetadata
impl RefUnwindSafe for IcebergMetadata
impl Send for IcebergMetadata
impl Sync for IcebergMetadata
impl Unpin for IcebergMetadata
impl UnsafeUnpin for IcebergMetadata
impl UnwindSafe for IcebergMetadata
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more