feat(index): add single-column btree global index build#454
Conversation
|
I think there is a correctness issue for Binary/VarBinary BTree global indexes.
For example, Could we either:
A test with byte values like |
Add a BTree global index builder for single-column data-evolution append tables. The builder plans row-id coverage conservatively, writes Java-compatible BTree/index manifest metadata, and exposes the minimal Rust API plus DataFusion create_global_index procedure. Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
348adbc to
1c4a434
Compare
@JingsongLi Thanks. I fixed this conservatively by rejecting Binary/VarBinary for BTree global index build for now, and added a regression test for that. Supporting these types should be handled separately with aligned byte comparator semantics. |
Purpose
Rust already has BTree global index read support, scan integration, and row-id coverage semantics, but it did not have an entry point to build BTree global index files. This left the Rust read path unable to close the write/read lifecycle by itself.
Brief change log
first_row_id.{table}/index/with Java-compatible BTree/index manifest metadata.Table::new_btree_global_index_build_builder().CALL sys.create_global_index(..., index_type => 'btree')with unsupported handling for non-BTree types.Tests
cargo fmt --all -- --checkcargo clippy --all-targets --workspace --features fulltext,vortex,mosaic -- -D warningscargo test -p paimon btreecargo test -p paimon table::global_index_scanner::tests --libcargo test -p paimon table::table_commit::tests::test_global_index --libcargo test -p paimon-datafusion --test proceduresAPI and Format
Adds a minimal Rust API and SQL procedure for BTree global index creation. The generated files use Java-compatible BTree/index manifest formats.
Documentation