saurabhd336 commented on code in PR #12568: URL: https://github.com/apache/pinot/pull/12568#discussion_r1516048942
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/json/MutableJsonIndexImpl.java: ########## @@ -291,6 +297,88 @@ private RoaringBitmap getMatchingFlattenedDocIds(Predicate predicate) { } else { return new RoaringBitmap(); } + } else if (predicateType == Predicate.Type.REGEXP_LIKE) { + String ceilingKey = _postingListMap.ceilingKey(key + BaseJsonIndexCreator.KEY_VALUE_SEPARATOR); + if (ceilingKey == null || !ceilingKey.startsWith(key + BaseJsonIndexCreator.KEY_VALUE_SEPARATOR)) { + // No values with this key exist + return new RoaringBitmap(); + } + + Pattern pattern = ((RegexpLikePredicate) predicate).getPattern(); + MutableRoaringBitmap result = null; + char nextChar = BaseJsonIndexCreator.KEY_VALUE_SEPARATOR + 1; + SortedMap<String, RoaringBitmap> subMap = + _postingListMap.subMap(ceilingKey, true, _postingListMap.floorKey(key + nextChar), true); Review Comment: Makes sense. subMap does not require the key to be present -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org