JingsongLi commented on code in PR #771:
URL: https://github.com/apache/paimon-rust/pull/771#discussion_r3921423770


##########
crates/paimon/src/table/vector_search_builder.rs:
##########
@@ -416,6 +418,131 @@ impl<'a> VectorSearchBuilder<'a> {
             .await
     }
 
+    /// Run this search over bucket splits an engine planned elsewhere, and
+    /// materialize the hits.
+    ///
+    /// The unit of work is Java's `BucketVectorSearchSplit` byte form: a 
planner
+    /// running in Paimon Java enumerates one split per bucket -- a bucket is 
never
+    /// divided, because the ANN current-segment decision needs the bucket's 
whole
+    /// active file set -- and ships each to a worker that calls this. The 
splits
+    /// are the plan: their payload files, their per-file row ranges and the
+    /// snapshot they pin are used as given, and this table's index manifest 
is not
+    /// read.
+    ///
+    /// Everything after planning is the ordinary primary-key vector read, so
+    /// search, optional refine, local Top-K and materialization stay 
identical to
+    /// [`execute_read`](Self::execute_read): output is the projected user 
columns
+    /// plus `__paimon_search_score`, best-first. The Top-K is local to the 
supplied
+    /// splits; a caller distributing one call per bucket merges the per-bucket
+    /// results itself.
+    ///
+    /// Only a primary-key vector column can be read this way. The 
data-evolution
+    /// route plans through the global index rather than through bucket 
splits, so
+    /// it is rejected rather than silently answered from a different plan.
+    pub async fn execute_read_for_bucket_splits(

Review Comment:
   Why not use VectorRead to read and use TableScan and TableRead to read real 
data?



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