Jackie-Jiang commented on a change in pull request #7454:
URL: https://github.com/apache/pinot/pull/7454#discussion_r713297152
##########
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:
Yeah, we should also log when we find the index is configured but not
possible to be built (e.g. for string columns).
A more graceful failure mode sounds good to me. We might want to log a
warning on not loading the unknown index
--
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]