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 voidassignStringGroupVectorEntry(org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector bytesColVector, int elementNum, TypeDescription readerType, byte[] bytes) protected voidassignStringGroupVectorEntry(org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector bytesColVector, int elementNum, TypeDescription readerType, byte[] bytes, int start, int length) voidcheckEncoding(OrcProto.ColumnEncoding encoding) protected voidconvertStringGroupVectorElement(org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector bytesColVector, int elementNum, TypeDescription readerType) voidconvertVector(org.apache.hadoop.hive.ql.exec.vector.ColumnVector fromColVector, org.apache.hadoop.hive.ql.exec.vector.ColumnVector resultColVector, int batchSize) booleandoubleCanFitInLong(double doubleValue) voiddownCastAnyInteger(org.apache.hadoop.hive.ql.exec.vector.LongColumnVector longColVector, int elementNum, long inputLong, TypeDescription readerType) voiddownCastAnyInteger(org.apache.hadoop.hive.ql.exec.vector.LongColumnVector longColVector, int elementNum, TypeDescription readerType) protected booleanprotected booleanintegerDownCastNeeded(TypeDescription fileType, TypeDescription readerType) protected org.apache.hadoop.hive.common.type.HiveDecimalparseDecimalFromString(String string) protected doubleparseDoubleFromString(String string) protected floatparseFloatFromString(String string) protected longparseLongFromString(String string) voidseek(PositionProvider[] index, TypeReader.ReadPhase readPhase) Seek to the given position.voidseek(PositionProvider index, TypeReader.ReadPhase readPhase) voidsetConvertVectorElement(int elementNum) Override this to use convertVector.voidskipRows(long items, TypeReader.ReadPhase readPhase) voidstartStripe(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:
checkEncodingin interfaceTypeReader- Overrides:
checkEncodingin classTreeReaderFactory.TreeReader- Throws:
IOException
-
startStripe
- Specified by:
startStripein interfaceTypeReader- Overrides:
startStripein classTreeReaderFactory.TreeReader- Throws:
IOException
-
seek
Description copied from class:TreeReaderFactory.TreeReaderSeek to the given position.- Specified by:
seekin interfaceTypeReader- Overrides:
seekin classTreeReaderFactory.TreeReader- Parameters:
index- the indexes loaded from the filereadPhase- the current readPhase- Throws:
IOException
-
seek
- Specified by:
seekin interfaceTypeReader- Overrides:
seekin 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
-