pzhdfy commented on code in PR #68988:
URL: https://github.com/apache/doris/pull/68988#discussion_r4258231619


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/source/PaimonScanNode.java:
##########
@@ -1156,6 +1266,13 @@ protected List<String> getDeleteFiles(TFileRangeDesc 
rangeDesc) {
 
     @Override
     public List<Split> getSplits(int numBackends) throws UserException {
+        // Primary-key vector (ANN) search is planned entirely by Paimon's
+        // BatchVectorSearchBuilder: one BucketVectorSearchSplit per 
(partition,
+        // bucket), serialized and carried to BE, which runs the whole search
+        // (recall + refine + row lookup + DV) in a single paimon-rust call.
+        if (isVectorSearch()) {
+            return getVectorSearchSplits();

Review Comment:
    Agreed — stripping the cast chain searched the original vectors while the 
query meant the casted ones, changing both the ranking and the reported 
distance. The lossy ARRAY<FLOAT> -> ARRAY<INT> -> ARRAY<FLOAT> round trip is 
not simplified away, so it was reachable.
   ▎
   ▎ Fixed in 4790f5a: the rewrite no longer strips casts at all; it accepts a 
direct indexed column slot only. The lossy-array-cast negative rewrite case is 
added to PushDownVectorTopNIntoPaimonScanTest.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to