Skip to content

Commit d96af83

Browse files
committed
fix
1 parent 0af2d81 commit d96af83

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

paimon-core/src/main/java/org/apache/paimon/table/source/VectorScanImpl.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ public Plan scan() {
9393
// Group vector index files by (rowRangeStart, rowRangeEnd)
9494
Map<Range, List<IndexFileMeta>> vectorByRange = new HashMap<>();
9595
for (IndexFileMeta indexFile : allIndexFiles) {
96-
GlobalIndexMeta meta = indexFile.globalIndexMeta();
97-
checkNotNull(meta);
96+
GlobalIndexMeta meta = checkNotNull(indexFile.globalIndexMeta());
9897
if (meta.indexFieldId() == vectorColumn.id()) {
9998
Range range = new Range(meta.rowRangeStart(), meta.rowRangeEnd());
10099
vectorByRange.computeIfAbsent(range, k -> new ArrayList<>()).add(indexFile);
@@ -109,9 +108,14 @@ public Plan scan() {
109108
List<IndexFileMeta> scalarFiles =
110109
allIndexFiles.stream()
111110
.filter(
112-
f ->
113-
range.hasIntersection(
114-
checkNotNull(f.globalIndexMeta()).rowRange()))
111+
f -> {
112+
GlobalIndexMeta globalIndex =
113+
checkNotNull(f.globalIndexMeta());
114+
if (globalIndex.indexFieldId() == vectorColumn.id()) {
115+
return false;
116+
}
117+
return range.hasIntersection(globalIndex.rowRange());
118+
})
115119
.collect(Collectors.toList());
116120
splits.add(new VectorSearchSplit(range.from, range.to, vectorFiles, scalarFiles));
117121
}

0 commit comments

Comments
 (0)