Repository navigation
fix(bench): give the scalar index benches the schema their trainers read - #10776
Merged
Xuanwo merged 4 commits intoNov 13, 2026
Merged
Conversation
… schema The fixture trained the B-tree from columns `values` and `row_ids`, but `train_btree_index` reads `value` and `_rowaddr`, so `bench_baseline` panicked before any benchmark ran. The training stream now uses `VALUE_COLUMN_NAME` and `ROW_ADDR`. The dataset keeps `values` and `row_ids`, because a dataset cannot store a column named `_rowaddr`. Co-authored-by: Cursor <[email protected]>
… schema The generators in `benches/common.rs` wrote the row column as `_rowid`. The B-tree trainer reads `_rowaddr` since upstream PR 9481, and the bitmap trainer since upstream PR 9814. So `cargo test -p lance-index --bench btree` and `--bench bitmap` panicked while they built their first index, before any benchmark ran. The five generators now write `ROW_ADDR`. The ordered-search benchmark in `btree.rs` carried its own copy of `generate_int_unique_stream` to get a `_rowaddr` column. It now calls the shared generator, and the imports only the copy used are gone. The ngram benchmark named its text column `doc`, but `NGramIndexBuilder::train` has looked up `value` since upstream PR 4584, so `ngram_train` panicked. The column is now `VALUE_COLUMN_NAME`. Co-authored-by: Cursor <[email protected]>
Xuanwo
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The scalar index benchmarks should run to completion. Four bench targets panicked in their first benchmark, because each one fed its trainer a stream with column names the trainer does not read.
lancescalar_index. The fixture trained the B-tree fromvaluesandrow_ids, buttrain_btree_indexreadsvalueand_rowaddr. Training has looked upvalueby name since refactor: rework scalar index loading, training, and parsing into a plugin trait #4584, and feat(index): change btree scalar index to row-address domain #9481 moved the row column from_rowidto_rowaddr.lance-indexbtreeandbitmap. The shared generators inbenches/common.rswrote_rowid. The B-tree trainer has read_rowaddrsince feat(index): change btree scalar index to row-address domain #9481, and the bitmap trainer has since feat(index): change bitmap and label_list scalar indexes to row-address domain #9814.lance-indexngram. The bench named its text columndoc, butNGramIndexBuilder::trainhas looked upvaluesince refactor: rework scalar index loading, training, and parsing into a plugin trait #4584.What changed
scalar_index.rs,test_datatakes the value and row column names. The training stream passesVALUE_COLUMN_NAMEandROW_ADDR. The dataset keepsvaluesandrow_ids, so the baseline benchmarks scan the same data as before.common.rs, the five generators writeROW_ADDRinstead of_rowid.btree.rs, the ordered-search benchmark had its own copy ofgenerate_int_unique_streamwith a_rowaddrcolumn. It now calls the shared generator, and the imports that only the copy used are gone.ngram.rs, the text column isVALUE_COLUMN_NAME. The row column staysROW_ADDR, which main already used after feat(index)!: change ngram, rtree, and minhash lsh scalar indexes to row-address domain #9858 moved NGram to the row-address domain.Scope
zonemap,bloomfilter,inverted,geo, andminhash_lshbenches already write the columns their trainers read, so they do not change.Expected option to have value. A schema check with a clear message belongs in the trainers, in a separate change.Tradeoffs
scalar_indexdataset cannot use the training names, because Lance rejects a stored column named_rowaddr.scalar_indextraining stream would repeat the row and batch counts that every assertion depends on.Blast radius
The change touches bench code only. Library code, the file format, and tests do not change.
Verification
The branch is merged with
mainat01036bf80. Every command below ran in criterion test mode on that merged tree with--profile ci --locked, and each benchmark reportsSuccess, so this covers the fixture generation and trainer calls rather than compilation alone.cargo test --profile ci --locked -p lance-index --bench btree: 84Success, includingbtree_ordered_first_kandtuple_planning.cargo test --profile ci --locked -p lance-index --bench bitmap: 40Success.cargo test --profile ci --locked -p lance-index --bench ngram: 2Success(ngram_train,ngram_search).cargo test --profile ci --locked -p lance --bench scalar_index: 5Success, including both baseline scans.cargo fmt --all -- --checkandcargo clippy --profile ci --all --tests --benches --locked -- -D warningspass.On the original base, before the fix,
--bench btreeand--bench bitmappanicked withExpected option to have value, and--bench ngrampanicked withUnable to get field named "value".