xiangfu0 commented on code in PR #19303:
URL: https://github.com/apache/pinot/pull/19303#discussion_r3890418560
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/vector/MutableVectorIndex.java:
##########
@@ -152,16 +193,39 @@ public void add(Object[] values, @Nullable int[] dictIds,
int docId) {
@Override
public MutableRoaringBitmap getDocIds(float[] vector, int topK) {
+ return submitSearch(vector, topK, null);
+ }
+
+ @Override
+ public boolean supportsPreFilter() {
+ // Every filtered call restricts its candidates to the supplied bitmap; it
never degrades to an unfiltered
+ // search, so the engine can rely on filtered search instead of an exact
scan.
+ return true;
Review Comment:
Done -- default is back to `true` and all five overrides are gone.
You are right that implementing an interface named
`FilterAwareVectorIndexReader` is itself the declaration that the reader does
filtered search, so the permissive default matches the intent and the overrides
only restated it. The Javadoc now says that explicitly: override to `false`
only when the filter can be honored conditionally, in which case the engine
falls back to an exact scan.
The tightened contract stays, since that is the part this PR needs -- a
reader answering `true` commits to returning a subset of the supplied bitmap on
every filtered call and must never heuristically degrade to unfiltered search,
because the engine relies on filtered search to keep obsolete row versions out
of candidate generation.
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
--
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]