Jackie-Jiang commented on code in PR #18478:
URL: https://github.com/apache/pinot/pull/18478#discussion_r3231900551
##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/IndexSegment.java:
##########
@@ -106,6 +107,31 @@ default DataSource getDataSource(String column) {
@Nullable
ThreadSafeMutableRoaringBitmap getQueryableDocIds();
+ /**
+ * Returns the queryable doc-id bitmap from the upsert snapshot view if the
table has consistency mode
+ * (SYNC or SNAPSHOT) enabled and this segment is included in the latest
refresh; otherwise returns {@code null}.
+ *
+ * <p>Callers that need a consistent view across segments (e.g. query-time
empty-segment pruning) should
+ * prefer this over {@link #getQueryableDocIds()}, which is the segment's
live bitmap and can drift from the
+ * per-query snapshot between refreshes.
+ */
+ @Nullable
+ default MutableRoaringBitmap getQueryableDocIdsSnapshot() {
Review Comment:
It will be much cleaner if you directly add `hasNoQueryableDocs()` to
`IndexSegment`
--
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]