gortiz commented on code in PR #10184: URL: https://github.com/apache/pinot/pull/10184#discussion_r1138778974
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java: ########## @@ -162,22 +165,27 @@ private File getValidDocIdsSnapshotFile() { } @Override - public Dictionary getDictionary(String column) { + public <I extends IndexReader> I getIndex(String column, IndexType<?, I, ?> type) { ColumnIndexContainer container = _indexContainerMap.get(column); if (container == null) { throw new NullPointerException("Invalid column: " + column); } - return container.getDictionary(); + return type.getIndexReader(container); + } + + @Override + public Dictionary getDictionary(String column) { Review Comment: It is a matter of usability (it is shorter/easier to call this method), to reduce the changes in the caller sites (this PR is large enough) and... well, the only reason to remove this is to reduce the number of lines, which is fine, but it doesn't seem super critical. -- 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