JunRuiLee commented on code in PR #110:
URL: 
https://github.com/apache/paimon-vector-index/pull/110#discussion_r4059752768


##########
java/src/main/java/org/apache/paimon/index/vector/VectorRangeSearchResult.java:
##########
@@ -0,0 +1,145 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.paimon.index.vector;
+
+import java.util.Arrays;
+import java.util.Objects;
+
+/**
+ * CSR range-search output in core scan order, with raw distances and no 
sorting or top-K cap.
+ * IVF-Flat distances are exact; SQ, PQ and RQ return their core distance 
estimates. Each query
+ * occupies [lims[query], lims[query + 1]); all arrays are defensively copied.
+ */
+public final class VectorRangeSearchResult {
+
+    private final long[] labels;
+    private final float[] distances;
+    private final long[] lims;
+    private final long[] listsProbed;
+    private final long[] rowsScanned;
+    private final long[] rowsCommitted;
+    private final long[] earlyAbandoned;
+    private final long listReads;
+
+    public VectorRangeSearchResult(
+            long[] labels,
+            float[] distances,
+            long[] lims,
+            long[] listsProbed,
+            long[] rowsScanned,
+            long[] rowsCommitted,
+            long[] earlyAbandoned,
+            long listReads) {
+        this.labels = Objects.requireNonNull(labels, "labels").clone();
+        this.distances = Objects.requireNonNull(distances, 
"distances").clone();

Review Comment:
   Thanks, fixed in d4a2d3c. JNI now uses a package-private ownership-taking 
factory; public construction and getters remain defensive. Added regression 
coverage.



##########
include/paimon_vindex.hpp:
##########
@@ -669,6 +815,21 @@ class Reader {
     }
 

Review Comment:
   Thanks, fixed in d4a2d3c. Removed the helper and all four calls, retaining 
null initialization and C ABI validation. Added filtered-input regression 
coverage.



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