bziobrowski commented on code in PR #15591: URL: https://github.com/apache/pinot/pull/15591#discussion_r2053811235
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/column/PhysicalColumnIndexContainer.java: ########## @@ -39,7 +39,11 @@ public final class PhysicalColumnIndexContainer implements ColumnIndexContainer { private static final Logger LOGGER = LoggerFactory.getLogger(PhysicalColumnIndexContainer.class); - private final Map<IndexType, IndexReader> _readersByIndex; + private static final IndexReader[] EMPTY_READERS = new IndexReader[0]; + Review Comment: While some of the code I added is related to missing exception handling (that could lead to memory leaks), I'd say this class is still quite small and trivial. Is there another place we could realistically use this `map` on ? TBH I don't think map is the right abstraction here anyway. Considering that a column won't really have that many indexes at the same time, a pair of arrays (short|byte and IndexReader) and linear search could be better. EnumMap is cool but would take several times more memory. -- 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