Copilot commented on code in PR #16436:
URL: https://github.com/apache/pinot/pull/16436#discussion_r2234273844
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/json/MutableJsonIndexImpl.java:
##########
@@ -198,86 +201,131 @@ private boolean isExclusive(Predicate.Type
predicateType) {
* It stores either a bitmap from posting list that must be cloned before
mutating (readOnly=true)
* or an already cloned bitmap.
*/
- static class LazyBitmap {
-
- final static LazyBitmap EMPTY_BITMAP = new LazyBitmap(null);
+ private static class LazyBitmap {
+ final static LazyBitmap EMPTY_BITMAP = createImmutable(new
RoaringBitmap());
Review Comment:
Creating a new RoaringBitmap instance for EMPTY_BITMAP is inefficient.
Consider using RoaringBitmap's built-in empty bitmap or a singleton empty
bitmap to avoid unnecessary object creation.
```suggestion
final static LazyBitmap EMPTY_BITMAP =
createImmutable(RoaringBitmap.bitmapOf());
```
--
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]