Skip to main content

nodedb_columnar/
lib.rs

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