Skip to main content

nodedb_columnar/
lib.rs

1//! Columnar segment format and memtable for NodeDB analytical storage.
2//!
3//! Provides the shared segment format used by all columnar profiles
4//! (plain, timeseries, spatial). Segments are self-contained files with
5//! per-column compressed blocks, block statistics, and a CRC-validated footer.
6//!
7//! # Segment Layout
8//!
9//! ```text
10//! [SegmentHeader: magic "NDBS" + version + endianness]
11//! [Column 0 blocks][Column 1 blocks]...[Column N blocks]
12//! [SegmentFooter: schema_hash, column metadata, block stats, CRC32C]
13//! ```
14
15pub mod compaction;
16pub mod delete_bitmap;
17pub mod error;
18pub mod filter;
19pub mod format;
20pub mod memtable;
21pub mod mutation;
22pub mod pk_index;
23pub mod predicate;
24pub mod reader;
25pub mod wal_record;
26pub mod writer;
27
28pub use compaction::compact_segments;
29pub use delete_bitmap::DeleteBitmap;
30pub use error::ColumnarError;
31pub use filter::{
32    bitmask_all, bitmask_and, decoded_dict_eval_contains, decoded_dict_eval_eq,
33    decoded_dict_eval_like, decoded_dict_eval_ne, dict_eval_contains, dict_eval_eq, dict_eval_like,
34    dict_eval_ne, words_for,
35};
36pub use format::{
37    BLOCK_SIZE, BlockStats, ColumnMeta, MAGIC, SegmentFooter, SegmentHeader, VERSION_MAJOR,
38    VERSION_MINOR,
39};
40pub use memtable::{ColumnarMemtable, IngestValue, MemtableRowIter};
41pub use mutation::MutationEngine;
42pub use pk_index::PkIndex;
43pub use predicate::{
44    BLOOM_BYTES, PredicateOp, PredicateValue, ScanPredicate, bloom_insert, bloom_may_contain,
45    build_bloom,
46};
47pub use reader::SegmentReader;
48pub use writer::SegmentWriter;