JeonDaehong commented on code in PR #1145:
URL: https://github.com/apache/paimon-rust/pull/1145#discussion_r4442815678


##########
crates/paimon/src/table/de_vector_read.rs:
##########
@@ -639,11 +639,14 @@ async fn scalar_matched_row_ids(
     let Some(scanner) = scanner else {
         return Ok(None);
     };
-    let Some((ranges, exact)) = 
scanner.matching_ranges_with_exactness(filter).await? else {
+    let Some((ranges, exact, candidate_ranges)) =
+        scanner.matching_ranges_with_exactness(filter).await?
+    else {
         return Ok(None);
     };
     let ranges = intersect_sorted_ranges(&ranges, vector_ranges);
-    if exact {
+    // Candidates outside the rows this search ranks do not make it inexact.
+    if exact && intersect_sorted_ranges(&candidate_ranges, &ranges).is_empty() 
{

Review Comment:
   Fixed in 92e4758a. With an exact answer only the rows in `candidate_ranges` 
are refined or dropped now, and filter.rs got the same change. Added your 
bitmap-then-BTree case for vector search plus a full-text one, both returned [] 
before.



-- 
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]

Reply via email to