Package org.apache.orc.impl
Class ConvertTreeReaderFactory.ConvertTreeReader
java.lang.Object
org.apache.orc.impl.TreeReaderFactory.TreeReader
org.apache.orc.impl.ConvertTreeReaderFactory.ConvertTreeReader
- All Implemented Interfaces:
TypeReader
- Direct Known Subclasses:
ConvertTreeReaderFactory.AnyIntegerFromAnyIntegerTreeReader
,ConvertTreeReaderFactory.AnyIntegerFromDecimalTreeReader
,ConvertTreeReaderFactory.AnyIntegerFromDoubleTreeReader
,ConvertTreeReaderFactory.AnyIntegerFromStringGroupTreeReader
,ConvertTreeReaderFactory.AnyIntegerFromTimestampTreeReader
,ConvertTreeReaderFactory.DateFromStringGroupTreeReader
,ConvertTreeReaderFactory.DateFromTimestampTreeReader
,ConvertTreeReaderFactory.DecimalFromAnyIntegerTreeReader
,ConvertTreeReaderFactory.DecimalFromDecimalTreeReader
,ConvertTreeReaderFactory.DecimalFromDoubleTreeReader
,ConvertTreeReaderFactory.DecimalFromStringGroupTreeReader
,ConvertTreeReaderFactory.DecimalFromTimestampTreeReader
,ConvertTreeReaderFactory.DoubleFromAnyIntegerTreeReader
,ConvertTreeReaderFactory.DoubleFromDecimalTreeReader
,ConvertTreeReaderFactory.DoubleFromStringGroupTreeReader
,ConvertTreeReaderFactory.DoubleFromTimestampTreeReader
,ConvertTreeReaderFactory.FloatFromDoubleTreeReader
,ConvertTreeReaderFactory.StringGroupFromAnyIntegerTreeReader
,ConvertTreeReaderFactory.StringGroupFromBinaryTreeReader
,ConvertTreeReaderFactory.StringGroupFromDateTreeReader
,ConvertTreeReaderFactory.StringGroupFromDecimalTreeReader
,ConvertTreeReaderFactory.StringGroupFromDoubleTreeReader
,ConvertTreeReaderFactory.StringGroupFromStringGroupTreeReader
,ConvertTreeReaderFactory.StringGroupFromTimestampTreeReader
,ConvertTreeReaderFactory.TimestampFromAnyIntegerTreeReader
,ConvertTreeReaderFactory.TimestampFromDateTreeReader
,ConvertTreeReaderFactory.TimestampFromDecimalTreeReader
,ConvertTreeReaderFactory.TimestampFromDoubleTreeReader
,ConvertTreeReaderFactory.TimestampFromStringGroupTreeReader
- Enclosing class:
- ConvertTreeReaderFactory
Override methods like checkEncoding to pass-thru to the convert TreeReader.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.orc.impl.reader.tree.TypeReader
TypeReader.ReaderCategory, TypeReader.ReadPhase
-
Field Summary
Fields inherited from class org.apache.orc.impl.TreeReaderFactory.TreeReader
columnId, context, present, readerCategory
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
assignStringGroupVectorEntry
(org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector bytesColVector, int elementNum, TypeDescription readerType, byte[] bytes) protected void
assignStringGroupVectorEntry
(org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector bytesColVector, int elementNum, TypeDescription readerType, byte[] bytes, int start, int length) void
checkEncoding
(OrcProto.ColumnEncoding encoding) protected void
convertStringGroupVectorElement
(org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector bytesColVector, int elementNum, TypeDescription readerType) void
convertVector
(org.apache.hadoop.hive.ql.exec.vector.ColumnVector fromColVector, org.apache.hadoop.hive.ql.exec.vector.ColumnVector resultColVector, int batchSize) boolean
doubleCanFitInLong
(double doubleValue) void
downCastAnyInteger
(org.apache.hadoop.hive.ql.exec.vector.LongColumnVector longColVector, int elementNum, long inputLong, TypeDescription readerType) void
downCastAnyInteger
(org.apache.hadoop.hive.ql.exec.vector.LongColumnVector longColVector, int elementNum, TypeDescription readerType) protected boolean
protected boolean
integerDownCastNeeded
(TypeDescription fileType, TypeDescription readerType) protected org.apache.hadoop.hive.common.type.HiveDecimal
parseDecimalFromString
(String string) protected double
parseDoubleFromString
(String string) protected float
parseFloatFromString
(String string) protected long
parseLongFromString
(String string) void
seek
(PositionProvider[] index, TypeReader.ReadPhase readPhase) Seek to the given position.void
seek
(PositionProvider index, TypeReader.ReadPhase readPhase) void
setConvertVectorElement
(int elementNum) Override this to use convertVector.void
skipRows
(long items, TypeReader.ReadPhase readPhase) void
startStripe
(StripePlanner planner, TypeReader.ReadPhase readPhase) Methods inherited from class org.apache.orc.impl.TreeReaderFactory.TreeReader
countNonNullRowsInRange, countNonNulls, createIntegerReader, getColumnId, getPresent, getReaderCategory, nextVector
-
Method Details
-
assignStringGroupVectorEntry
protected void assignStringGroupVectorEntry(org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector bytesColVector, int elementNum, TypeDescription readerType, byte[] bytes) -
assignStringGroupVectorEntry
protected void assignStringGroupVectorEntry(org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector bytesColVector, int elementNum, TypeDescription readerType, byte[] bytes, int start, int length) -
convertStringGroupVectorElement
protected void convertStringGroupVectorElement(org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector bytesColVector, int elementNum, TypeDescription readerType) -
getIsParseError
protected boolean getIsParseError() -
parseLongFromString
-
parseFloatFromString
-
parseDoubleFromString
-
parseDecimalFromString
- Parameters:
string
-- Returns:
- the HiveDecimal parsed, or null if there was a parse error.
-
doubleCanFitInLong
public boolean doubleCanFitInLong(double doubleValue) -
checkEncoding
- Specified by:
checkEncoding
in interfaceTypeReader
- Overrides:
checkEncoding
in classTreeReaderFactory.TreeReader
- Throws:
IOException
-
startStripe
- Specified by:
startStripe
in interfaceTypeReader
- Overrides:
startStripe
in classTreeReaderFactory.TreeReader
- Throws:
IOException
-
seek
Description copied from class:TreeReaderFactory.TreeReader
Seek to the given position.- Specified by:
seek
in interfaceTypeReader
- Overrides:
seek
in classTreeReaderFactory.TreeReader
- Parameters:
index
- the indexes loaded from the filereadPhase
- the current readPhase- Throws:
IOException
-
seek
- Specified by:
seek
in interfaceTypeReader
- Overrides:
seek
in classTreeReaderFactory.TreeReader
- Throws:
IOException
-
skipRows
- Throws:
IOException
-
setConvertVectorElement
Override this to use convertVector. Source and result are member variables in the subclass with the right type.- Parameters:
elementNum
-- Throws:
IOException
-
convertVector
public void convertVector(org.apache.hadoop.hive.ql.exec.vector.ColumnVector fromColVector, org.apache.hadoop.hive.ql.exec.vector.ColumnVector resultColVector, int batchSize) throws IOException - Throws:
IOException
-
downCastAnyInteger
public void downCastAnyInteger(org.apache.hadoop.hive.ql.exec.vector.LongColumnVector longColVector, int elementNum, TypeDescription readerType) -
downCastAnyInteger
public void downCastAnyInteger(org.apache.hadoop.hive.ql.exec.vector.LongColumnVector longColVector, int elementNum, long inputLong, TypeDescription readerType) -
integerDownCastNeeded
-