Class SingleDictReaderImpl
- 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
FieldsFields inherited from class org.apache.drill.exec.vector.complex.impl.AbstractRepeatedMapReaderImpl
currentOffset, fields, maxOffset, NO_VALUES, vector -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyAsValue(UnionWriter writer) voidcopyAsValue(BaseWriter.DictWriter writer) voidcopyAsValue(BaseWriter.ListWriter writer) intfind(int key) Obtain the index for given key in current row used to find a corresponding value with.intObtain the index for given key in current row used to find a corresponding value with.intObtain the index for given key in current row used to find a corresponding value with.getField()ReturnsStringrepresentation of the reader's type.Returns the type of the vector, not value.voidread(int index, UnionHolder holder) voidread(int key, ValueHolder holder) Reads a value corresponding to akeyinto theholder.voidread(Object key, ValueHolder holder) Reads a value corresponding to akeyinto theholder.voidread(String key, ValueHolder holder) Reads a value corresponding to akeyinto theholder.voidread(UnionHolder holder) voidread(UntypedNullHolder holder) voidsetPosition(int index) Methods inherited from class org.apache.drill.exec.vector.complex.impl.AbstractRepeatedMapReaderImpl
getType, isEmpty, isSet, iterator, next, readObject, reset, sizeMethods 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, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, copyAsValue, 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, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, readBigDecimal, readBigDecimal, readBoolean, readBoolean, readByte, readByte, readByteArray, readByteArray, readCharacter, readCharacter, readDouble, readDouble, reader, readFloat, readFloat, readInteger, readInteger, readLocalDate, readLocalDate, readLocalDateTime, readLocalDateTime, readLocalTime, readLocalTime, readLong, readLong, readObject, readPeriod, readPeriod, readShort, readShort, readString, readString, readText, readTextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.drill.exec.vector.complex.reader.BaseReader
copyAsValue, getField, getType, read, read, read, resetMethods inherited from interface org.apache.drill.exec.vector.complex.reader.BaseReader.RepeatedMapReader
copyAsValue, next, sizeMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.apache.drill.exec.vector.UntypedReader
read
-
Field Details
-
NOT_FOUND
public static final int NOT_FOUND- See Also:
-
-
Constructor Details
-
SingleDictReaderImpl
-
-
Method Details
-
reader
- Specified by:
readerin interfaceBaseReader.MapReader- Overrides:
readerin classAbstractRepeatedMapReaderImpl<DictVector>
-
find
Description copied from interface:BaseReader.DictReaderObtain the index for given key in current row used to find a corresponding value with. Used in generated code when retrieving value from Dict withPathSegment.NameSegmentin cases whenDictVector.getValueType()is complex.Despite
keyis passed asStringthe value is converted to actual type based onDictVector.getKeyType().- Specified by:
findin interfaceBaseReader.DictReader- Overrides:
findin classAbstractFieldReader- Parameters:
key- literal representing key value- Returns:
- index for the given key
- See Also:
-
find
public int find(int key) Description copied from interface:BaseReader.DictReaderObtain the index for given key in current row used to find a corresponding value with. Used in generated code when retrieving value from Dict withPathSegment.ArraySegmentin cases whenDictVector.getValueType()is complex.Despite
keyis passed asintthe value is converted to actual type based onDictVector.getKeyType().- Specified by:
findin interfaceBaseReader.DictReader- Overrides:
findin classAbstractFieldReader- Parameters:
key- literal representing key value- Returns:
- index for the given key
- See Also:
-
find
Description copied from interface:BaseReader.DictReaderObtain the index for given key in current row used to find a corresponding value with. Used in generated code when retrieving value from Dict usingPathSegmentwith providedPathSegment.getOriginalValue()in cases whenDictVector.getValueType()is complex.The
keyis assumed to be of actual type, is not converted and used as is.- Specified by:
findin interfaceBaseReader.DictReader- Overrides:
findin classAbstractFieldReader- Parameters:
key- key value- Returns:
- index for the given key
- See Also:
-
read
Description copied from interface:BaseReader.DictReaderReads a value corresponding to akeyinto theholder. If there is no entry in the row with the givenkey, value is set to null.Used in generated code when retrieving value from Dict with
PathSegment.NameSegmentin cases whenDictVector.getValueType()is primitive.Despite
keyis passed asStringthe value is converted to actual type based onDictVector.getKeyType().- Specified by:
readin interfaceBaseReader.DictReader- Overrides:
readin classAbstractFieldReader- Parameters:
key- literal representing key valueholder- a holder to write value's value into- See Also:
-
read
Description copied from interface:BaseReader.DictReaderReads a value corresponding to akeyinto theholder. If there is no entry in the row with the givenkey, value is set to null.Used in generated code when retrieving value from Dict with
PathSegment.ArraySegmentin cases whenDictVector.getValueType()is primitive.Despite
keyis passed asintthe value is converted to actual type based onDictVector.getKeyType().- Specified by:
readin interfaceBaseReader.DictReader- Overrides:
readin classAbstractFieldReader- Parameters:
key- literal representing key valueholder- a holder to write value's value into- See Also:
-
read
Description copied from interface:BaseReader.DictReaderReads a value corresponding to akeyinto theholder. If there is no entry in the row with the givenkey, value is set to null.Used in generated code when retrieving value from Dict using
PathSegmentwith providedPathSegment.getOriginalValue()in cases whenDictVector.getValueType()is primitive.The
keyis assumed to be of actual type, is not converted and used as is.- Specified by:
readin interfaceBaseReader.DictReader- Overrides:
readin classAbstractFieldReader- Parameters:
key- key valueholder- a holder to write value's value into- See Also:
-
setPosition
public void setPosition(int index) - Specified by:
setPositionin interfacePositionable- Overrides:
setPositionin classAbstractRepeatedMapReaderImpl<DictVector>
-
copyAsValue
- Specified by:
copyAsValuein interfaceBaseReader.DictReader- Overrides:
copyAsValuein classAbstractFieldReader
-
copyAsValue
- Specified by:
copyAsValuein interfaceBaseReader.RepeatedListReader
-
getTypeString
Description copied from interface:BaseReaderReturnsStringrepresentation of the reader's type. In case ifBaseReader.getType()is primitive, the method is equivalent to}. If the reader has minor type equal toinvalid @link
{@link #getType().getMinorType().name()TypeProtos.MinorType.DICT,DICT<keyMinorType,valueMinorType>, withkeyMinorTypeandvalueMinorTypebeing key's and value's minor types respectively, will be returned. Used intypeOfUDF.- Specified by:
getTypeStringin interfaceBaseReader- Returns:
Stringrepresentation of reader's type.
-
getVectorType
Description copied from interface:BaseReaderReturns 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:
getVectorTypein interfaceBaseReader- Overrides:
getVectorTypein classAbstractFieldReader
-
getField
- Specified by:
getFieldin interfaceBaseReader
-
read
- Specified by:
readin interfaceBaseReader
-
read
- Specified by:
readin interfaceBaseReader
-
read
- Specified by:
readin interfaceUntypedReader
-
copyAsValue
- Specified by:
copyAsValuein interfaceBaseReader
-