Jackie-Jiang commented on a change in pull request #6877: URL: https://github.com/apache/incubator-pinot/pull/6877#discussion_r627883425
########## File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/json/ImmutableJsonIndexReader.java ########## @@ -50,15 +50,16 @@ public class ImmutableJsonIndexReader implements JsonIndexReader { // NOTE: Use long type for _numDocs to comply with the RoaringBitmap APIs. private final long _numDocs; + private final int _version; private final StringDictionary _dictionary; private final BitmapInvertedIndexReader _invertedIndex; private final PinotDataBuffer _docIdMapping; public ImmutableJsonIndexReader(PinotDataBuffer dataBuffer, int numDocs) { _numDocs = numDocs; - - int version = dataBuffer.getInt(0); - Preconditions.checkState(version == BaseJsonIndexCreator.VERSION, "Unsupported json index version: %s", version); + _version = dataBuffer.getInt(0); + Preconditions.checkState(_version == BaseJsonIndexCreator.VERSION_1 || _version == BaseJsonIndexCreator.VERSION_2, Review comment: We want the reader to support both versions in case there are segments with different version -- 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. 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