feat: expose independent batch nearest search in C and C++ #92
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 360 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.352
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #92"
general
weight: 0.35
LuciferYang
Expose independent batch nearest-neighbor search through
lance_scanner_nearest_batchand the C++Scanner::nearest_batchoverloads. A row-major matrix of N vectors produces up to K neighbors per query, identified by a zero-basedquery_indexcolumn, including a batch of one. This provides the binding needed for consumers such as apache/doris#68394.The existing fixed-size-list query representation also describes multi-vector queries. Track the query mode explicitly so independent batches use Lance's native batch execution instead of the custom multi-vector scoring/window path. Single-vector, multi-vector, and batch queries share input-alignment validation before decoding typed buffers. No dependency changes are needed.
query_indexdataset column.num_queries k refine_factor <= 100000(unset refinement counts as 1). These bounds do not cap total index/payload memory.Validation:
cargo test: 469 Rust tests passed.cargo test --test compile_and_run_test -- --ignored: all 3 native consumer tests passed (C, C++, and static OSS transport); batch checks validate per-query ids, distances, counts, and stream ownership.cargo clippy --locked --all-targets -- -D warnings,cargo check --locked --all-targets, formatting, and diff checks passed.