raghavyadav01 commented on code in PR #15526: URL: https://github.com/apache/pinot/pull/15526#discussion_r2101512993
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/map/MutableMapDataSource.java: ########## @@ -55,15 +55,13 @@ public MutableMapDataSource(FieldSpec fieldSpec, int numDocs, int numValues, int partitionFunction, partitions, minValue, maxValue, maxRowLengthInBytes), new ColumnIndexContainer.FromMap.Builder().withAll(mutableIndexes).build()); _mutableIndexes = mutableIndexes; - MapIndexReader mapIndexReader = getMapIndex(); - if (mapIndexReader == null) { - // Fallback to use forward index - ForwardIndexReader<?> forwardIndex = getForwardIndex(); - if (forwardIndex instanceof MapIndexReader) { - mapIndexReader = (MapIndexReader) forwardIndex; - } else { - mapIndexReader = new MapIndexReaderWrapper(forwardIndex, getFieldSpec()); - } + MapIndexReader mapIndexReader; + // Fallback to use forward index + ForwardIndexReader<?> forwardIndex = getForwardIndex(); + if (forwardIndex instanceof MapIndexReader) { + mapIndexReader = (MapIndexReader) forwardIndex; + } else { + mapIndexReader = new MapIndexReaderWrapper(forwardIndex, getFieldSpec()); Review Comment: Yes, the wrapper is required for keyMetadata API while constructing the Key datasource. -- 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