timeseries_table_format/lib.rs
1//! # timeseries-table-format
2//!
3//! Append-only time-series table format with gap/overlap tracking.
4//!
5//! This crate is the canonical library for the table engine and optional integrations.
6//!
7//! ## Features
8//!
9//! - `datafusion` (default): Enables DataFusion integration for SQL queries
10//!
11//! ## Quick start
12//!
13//! Open an existing table (async; returns a `Future`):
14//!
15//! ```rust
16//! use timeseries_table_format::{TableLocation, TimeSeriesTable};
17//!
18//! let location = TableLocation::local("./my_table");
19//! let _open = TimeSeriesTable::open(location);
20//! ```
21//!
22//! Or import the stable, supported surface via the prelude:
23//!
24//! ```rust
25//! use timeseries_table_format::prelude::*;
26//! ```
27//!
28//! ## Observability
29//!
30//! The crate emits backend-neutral structured diagnostics through [`tracing`]
31//! but never installs a subscriber. Embedding applications own filtering,
32//! formatting, and export. When no tracing subscriber is active, event-style
33//! diagnostics are forwarded to the standard [`log`](https://docs.rs/log)
34//! facade for applications that install a logger.
35//!
36//! The initial operation names include `table.open`, `table.create`,
37//! `table.refresh`, `table.append`, `table.optimize`, `table.vacuum`, `table.scan.plan`,
38//! `transaction.commit`, and `coverage.recover`. Diagnostics exclude SQL,
39//! entity identities, record values, complete schemas, credentials, and
40//! environment variables. `table.scan.plan` covers physical plan construction
41//! only; DataFusion remains the source of query execution metrics.
42
43pub mod coverage;
44#[cfg(feature = "datafusion")]
45pub mod datafusion;
46pub(crate) mod formats;
47pub mod metadata;
48/// Convenience prelude with the stable, supported surface.
49pub mod prelude;
50pub mod storage;
51pub mod table;
52pub mod transaction_log;
53
54pub use metadata::index::{
55 IndexKind, IndexSpec, IndexSpecError, IndexValue, IndexValueError,
56 ParseTimeIndexGranularityError, TimeIndexGranularity, validate_index_range,
57};
58pub use metadata::logical_schema::{LogicalDataType, LogicalField, LogicalSchema};
59pub use metadata::protocol::TableProtocolError;
60pub use metadata::table::TableMeta;
61pub use storage::TableLocation;
62pub use table::{
63 AppendError, CoverageQueryError, CreateTableError, OpenTableError, OptimizeError,
64 OptimizeReport, ScanError, TableError, TableStateAccessError, TimeSeriesTable, VacuumArtifact,
65 VacuumArtifactDisposition, VacuumArtifactReason, VacuumError, VacuumMode, VacuumReport,
66 append::{AppendRequest, IntoRecordBatchReader, ParquetCompression},
67};
68
69/// DataFusion table provider (enabled by default).
70#[cfg(feature = "datafusion")]
71pub use datafusion::TsTableProvider;