Class OffsetVectorReader
java.lang.Object
org.apache.drill.exec.vector.accessor.reader.AbstractScalarReader
org.apache.drill.exec.vector.accessor.reader.BaseScalarReader
org.apache.drill.exec.vector.accessor.reader.BaseScalarReader.BaseFixedWidthReader
org.apache.drill.exec.vector.accessor.reader.OffsetVectorReader
- All Implemented Interfaces:
ColumnReader
,ReaderEvents
,ScalarReader
Reader for an offset vector.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.vector.accessor.reader.BaseScalarReader
BaseScalarReader.BaseFixedWidthReader, BaseScalarReader.BaseVarWidthReader, BaseScalarReader.BufferAccessor
Nested classes/interfaces inherited from class org.apache.drill.exec.vector.accessor.reader.AbstractScalarReader
AbstractScalarReader.NullReader, AbstractScalarReader.ScalarObjectReader
-
Field Summary
Fields inherited from class org.apache.drill.exec.vector.accessor.reader.BaseScalarReader
bufferAccessor, schema, vectorAccessor
Fields inherited from class org.apache.drill.exec.vector.accessor.reader.AbstractScalarReader
nullStateReader, vectorIndex
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.drill.exec.vector.accessor.reader.BaseScalarReader.BaseFixedWidthReader
offsetIndex
Methods inherited from class org.apache.drill.exec.vector.accessor.reader.BaseScalarReader
bindBuffer, bindIndex, bindVector, buffer, bufferAccessor, buildOptional, buildRequired
Methods inherited from class org.apache.drill.exec.vector.accessor.reader.AbstractScalarReader
bindNullState, conversionError, extendedType, getAsString, getBoolean, getBytes, getDate, getDecimal, getDouble, getFloat, getInt, getLong, getObject, getPeriod, getString, getTime, getTimestamp, getValue, isNull, nullReader, nullStateReader, type
-
Constructor Details
-
OffsetVectorReader
-
-
Method Details
-
valueType
Description copied from interface:ScalarReader
Describe the type of the value. This is a compression of the value vector type: it describes which method will return the vector value.- Returns:
- the value type which indicates which get method is valid for the column
-
width
public int width()- Specified by:
width
in classBaseScalarReader.BaseFixedWidthReader
-
getEntry
public long getEntry()Return the offset and length of a value encoded as a long. The value is encoded to avoid the need to resolve the offset vector twice per value.- Returns:
- a long with the format:
Upper 32 bits - offset: offset = (int) (entry >> 32)
Lower 32 bits - length: length = (int) (entry & 0xFFFF_FFFF)
-
reposition
public void reposition()- Specified by:
reposition
in interfaceReaderEvents
- Overrides:
reposition
in classAbstractScalarReader
-
schema
- Specified by:
schema
in interfaceColumnReader
- Overrides:
schema
in classBaseScalarReader
-