Skip to main content

Module btree

Module btree 

Source
Expand description

BTree index implementation compatible with Apache Paimon Java.

File layout:

   +-----------------------------------+------+
   |             Footer                |      |
   +-----------------------------------+      |
   |           Index Block             |      +--> Loaded on open
   +-----------------------------------+      |
   |        Bloom Filter Block         |      |
   +-----------------------------------+------+
   |         Null Bitmap Block         |      |
   +-----------------------------------+      |
   |            Data Block             |      |
   +-----------------------------------+      +--> Loaded on requested
   |              ......               |      |
   +-----------------------------------+      |
   |            Data Block             |      |
   +-----------------------------------+------+

Structs§

BTreeFileFooter
BTree file footer.
BTreeIndexMeta
Index meta for each BTree index file.
BTreeIndexReader
BTree index reader with on-demand async data block loading.
BTreeIndexWriter
BTree index writer. Writes sorted key -> row_id_list entries into a BTree index file.

Traits§

IndexQuery
Trait for index readers that can evaluate predicates and return row ID bitmaps.

Functions§

make_key_comparator
Create a key comparator based on the data type. For fixed-size numeric types, compares by decoded value. For variable-length types (string, bytes), uses lexicographic byte comparison.
serialize_datum
Serialize a Datum to BTree key bytes (little-endian, matching Java Paimon’s KeySerializer).