Copilot commented on code in PR #18694:
URL: https://github.com/apache/pinot/pull/18694#discussion_r3369811483


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/filter/JsonMatchFilterOperator.java:
##########
@@ -128,10 +128,14 @@ private void record(ImmutableRoaringBitmap bitmap) {
   }
 
   private ImmutableRoaringBitmap getMatchingDocIdBitmap() {
+    // Request a read-only bitmap: this operator only iterates it 
(BitmapDocIdSet / BitmapCollection /
+    // getCardinality) within the segment's acquired lifetime and never 
mutates it, so an mmap-backed
+    // reader can hand back the posting list directly instead of copying it.
     if (_predicate != null) {

Review Comment:
   `JsonMatchFilterOperator` supports being constructed with a `FilterContext` 
(so `_predicate` is null), and `getMatchingDocIdBitmap()` already handles that. 
However `record()` still unconditionally dereferences `_predicate` when tracing 
is enabled, which can NPE for callers like `MapFilterOperator` that use the 
FilterContext constructor. Consider guarding the tracing metadata population 
when `_predicate` is null so this operator never crashes under tracing.



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