The supertable layer is the multi-file table abstraction in Infino. It provides a logical view over a set of immutable superfiles similar to how Apache Iceberg or Delta Lake manage Parquet files. It is responsible for manifest management, snapshot isolation, ACID-compliant writes to object storage, and distributed query execution across files src/supertable/mod.rs4-10
A supertable is defined by its SupertableOptions, which include the Arrow schema, FTS column configurations, and vector index parameters src/supertable/options.rs8-17
The supertable maintains a two-tier hierarchical manifest to scale to millions of files while keeping memory overhead low. It uses Optimistic Concurrency Control (OCC) for commits, ensuring that multiple writers can attempt updates without locking, with a "pointer-file" serving as the atomic visibility barrier src/supertable/mod.rs4-10
The following diagram maps high-level supertable concepts to their corresponding Rust entities.
Supertable Code Entity Map
Sources: src/supertable/mod.rs4-24 src/supertable/handle.rs61-141 src/supertable/options.rs41-62
The manifest tracks the set of superfiles that constitute a table at a specific point in time. It uses a two-tier hierarchy: a ManifestList (JSON) pointing to multiple ManifestPart (Avro) files. This allows for lazy loading of metadata and efficient pruning during queries src/supertable/manifest/mod.rs48-51
ManifestSnapshot src/supertable/handle.rs8-12 ensuring a consistent view even if a concurrent writer publishes new data.put_if_match (OCC) src/supertable/wal/persistence.rs7-10For details, see Manifest & Snapshot Management.
The SupertableWriter manages the lifecycle of data ingestion. It buffers incoming RecordBatch data, handles the "vector split" (separating vector blobs from scalar Parquet data), and coordinates the parallel building of superfiles across a thread pool src/supertable/mod.rs15-17 src/supertable/writer.rs56
For details, see Write Path & Commit Pipeline.
Infino uses a WAL to ensure durability for updates and deletes. Mutations go through a state machine (Intent → Appended → Complete) to ensure recovery safety across crashes src/supertable/wal/pipeline.rs19-43
SidecarCache ensures that readers can filter out deleted rows with microsecond latency src/supertable/tombstones/cache.rs4-16For details, see Write-Ahead Log (WAL) & Mutations.
The query engine integrates with Apache DataFusion to provide SQL support, while also offering native FTS (BM25) and vector (kNN) search src/supertable/mod.rs4-10
vector_search, bm25_search), allowing hybrid queries to be expressed in standard SQL docs/architecture/supertable.md94-110For details, see Query Engine & Fan-Out.
The compaction subsystem merges small or tombstone-heavy superfiles into larger, target-sized files (typically 1 GiB) to maintain query performance src/supertable/compaction/mod.rs8-9
For details, see Compaction & Garbage Collection.
Infino implements a tiered caching strategy to accelerate reads from high-latency object storage docs/architecture/overview.md114-118
SuperfileReader instances are cached to avoid repeated metadata parsing src/supertable/reader_cache/mod.rs54DiskCacheStore manages a local NVMe/SSD cache of superfile segments, using memory-mapped files for RAM-speed access once data is "warm" src/supertable/reader_cache/mod.rs21-22For details, see Disk Cache & Reader Cache.
The following diagram illustrates how data flows from an ingestion call through the manifest and into the query engine.
Supertable Data Pipeline
Sources: src/supertable/writer.rs41-43 src/supertable/options.rs8-17 src/supertable/handle.rs82-118 src/supertable/compaction/mod.rs33-44
The behavior of a supertable is governed by SupertableOptions. Key defaults include:
BoundedStaleness allow for high-performance reads with a configurable window of staleness src/supertable/options.rs158-159reader_pool (all cores) and writer_pool (half cores) prevent ingestion from starving queries src/supertable/options.rs91-99_id column (Decimal128) if not provided src/supertable/options.rs134-154Sources: src/supertable/mod.rs1-76 src/supertable/options.rs1-177 src/supertable/handle.rs1-150 src/supertable/compaction/mod.rs1-112
Refresh this wiki