Class FixedBytePower2ChunkSVForwardIndexReader
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.index.readers.forward.BaseChunkForwardIndexReader
-
- org.apache.pinot.segment.local.segment.index.readers.forward.FixedBytePower2ChunkSVForwardIndexReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable,IndexReader,ForwardIndexReader<ChunkReaderContext>
public final class FixedBytePower2ChunkSVForwardIndexReader extends BaseChunkForwardIndexReader
Chunk-based single-value raw (non-dictionary-encoded) forward index reader for values of fixed length data type (INT, LONG, FLOAT, DOUBLE).For data layout, please refer to the documentation for
FixedByteChunkSVForwardIndexWriter
-
-
Field Summary
Fields Modifier and Type Field Description static intVERSION-
Fields inherited from class org.apache.pinot.segment.local.segment.index.readers.forward.BaseChunkForwardIndexReader
_chunkDecompressor, _compressionType, _dataBuffer, _dataHeader, _headerEntryChunkOffsetSize, _isCompressed, _isSingleValue, _lengthOfLongestEntry, _numChunks, _numDocsPerChunk, _rawData, _storedType
-
-
Constructor Summary
Constructors Constructor Description FixedBytePower2ChunkSVForwardIndexReader(PinotDataBuffer dataBuffer, FieldSpec.DataType valueType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChunkReaderContextcreateContext()protected ByteBuffergetChunkBuffer(int docId, ChunkReaderContext context)Helper method to return the chunk buffer that contains the value at the given document id.doublegetDouble(int docId, ChunkReaderContext context)floatgetFloat(int docId, ChunkReaderContext context)intgetInt(int docId, ChunkReaderContext context)longgetLong(int docId, ChunkReaderContext context)-
Methods inherited from class org.apache.pinot.segment.local.segment.index.readers.forward.BaseChunkForwardIndexReader
close, decompressChunk, getChunkPosition, getCompressionType, getLengthOfLongestEntry, getStoredType, isDictionaryEncoded, isSingleValue, readValuesSV, readValuesSV, readValuesSV, readValuesSV
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pinot.segment.spi.index.reader.ForwardIndexReader
getBigDecimal, getBytes, getBytesMV, getBytesMV, getDictId, getDictIdMV, getDictIdMV, getDoubleMV, getDoubleMV, getFloatMV, getFloatMV, getIntMV, getIntMV, getLongMV, getLongMV, getNumValuesMV, getString, getStringMV, getStringMV, readDictIds, readValuesMV, readValuesMV, readValuesMV, readValuesMV, readValuesMV, readValuesMV, readValuesSV
-
-
-
-
Field Detail
-
VERSION
public static final int VERSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FixedBytePower2ChunkSVForwardIndexReader
public FixedBytePower2ChunkSVForwardIndexReader(PinotDataBuffer dataBuffer, FieldSpec.DataType valueType)
-
-
Method Detail
-
createContext
@Nullable public ChunkReaderContext createContext()
-
getInt
public int getInt(int docId, ChunkReaderContext context)
-
getLong
public long getLong(int docId, ChunkReaderContext context)
-
getFloat
public float getFloat(int docId, ChunkReaderContext context)
-
getDouble
public double getDouble(int docId, ChunkReaderContext context)
-
getChunkBuffer
protected ByteBuffer getChunkBuffer(int docId, ChunkReaderContext context)
Helper method to return the chunk buffer that contains the value at the given document id.- If the chunk already exists in the reader context, returns the same.
- Otherwise, loads the chunk for the row, and sets it in the reader context.
- Overrides:
getChunkBufferin classBaseChunkForwardIndexReader- Parameters:
docId- Document idcontext- Reader context- Returns:
- Chunk for the row
-
-