Package org.apache.orc.impl
Class TreeReaderFactory.TreeReader
java.lang.Object
org.apache.orc.impl.TreeReaderFactory.TreeReader
- All Implemented Interfaces:
TypeReader
- Direct Known Subclasses:
ConvertTreeReaderFactory.ConvertTreeReader
,TreeReaderFactory.BinaryTreeReader
,TreeReaderFactory.BooleanTreeReader
,TreeReaderFactory.ByteTreeReader
,TreeReaderFactory.DateTreeReader
,TreeReaderFactory.Decimal64TreeReader
,TreeReaderFactory.DecimalTreeReader
,TreeReaderFactory.DoubleTreeReader
,TreeReaderFactory.FloatTreeReader
,TreeReaderFactory.IntTreeReader
,TreeReaderFactory.ListTreeReader
,TreeReaderFactory.LongTreeReader
,TreeReaderFactory.MapTreeReader
,TreeReaderFactory.NullTreeReader
,TreeReaderFactory.ShortTreeReader
,TreeReaderFactory.StringDictionaryTreeReader
,TreeReaderFactory.StringDirectTreeReader
,TreeReaderFactory.StringTreeReader
,TreeReaderFactory.StructTreeReader
,TreeReaderFactory.TimestampTreeReader
,TreeReaderFactory.UnionTreeReader
- Enclosing class:
- TreeReaderFactory
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.orc.impl.reader.tree.TypeReader
TypeReader.ReaderCategory, TypeReader.ReadPhase
-
Field Summary
Modifier and TypeFieldDescriptionprotected final int
protected final TreeReaderFactory.Context
protected BitFieldReader
protected final TypeReader.ReaderCategory
-
Constructor Summary
ModifierConstructorDescriptionprotected
TreeReader
(int columnId, InStream in, @NotNull TreeReaderFactory.Context context) -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkEncoding
(OrcProto.ColumnEncoding encoding) protected static int
countNonNullRowsInRange
(boolean[] isNull, int start, int end) protected long
countNonNulls
(long rows) protected static IntegerReader
createIntegerReader
(OrcProto.ColumnEncoding.Kind kind, InStream in, boolean signed, TreeReaderFactory.Context context) int
void
nextVector
(org.apache.hadoop.hive.ql.exec.vector.ColumnVector previous, boolean[] isNull, int batchSize, org.apache.hadoop.hive.ql.io.filter.FilterContext filterContext, TypeReader.ReadPhase readPhase) Populates the isNull vector array in the previousVector object based on the present stream values.void
seek
(PositionProvider[] index, TypeReader.ReadPhase readPhase) Seek to the given position.void
seek
(PositionProvider index, TypeReader.ReadPhase readPhase) void
startStripe
(StripePlanner planner, TypeReader.ReadPhase readPhase) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.orc.impl.reader.tree.TypeReader
skipRows
-
Field Details
-
columnId
protected final int columnId -
present
-
context
-
readerCategory
-
-
Constructor Details
-
TreeReader
protected TreeReader(int columnId, InStream in, @NotNull @NotNull TreeReaderFactory.Context context) throws IOException - Throws:
IOException
-
-
Method Details
-
getReaderCategory
- Specified by:
getReaderCategory
in interfaceTypeReader
-
checkEncoding
- Specified by:
checkEncoding
in interfaceTypeReader
- Throws:
IOException
-
createIntegerReader
protected static IntegerReader createIntegerReader(OrcProto.ColumnEncoding.Kind kind, InStream in, boolean signed, TreeReaderFactory.Context context) throws IOException - Throws:
IOException
-
startStripe
- Specified by:
startStripe
in interfaceTypeReader
- Throws:
IOException
-
seek
Seek to the given position.- Specified by:
seek
in interfaceTypeReader
- Parameters:
index
- the indexes loaded from the filereadPhase
- the current readPhase- Throws:
IOException
-
seek
- Specified by:
seek
in interfaceTypeReader
- Throws:
IOException
-
countNonNullRowsInRange
protected static int countNonNullRowsInRange(boolean[] isNull, int start, int end) -
countNonNulls
- Throws:
IOException
-
nextVector
public void nextVector(org.apache.hadoop.hive.ql.exec.vector.ColumnVector previous, boolean[] isNull, int batchSize, org.apache.hadoop.hive.ql.io.filter.FilterContext filterContext, TypeReader.ReadPhase readPhase) throws IOException Populates the isNull vector array in the previousVector object based on the present stream values. This function is called from all the child readers, and they all set the values based on isNull field value.- Specified by:
nextVector
in interfaceTypeReader
- Parameters:
previous
- The columnVector object whose isNull value is populatedisNull
- Whether the each value was null at a higher level. If isNull is null, all values are non-null.batchSize
- Size of the column vectorfilterContext
- the information about the rows that were selected by the filter.readPhase
- The read level- Throws:
IOException
-
getPresent
-
getColumnId
public int getColumnId()- Specified by:
getColumnId
in interfaceTypeReader
-