SteNicholas commented on code in PR #1487:
URL: https://github.com/apache/paimon-rust/pull/1487#discussion_r4653602715
##########
crates/paimon/src/table/de_vector_read/tests.rs:
##########
@@ -918,34 +923,39 @@ fn
test_collect_raw_batch_vector_batch_scores_only_include_row_ids() {
],
)
.unwrap();
- let mut include_row_ids = RoaringTreemap::new();
- include_row_ids.insert(12);
- let searches = vec![
- VectorSearch::new(vec![1.0, 0.0], 2, "embedding".to_string())
- .unwrap()
- .with_include_row_ids(include_row_ids),
- ];
- let scoring_plan = RawScoringPlan::new(&searches, RawVectorMetric::L2);
- let mut top_k = searches
- .iter()
- .map(|search| RawScoreTopK::new(search.limit))
- .collect::<Vec<_>>();
-
- collect_raw_batch_vector_batch(
- &batch,
- &searches,
- RawVectorMetric::L2,
- &scoring_plan,
- &mut top_k,
- )
- .unwrap();
- let results = top_k
- .into_iter()
- .map(RawScoreTopK::into_search_result)
- .collect::<Vec<_>>();
+ for included in [&[12][..], &[12, 11][..]] {
+ let searches = included
+ .iter()
+ .map(|&row_id| {
+ VectorSearch::new(vec![1.0, 0.0], 2, "embedding".to_string())
+ .unwrap()
+ .with_include_row_ids(std::iter::once(row_id).collect())
Review Comment:
**Both test cases use the per-query candidate map.** `with_include_row_ids`
clears `shared_include_row_ids`, so `RawScoringPlan` builds zero shared filter
groups even for the single-query case. The new `peek()` and subsequent
iteration could skip a matching shared group and these assertions would still
pass. Please add two queries that call `set_shared_include_row_ids` with clones
of the same `Arc<RoaringTreemap>`, exclude row 10, and assert that both queries
return the selected row.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]