bziobrowski commented on code in PR #15591: URL: https://github.com/apache/pinot/pull/15591#discussion_r2053820854
########## pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/metadata/ColumnMetadataImpl.java: ########## @@ -164,10 +172,40 @@ public Set<Integer> getPartitions() { return _partitions; } - @Nullable @Override - public Map<IndexType<?, ?, ?>, Long> getIndexSizeMap() { - return _indexSizeMap; + public long getIndexSizeFor(IndexType type) { + short indexId = IndexService.getInstance().getNumericId(type); + for (int i = 0, n = getIndexTypeSizesCount(); i < n; i++) { + if (indexId == getIndexType(i)) { + return getIndexSize(i); + } + } + + return INDEX_NOT_FOUND; + } + + // size should be non-negative 48-bit value + public void addIndexSize(short indexType, long size) { + if (size < 0 || size > SIZE_MASK) { Review Comment: Switched to throwing exception here. -- 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