raghavyadav01 commented on code in PR #15526:
URL: https://github.com/apache/pinot/pull/15526#discussion_r2074088607
##########
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:
MapIndexReader provides map key level API's and MapIndexReaderWrapper wraps
forwardIndex to provide the Map key level API's when default forwardIndex is
used for Map.
--
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]