#![warn(missing_docs)]
use std::fmt;
#[cfg(feature = "write")]
pub mod append;
pub mod bounds;
#[cfg(feature = "write")]
pub mod commit;
pub mod contract;
#[cfg(feature = "write")]
pub mod error;
#[cfg(feature = "write")]
pub mod file;
#[cfg(feature = "head")]
pub mod head;
#[cfg(feature = "write")]
pub mod host;
#[cfg(feature = "write")]
pub mod iceberg;
#[cfg(feature = "write")]
pub mod maintain;
#[cfg(feature = "write")]
pub mod merge;
#[cfg(feature = "write")]
pub mod metadata;
#[cfg(feature = "write")]
pub mod rows;
pub mod settings;
#[cfg(feature = "write")]
pub mod table;
pub mod version;
pub use contract::{Chunk, Contract, TableOptions, format_duration, parse_duration};
pub use version::FormatVersion;
pub mod property {
pub const TIME_COLUMN: &str = "timelake.time-column";
pub const SERIES_KEY: &str = "timelake.series-key";
pub const CHUNK: &str = "timelake.chunk-interval";
pub const DEDUP: &str = "timelake.dedup";
pub const RETENTION: &str = "timelake.retention";
pub const TARGET_FILE_SIZE: &str = "timelake.target-file-size-bytes";
pub const ROW_GROUP_ROWS: &str = "timelake.row-group-rows";
pub const AUTO_MAINTAIN: &str = "timelake.auto-maintain";
pub const SNAPSHOT_RETENTION: &str = "timelake.snapshot-retention";
pub const MIN_SNAPSHOTS: &str = "timelake.min-snapshots";
pub const MAX_SNAPSHOTS: &str = "timelake.max-snapshots";
pub const COMPACT_MIN_FILES: &str = "timelake.compact-min-files";
pub const COMPACT_COLD_AFTER: &str = "timelake.compact-cold-after";
pub const INGEST_TIME_COLUMN: &str = "timelake.ingest-time-column";
pub const READ_DEDUP: &str = "timelake.read-dedup";
pub const READ_DEDUP_STRATEGY: &str = "timelake.read-dedup-strategy";
pub const FILTER_PUSHDOWN: &str = "timelake.filter-pushdown";
pub const IN_LIST_PRUNING: &str = "timelake.in-list-pruning";
pub const NEWEST_FIRST: &str = "timelake.newest-first";
pub const TIME_WEIGHTED_MEAN: &str = "timelake.time-weighted-mean";
pub const HEAD_FORMAT: &str = "timelake.head-format";
pub const HEAD_INLINE_BYTES: &str = "timelake.head-inline-bytes";
pub const KEEP_SNAPSHOTS_UNTIL: &str = "timelake.keep-snapshots-until";
pub const FORMAT_VERSION: &str = "timelake.format-version";
pub const ROLLUPS: &str = "timelake.rollups";
pub const ROLLUP_ROUTING: &str = "timelake.rollup-routing";
pub const ROLLUP_SOURCE: &str = "timelake.rollup-source";
pub const ROLLUP_BUCKET: &str = "timelake.rollup-bucket";
pub const ROLLUP_AGGREGATES: &str = "timelake.rollup-aggregates";
pub const ROLLUP_REFRESH_INTERVAL: &str = "timelake.rollup-refresh-interval";
pub const VERSION_CHECK_INTERVAL: &str = "timelake.version-check-interval";
pub const DATA_PAGE_ROWS: &str = "timelake.data-page-rows";
pub const COMPRESSION_CODEC: &str = "write.parquet.compression-codec";
pub const COMPRESSION_LEVEL: &str = "write.parquet.compression-level";
}
pub mod summary {
pub const LAST_VALUE_INDEX: &str = "timelake.last-value-index";
pub const BATCH_ID: &str = "timelake.batch-id";
pub const ROLLUP_SOURCE_SNAPSHOT: &str = "timelake.rollup-source-snapshot";
pub const ROLLUP_SOURCE_SEQUENCE: &str = "timelake.rollup-source-sequence";
pub const ADDED_DATA_FILES: &str = "added-data-files";
pub const ADDED_RECORDS: &str = "added-records";
pub const ADDED_FILES_SIZE: &str = "added-files-size";
pub const DELETED_DATA_FILES: &str = "deleted-data-files";
pub const DELETED_RECORDS: &str = "deleted-records";
pub const REMOVED_FILES_SIZE: &str = "removed-files-size";
pub const TOTAL_DATA_FILES: &str = "total-data-files";
pub const TOTAL_RECORDS: &str = "total-records";
pub const TOTAL_FILES_SIZE: &str = "total-files-size";
pub const TOTAL_DELETE_FILES: &str = "total-delete-files";
pub const TOTAL_POSITION_DELETES: &str = "total-position-deletes";
pub const TOTAL_EQUALITY_DELETES: &str = "total-equality-deletes";
}
pub const FORMAT_VERSION: FormatVersion = FormatVersion::new(0, 3, 0);
pub const INGEST_TIME_COLUMN: &str = "_ingest_ts";
pub const TABLES_INDEX: &str = "timelake-tables.json";
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct FormatError(pub String);
impl FormatError {
fn new(msg: impl Into<String>) -> Self {
Self(msg.into())
}
}
impl fmt::Display for FormatError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.0)
}
}
impl std::error::Error for FormatError {}
pub type Result<T> = std::result::Result<T, FormatError>;