Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions crates/iceberg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
//! ```

#![deny(missing_docs)]
#![feature(anonymous_lifetime_in_impl_trait)]

#[macro_use]
extern crate derive_builder;
Expand Down
1 change: 0 additions & 1 deletion crates/iceberg/src/spec/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ impl Snapshot {
}

/// Get parent snapshot.
#[cfg(test)]
pub(crate) fn parent_snapshot(&self, table_metadata: &TableMetadata) -> Option<SnapshotRef> {
match self.parent_snapshot_id {
Some(id) => table_metadata.snapshot_by_id(id).cloned(),
Expand Down
13 changes: 13 additions & 0 deletions crates/iceberg/src/spec/table_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ pub const PROPERTY_METADATA_PREVIOUS_VERSIONS_MAX: &str = "write.metadata.previo
/// Default value for max number of previous versions to keep.
pub const PROPERTY_METADATA_PREVIOUS_VERSIONS_MAX_DEFAULT: usize = 100;

/// Property key for max snapshot age in milliseconds.
pub const MAX_SNAPSHOT_AGE_MS: &str = "history.expire.max-snapshot-age-ms";
/// Default value for max snapshot age in milliseconds.
pub const MAX_SNAPSHOT_AGE_MS_DEFAULT: i64 = 5 * 24 * 60 * 60 * 1000; // 5 days
/// Property key for min snapshots to keep.
pub const MIN_SNAPSHOTS_TO_KEEP: &str = "history.expire.min-snapshots-to-keep";
/// Default value for min snapshots to keep.
pub const MIN_SNAPSHOTS_TO_KEEP_DEFAULT: i32 = 1;
/// Property key for max reference age in milliseconds.
pub const MAX_REF_AGE_MS: &str = "history.expire.max-ref-age-ms";
/// Default value for max reference age in milliseconds.
pub const MAX_REF_AGE_MS_DEFAULT: i64 = i64::MAX;

/// Reserved Iceberg table properties list.
///
/// Reserved table properties are only used to control behaviors when creating or updating a
Expand Down
Loading