Skip to content

Commit 6b8f7c2

Browse files
wkaltclaude
andauthored
feat: show scalar index type in ScalarIndexQuery plan output (#6677)
The ScalarIndexQuery (and MaterializeIndex) plan nodes now display the underlying scalar index type (BTree, Bitmap, NGram, LabelList, etc.) alongside the index name, e.g. `[category = 1]@category_idx(Bitmap)`. This makes it easier to tell which kind of index is being used when inspecting analyze/explain output without cross-referencing the manifest. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9cae5bd commit 6b8f7c2

14 files changed

Lines changed: 177 additions & 55 deletions

File tree

rust/lance-index/src/scalar/bitmap.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,11 @@ impl ScalarIndexPlugin for BitmapIndexPlugin {
14951495
index_name: String,
14961496
_index_details: &prost_types::Any,
14971497
) -> Option<Box<dyn ScalarQueryParser>> {
1498-
Some(Box::new(SargableQueryParser::new(index_name, false)))
1498+
Some(Box::new(SargableQueryParser::new(
1499+
index_name,
1500+
self.name().to_string(),
1501+
false,
1502+
)))
14991503
}
15001504

15011505
async fn train_index(

rust/lance-index/src/scalar/bloomfilter.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,11 @@ impl ScalarIndexPlugin for BloomFilterIndexPlugin {
10881088
index_name: String,
10891089
_index_details: &prost_types::Any,
10901090
) -> Option<Box<dyn ScalarQueryParser>> {
1091-
Some(Box::new(BloomFilterQueryParser::new(index_name, true)))
1091+
Some(Box::new(BloomFilterQueryParser::new(
1092+
index_name,
1093+
self.name().to_string(),
1094+
true,
1095+
)))
10921096
}
10931097

10941098
async fn load_index(

rust/lance-index/src/scalar/btree.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2706,7 +2706,11 @@ impl ScalarIndexPlugin for BTreeIndexPlugin {
27062706
index_name: String,
27072707
_index_details: &prost_types::Any,
27082708
) -> Option<Box<dyn ScalarQueryParser>> {
2709-
Some(Box::new(SargableQueryParser::new(index_name, false)))
2709+
Some(Box::new(SargableQueryParser::new(
2710+
index_name,
2711+
self.name().to_string(),
2712+
false,
2713+
)))
27102714
}
27112715

27122716
async fn train_index(

0 commit comments

Comments
 (0)