Class InvertedIndexType.ReaderFactory
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.index.inverted.InvertedIndexType.ReaderFactory
-
- All Implemented Interfaces:
IndexReaderFactory<InvertedIndexReader>
- Enclosing class:
- InvertedIndexType
public static class InvertedIndexType.ReaderFactory extends Object implements IndexReaderFactory<InvertedIndexReader>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pinot.segment.spi.index.IndexReaderFactory
IndexReaderFactory.Default<C extends IndexConfig,R extends IndexReader>
-
-
Field Summary
Fields Modifier and Type Field Description static InvertedIndexType.ReaderFactoryINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvertedIndexReadercreateIndexReader(SegmentDirectory.Reader segmentReader, FieldIndexConfigs fieldIndexConfigs, ColumnMetadata metadata)Creates aInvertedIndexReader.InvertedIndexReadercreateSkippingForward(SegmentDirectory.Reader segmentReader, ColumnMetadata metadata)Directly creates aInvertedIndexReader.
-
-
-
Field Detail
-
INSTANCE
public static final InvertedIndexType.ReaderFactory INSTANCE
-
-
Method Detail
-
createIndexReader
public InvertedIndexReader createIndexReader(SegmentDirectory.Reader segmentReader, FieldIndexConfigs fieldIndexConfigs, ColumnMetadata metadata) throws IOException, IndexReaderConstraintException
Creates aInvertedIndexReader. UnlesscreateSkippingForward(SegmentDirectory.Reader, ColumnMetadata), this method first try to use the forward index reader in case it is also an inverted index. That is the case, for example, when the column is sorted and single value.- Specified by:
createIndexReaderin interfaceIndexReaderFactory<InvertedIndexReader>- Throws:
IOExceptionIndexReaderConstraintException
-
createSkippingForward
public InvertedIndexReader createSkippingForward(SegmentDirectory.Reader segmentReader, ColumnMetadata metadata) throws IOException
Directly creates aInvertedIndexReader. UnlesscreateIndexReader(org.apache.pinot.segment.spi.store.SegmentDirectory.Reader, org.apache.pinot.segment.spi.index.FieldIndexConfigs, org.apache.pinot.segment.spi.ColumnMetadata), this method always tries to create the actual inverted index reader instead of try to use the forward index when the column is sorted and single value.- Throws:
IOException
-
-