richardstartin commented on a change in pull request #7454: URL: https://github.com/apache/pinot/pull/7454#discussion_r712829817
########## File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/column/PhysicalColumnIndexContainer.java ########## @@ -175,7 +176,15 @@ public PhysicalColumnIndexContainer(SegmentDirectory.Reader segmentReader, Colum } if (loadRangeIndex) { - _rangeIndex = new RangeIndexReaderImpl(segmentReader.getIndexFor(columnName, ColumnIndexType.RANGE_INDEX)); + PinotDataBuffer buffer = segmentReader.getIndexFor(columnName, ColumnIndexType.RANGE_INDEX); + int version = buffer.getInt(0); + if (version == 0) { + _rangeIndex = new RangeIndexReaderImpl(buffer); + } else if (version == 1) { + _rangeIndex = new BitSlicedRangeIndexReader(buffer, metadata); + } else { + _rangeIndex = null; Review comment: What about logging that we didn't build the index? I could imagine evolving this in the future and not throwing would keep this forward compatible in mixed version clusters with a more graceful failure mode (just don't use an index we don't currently understand). -- 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