Jackie-Jiang commented on a change in pull request #6774:
URL: https://github.com/apache/incubator-pinot/pull/6774#discussion_r616133001
##########
File path:
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/EmptyIndexSegment.java
##########
@@ -99,6 +101,11 @@ public GenericRow getRecord(int docId, GenericRow reuse) {
throw new UnsupportedOperationException();
}
+ @Override
+ public final Map<String, ColumnIndexContainer> getIndexContainerMap() {
+ return null;
Review comment:
Return `Collections.emptyMap()` here? Or it could cause NPE while
processing the map
##########
File path:
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/IndexContainer.java
##########
@@ -0,0 +1,211 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.segment.local.indexsegment.mutable;
+
+import java.util.Set;
+import javax.annotation.Nullable;
+import org.apache.pinot.segment.local.realtime.impl.geospatial.MutableH3Index;
+import
org.apache.pinot.segment.local.realtime.impl.invertedindex.RealtimeInvertedIndexReader;
+import
org.apache.pinot.segment.local.realtime.impl.invertedindex.RealtimeLuceneTextIndexReader;
+import org.apache.pinot.segment.local.realtime.impl.json.MutableJsonIndex;
+import
org.apache.pinot.segment.local.realtime.impl.nullvalue.MutableNullValueVector;
+import
org.apache.pinot.segment.local.segment.index.column.PhysicalColumnIndexContainer;
+import
org.apache.pinot.segment.local.segment.index.datasource.MutableDataSource;
+import org.apache.pinot.segment.spi.datasource.DataSource;
+import org.apache.pinot.segment.spi.index.column.ColumnIndexContainer;
+import org.apache.pinot.segment.spi.index.reader.BloomFilterReader;
+import org.apache.pinot.segment.spi.index.reader.Dictionary;
+import org.apache.pinot.segment.spi.index.reader.ForwardIndexReader;
+import org.apache.pinot.segment.spi.index.reader.H3IndexReader;
+import org.apache.pinot.segment.spi.index.reader.InvertedIndexReader;
+import org.apache.pinot.segment.spi.index.reader.JsonIndexReader;
+import org.apache.pinot.segment.spi.index.reader.MutableDictionary;
+import org.apache.pinot.segment.spi.index.reader.MutableForwardIndex;
+import org.apache.pinot.segment.spi.index.reader.NullValueVectorReader;
+import org.apache.pinot.segment.spi.index.reader.TextIndexReader;
+import org.apache.pinot.segment.spi.partition.PartitionFunction;
+import org.apache.pinot.spi.data.FieldSpec;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class IndexContainer implements ColumnIndexContainer {
Review comment:
I would recommend keeping this as a sub-class within the
`MutableSegmentImpl`. Separating it out doesn't provide extra value and is not
as readable because the member fields are directly accessed by
`MutableSegmentImpl`.
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]