saurabhd336 commented on code in PR #12568: URL: https://github.com/apache/pinot/pull/12568#discussion_r1515602818
########## 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: `key + "\u0001"` doesn't exist in the map correct? The idea here is to find the key just below `key + "\u0001"` such that it's the that last entry for the key we're searchig. -- 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