Class UnionReader
java.lang.Object
org.apache.drill.exec.vector.complex.impl.AbstractFieldReader
org.apache.drill.exec.vector.complex.impl.UnionReader
- All Implemented Interfaces:
Iterable<String>
,Positionable
,BaseReader
,BaseReader.DictReader
,BaseReader.ListReader
,BaseReader.MapReader
,BaseReader.RepeatedListReader
,BaseReader.RepeatedMapReader
,BaseReader.ScalarReader
,BigIntReader
,BitReader
,DateReader
,Decimal18Reader
,Decimal28DenseReader
,Decimal28SparseReader
,Decimal38DenseReader
,Decimal38SparseReader
,Decimal9Reader
,FieldReader
,Float4Reader
,Float8Reader
,IntervalDayReader
,IntervalReader
,IntervalYearReader
,IntReader
,RepeatedBigIntReader
,RepeatedBitReader
,RepeatedDateReader
,RepeatedDecimal18Reader
,RepeatedDecimal28DenseReader
,RepeatedDecimal28SparseReader
,RepeatedDecimal38DenseReader
,RepeatedDecimal38SparseReader
,RepeatedDecimal9Reader
,RepeatedFloat4Reader
,RepeatedFloat8Reader
,RepeatedIntervalDayReader
,RepeatedIntervalReader
,RepeatedIntervalYearReader
,RepeatedIntReader
,RepeatedSmallIntReader
,RepeatedTimeReader
,RepeatedTimeStampReader
,RepeatedTinyIntReader
,RepeatedUInt1Reader
,RepeatedUInt2Reader
,RepeatedUInt4Reader
,RepeatedUInt8Reader
,RepeatedVar16CharReader
,RepeatedVarBinaryReader
,RepeatedVarCharReader
,RepeatedVarDecimalReader
,SmallIntReader
,TimeReader
,TimeStampReader
,TinyIntReader
,UInt1Reader
,UInt2Reader
,UInt4Reader
,UInt8Reader
,Var16CharReader
,VarBinaryReader
,VarCharReader
,VarDecimalReader
,UntypedReader
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.exec.vector.complex.reader.BaseReader
BaseReader.ComplexReader, BaseReader.DictReader, BaseReader.ListReader, BaseReader.MapReader, BaseReader.RepeatedListReader, BaseReader.RepeatedMapReader, BaseReader.ScalarReader
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copyAsValue
(UnionWriter writer) void
copyAsValue
(BaseWriter.ListWriter writer) void
copyAsValue
(BigIntWriter writer) void
copyAsValue
(BitWriter writer) void
copyAsValue
(DateWriter writer) void
copyAsValue
(Float4Writer writer) void
copyAsValue
(Float8Writer writer) void
copyAsValue
(IntervalDayWriter writer) void
copyAsValue
(IntervalWriter writer) void
copyAsValue
(IntervalYearWriter writer) void
copyAsValue
(IntWriter writer) void
copyAsValue
(SmallIntWriter writer) void
copyAsValue
(TimeStampWriter writer) void
copyAsValue
(TimeWriter writer) void
copyAsValue
(TinyIntWriter writer) void
copyAsValue
(UInt1Writer writer) void
copyAsValue
(UInt2Writer writer) void
copyAsValue
(UInt4Writer writer) void
copyAsValue
(UInt8Writer writer) void
copyAsValue
(Var16CharWriter writer) void
copyAsValue
(VarBinaryWriter writer) void
copyAsValue
(VarCharWriter writer) void
copyAsValue
(VarDecimalWriter writer) getField()
getType()
ReturnsString
representation of the reader's type.Returns the type of the vector, not value.boolean
isSet()
Returns true if the current value of the reader is not nulliterator()
boolean
next()
void
read
(int index, UnionHolder holder) void
read
(NullableBigIntHolder holder) void
read
(NullableBitHolder holder) void
read
(NullableDateHolder holder) void
read
(NullableFloat4Holder holder) void
read
(NullableFloat8Holder holder) void
read
(NullableIntervalDayHolder holder) void
read
(NullableIntervalHolder holder) void
read
(NullableIntervalYearHolder holder) void
read
(NullableIntHolder holder) void
read
(NullableSmallIntHolder holder) void
read
(NullableTimeHolder holder) void
read
(NullableTimeStampHolder holder) void
read
(NullableTinyIntHolder holder) void
read
(NullableUInt1Holder holder) void
read
(NullableUInt2Holder holder) void
read
(NullableUInt4Holder holder) void
read
(NullableUInt8Holder holder) void
read
(NullableVar16CharHolder holder) void
read
(NullableVarBinaryHolder holder) void
read
(NullableVarCharHolder holder) void
read
(NullableVarDecimalHolder holder) void
read
(UnionHolder holder) void
read
(UntypedNullHolder holder) readByte()
byte[]
reader()
readLong()
org.joda.time.Period
readText()
void
reset()
void
setPosition
(int index) Methods inherited from class org.apache.drill.exec.vector.complex.impl.AbstractFieldReader
copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsField, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, find, find, find, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, readBigDecimal, readBoolean, readByte, readByteArray, readCharacter, readDouble, readFloat, readInteger, readLocalDate, readLocalDateTime, readLocalTime, readLong, readObject, readPeriod, readShort, readString, readText, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.drill.exec.vector.complex.reader.BaseReader
getField, reset
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.apache.drill.exec.vector.UntypedReader
read
-
Field Details
-
data
-
-
Constructor Details
-
UnionReader
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceBaseReader
-
getVectorType
Description copied from interface:BaseReader
Returns the type of the vector, not value. For all vectors, this is the same as the vector's getField().getType().getMinorType(). It is used to report the actual vector type in the getDrillType() function.- Specified by:
getVectorType
in interfaceBaseReader
- Overrides:
getVectorType
in classAbstractFieldReader
-
isSet
public boolean isSet()Description copied from class:AbstractFieldReader
Returns true if the current value of the reader is not null- Specified by:
isSet
in interfaceBaseReader
- Specified by:
isSet
in interfaceBigIntReader
- Specified by:
isSet
in interfaceBitReader
- Specified by:
isSet
in interfaceDateReader
- Specified by:
isSet
in interfaceDecimal18Reader
- Specified by:
isSet
in interfaceDecimal28DenseReader
- Specified by:
isSet
in interfaceDecimal28SparseReader
- Specified by:
isSet
in interfaceDecimal38DenseReader
- Specified by:
isSet
in interfaceDecimal38SparseReader
- Specified by:
isSet
in interfaceDecimal9Reader
- Specified by:
isSet
in interfaceFloat4Reader
- Specified by:
isSet
in interfaceFloat8Reader
- Specified by:
isSet
in interfaceIntervalDayReader
- Specified by:
isSet
in interfaceIntervalReader
- Specified by:
isSet
in interfaceIntervalYearReader
- Specified by:
isSet
in interfaceIntReader
- Specified by:
isSet
in interfaceRepeatedBigIntReader
- Specified by:
isSet
in interfaceRepeatedBitReader
- Specified by:
isSet
in interfaceRepeatedDateReader
- Specified by:
isSet
in interfaceRepeatedDecimal18Reader
- Specified by:
isSet
in interfaceRepeatedDecimal28DenseReader
- Specified by:
isSet
in interfaceRepeatedDecimal28SparseReader
- Specified by:
isSet
in interfaceRepeatedDecimal38DenseReader
- Specified by:
isSet
in interfaceRepeatedDecimal38SparseReader
- Specified by:
isSet
in interfaceRepeatedDecimal9Reader
- Specified by:
isSet
in interfaceRepeatedFloat4Reader
- Specified by:
isSet
in interfaceRepeatedFloat8Reader
- Specified by:
isSet
in interfaceRepeatedIntervalDayReader
- Specified by:
isSet
in interfaceRepeatedIntervalReader
- Specified by:
isSet
in interfaceRepeatedIntervalYearReader
- Specified by:
isSet
in interfaceRepeatedIntReader
- Specified by:
isSet
in interfaceRepeatedSmallIntReader
- Specified by:
isSet
in interfaceRepeatedTimeReader
- Specified by:
isSet
in interfaceRepeatedTimeStampReader
- Specified by:
isSet
in interfaceRepeatedTinyIntReader
- Specified by:
isSet
in interfaceRepeatedUInt1Reader
- Specified by:
isSet
in interfaceRepeatedUInt2Reader
- Specified by:
isSet
in interfaceRepeatedUInt4Reader
- Specified by:
isSet
in interfaceRepeatedUInt8Reader
- Specified by:
isSet
in interfaceRepeatedVar16CharReader
- Specified by:
isSet
in interfaceRepeatedVarBinaryReader
- Specified by:
isSet
in interfaceRepeatedVarCharReader
- Specified by:
isSet
in interfaceRepeatedVarDecimalReader
- Specified by:
isSet
in interfaceSmallIntReader
- Specified by:
isSet
in interfaceTimeReader
- Specified by:
isSet
in interfaceTimeStampReader
- Specified by:
isSet
in interfaceTinyIntReader
- Specified by:
isSet
in interfaceUInt1Reader
- Specified by:
isSet
in interfaceUInt2Reader
- Specified by:
isSet
in interfaceUInt4Reader
- Specified by:
isSet
in interfaceUInt8Reader
- Specified by:
isSet
in interfaceUntypedReader
- Specified by:
isSet
in interfaceVar16CharReader
- Specified by:
isSet
in interfaceVarBinaryReader
- Specified by:
isSet
in interfaceVarCharReader
- Specified by:
isSet
in interfaceVarDecimalReader
- Overrides:
isSet
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceBaseReader
-
read
- Specified by:
read
in interfaceBaseReader
-
iterator
-
copyAsValue
- Specified by:
copyAsValue
in interfaceBaseReader
-
readObject
- Specified by:
readObject
in interfaceBigIntReader
- Specified by:
readObject
in interfaceBitReader
- Specified by:
readObject
in interfaceDateReader
- Specified by:
readObject
in interfaceDecimal18Reader
- Specified by:
readObject
in interfaceDecimal28DenseReader
- Specified by:
readObject
in interfaceDecimal28SparseReader
- Specified by:
readObject
in interfaceDecimal38DenseReader
- Specified by:
readObject
in interfaceDecimal38SparseReader
- Specified by:
readObject
in interfaceDecimal9Reader
- Specified by:
readObject
in interfaceFloat4Reader
- Specified by:
readObject
in interfaceFloat8Reader
- Specified by:
readObject
in interfaceIntervalDayReader
- Specified by:
readObject
in interfaceIntervalReader
- Specified by:
readObject
in interfaceIntervalYearReader
- Specified by:
readObject
in interfaceIntReader
- Specified by:
readObject
in interfaceSmallIntReader
- Specified by:
readObject
in interfaceTimeReader
- Specified by:
readObject
in interfaceTimeStampReader
- Specified by:
readObject
in interfaceTinyIntReader
- Specified by:
readObject
in interfaceUInt1Reader
- Specified by:
readObject
in interfaceUInt2Reader
- Specified by:
readObject
in interfaceUInt4Reader
- Specified by:
readObject
in interfaceUInt8Reader
- Specified by:
readObject
in interfaceVar16CharReader
- Specified by:
readObject
in interfaceVarBinaryReader
- Specified by:
readObject
in interfaceVarCharReader
- Specified by:
readObject
in interfaceVarDecimalReader
- Overrides:
readObject
in classAbstractFieldReader
-
readBigDecimal
- Specified by:
readBigDecimal
in interfaceDecimal18Reader
- Specified by:
readBigDecimal
in interfaceDecimal28DenseReader
- Specified by:
readBigDecimal
in interfaceDecimal28SparseReader
- Specified by:
readBigDecimal
in interfaceDecimal38DenseReader
- Specified by:
readBigDecimal
in interfaceDecimal38SparseReader
- Specified by:
readBigDecimal
in interfaceDecimal9Reader
- Specified by:
readBigDecimal
in interfaceVarDecimalReader
- Overrides:
readBigDecimal
in classAbstractFieldReader
-
readInteger
- Specified by:
readInteger
in interfaceIntReader
- Specified by:
readInteger
in interfaceUInt4Reader
- Overrides:
readInteger
in classAbstractFieldReader
-
readLong
- Specified by:
readLong
in interfaceBigIntReader
- Specified by:
readLong
in interfaceUInt8Reader
- Overrides:
readLong
in classAbstractFieldReader
-
readBoolean
- Specified by:
readBoolean
in interfaceBitReader
- Overrides:
readBoolean
in classAbstractFieldReader
-
readCharacter
- Specified by:
readCharacter
in interfaceUInt2Reader
- Overrides:
readCharacter
in classAbstractFieldReader
-
readLocalDate
- Specified by:
readLocalDate
in interfaceDateReader
- Overrides:
readLocalDate
in classAbstractFieldReader
-
readLocalTime
- Specified by:
readLocalTime
in interfaceTimeReader
- Overrides:
readLocalTime
in classAbstractFieldReader
-
readLocalDateTime
- Specified by:
readLocalDateTime
in interfaceTimeStampReader
- Overrides:
readLocalDateTime
in classAbstractFieldReader
-
readPeriod
public org.joda.time.Period readPeriod()- Specified by:
readPeriod
in interfaceIntervalDayReader
- Specified by:
readPeriod
in interfaceIntervalReader
- Specified by:
readPeriod
in interfaceIntervalYearReader
- Overrides:
readPeriod
in classAbstractFieldReader
-
readDouble
- Specified by:
readDouble
in interfaceFloat8Reader
- Overrides:
readDouble
in classAbstractFieldReader
-
readFloat
- Specified by:
readFloat
in interfaceFloat4Reader
- Overrides:
readFloat
in classAbstractFieldReader
-
readText
- Specified by:
readText
in interfaceVarCharReader
- Overrides:
readText
in classAbstractFieldReader
-
readString
- Specified by:
readString
in interfaceVar16CharReader
- Overrides:
readString
in classAbstractFieldReader
-
readByte
- Specified by:
readByte
in interfaceTinyIntReader
- Specified by:
readByte
in interfaceUInt1Reader
- Overrides:
readByte
in classAbstractFieldReader
-
readShort
- Specified by:
readShort
in interfaceSmallIntReader
- Overrides:
readShort
in classAbstractFieldReader
-
readByteArray
public byte[] readByteArray()- Specified by:
readByteArray
in interfaceVarBinaryReader
- Overrides:
readByteArray
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceTinyIntReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceRepeatedTinyIntReader
- Specified by:
copyAsValue
in interfaceTinyIntReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceUInt1Reader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceRepeatedUInt1Reader
- Specified by:
copyAsValue
in interfaceUInt1Reader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceUInt2Reader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceRepeatedUInt2Reader
- Specified by:
copyAsValue
in interfaceUInt2Reader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceSmallIntReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceRepeatedSmallIntReader
- Specified by:
copyAsValue
in interfaceSmallIntReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceIntReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceIntReader
- Specified by:
copyAsValue
in interfaceRepeatedIntReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceUInt4Reader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceRepeatedUInt4Reader
- Specified by:
copyAsValue
in interfaceUInt4Reader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceFloat4Reader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceFloat4Reader
- Specified by:
copyAsValue
in interfaceRepeatedFloat4Reader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceTimeReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceRepeatedTimeReader
- Specified by:
copyAsValue
in interfaceTimeReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceIntervalYearReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceIntervalYearReader
- Specified by:
copyAsValue
in interfaceRepeatedIntervalYearReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceBigIntReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceBigIntReader
- Specified by:
copyAsValue
in interfaceRepeatedBigIntReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceUInt8Reader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceRepeatedUInt8Reader
- Specified by:
copyAsValue
in interfaceUInt8Reader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceFloat8Reader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceFloat8Reader
- Specified by:
copyAsValue
in interfaceRepeatedFloat8Reader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceDateReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceDateReader
- Specified by:
copyAsValue
in interfaceRepeatedDateReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceTimeStampReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceRepeatedTimeStampReader
- Specified by:
copyAsValue
in interfaceTimeStampReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceIntervalDayReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceIntervalDayReader
- Specified by:
copyAsValue
in interfaceRepeatedIntervalDayReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceIntervalReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceIntervalReader
- Specified by:
copyAsValue
in interfaceRepeatedIntervalReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceVarBinaryReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceRepeatedVarBinaryReader
- Specified by:
copyAsValue
in interfaceVarBinaryReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceVarCharReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceRepeatedVarCharReader
- Specified by:
copyAsValue
in interfaceVarCharReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceVar16CharReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceRepeatedVar16CharReader
- Specified by:
copyAsValue
in interfaceVar16CharReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceVarDecimalReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceRepeatedVarDecimalReader
- Specified by:
copyAsValue
in interfaceVarDecimalReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
read
- Specified by:
read
in interfaceBitReader
- Overrides:
read
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceBitReader
- Specified by:
copyAsValue
in interfaceRepeatedBitReader
- Overrides:
copyAsValue
in classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValue
in interfaceBaseReader.RepeatedListReader
-
setPosition
public void setPosition(int index) - Specified by:
setPosition
in interfacePositionable
-
reader
- Specified by:
reader
in interfaceBaseReader.MapReader
- Overrides:
reader
in classAbstractFieldReader
-
reader
- Specified by:
reader
in interfaceBaseReader.ListReader
- Overrides:
reader
in classAbstractFieldReader
-
next
public boolean next()- Specified by:
next
in interfaceBaseReader.RepeatedListReader
- Specified by:
next
in interfaceBaseReader.RepeatedMapReader
-
getTypeString
Description copied from interface:BaseReader
ReturnsString
representation of the reader's type. In case ifBaseReader.getType()
is primitive, the method is equivalent to {@link #getType().getMinorType().name()}. If the reader has minor type equal toTypeProtos.MinorType.DICT
,DICT<keyMinorType,valueMinorType>
, withkeyMinorType
andvalueMinorType
being key's and value's minor types respectively, will be returned. Used intypeOf
UDF.- Specified by:
getTypeString
in interfaceBaseReader
- Returns:
String
representation of reader's type.
-
reset
public void reset()- Specified by:
reset
in interfaceBaseReader
-
getField
- Specified by:
getField
in interfaceBaseReader
-
read
- Specified by:
read
in interfaceUntypedReader
-