Interface BaseReader.DictReader
- All Superinterfaces:
BaseReader
,BaseReader.MapReader
,BaseReader.RepeatedMapReader
,Iterable<String>
,Positionable
- All Known Subinterfaces:
FieldReader
- All Known Implementing Classes:
AbstractFieldReader
,AbstractRepeatedMapReaderImpl
,BigIntHolderReaderImpl
,BigIntReaderImpl
,BitHolderReaderImpl
,BitReaderImpl
,DateHolderReaderImpl
,DateReaderImpl
,Decimal18HolderReaderImpl
,Decimal18ReaderImpl
,Decimal28DenseHolderReaderImpl
,Decimal28DenseReaderImpl
,Decimal28SparseHolderReaderImpl
,Decimal28SparseReaderImpl
,Decimal38DenseHolderReaderImpl
,Decimal38DenseReaderImpl
,Decimal38SparseHolderReaderImpl
,Decimal38SparseReaderImpl
,Decimal9HolderReaderImpl
,Decimal9ReaderImpl
,Float4HolderReaderImpl
,Float4ReaderImpl
,Float8HolderReaderImpl
,Float8ReaderImpl
,IntervalDayHolderReaderImpl
,IntervalDayReaderImpl
,IntervalHolderReaderImpl
,IntervalReaderImpl
,IntervalYearHolderReaderImpl
,IntervalYearReaderImpl
,IntHolderReaderImpl
,IntReaderImpl
,NullableBigIntHolderReaderImpl
,NullableBigIntReaderImpl
,NullableBitHolderReaderImpl
,NullableBitReaderImpl
,NullableDateHolderReaderImpl
,NullableDateReaderImpl
,NullableDecimal18HolderReaderImpl
,NullableDecimal18ReaderImpl
,NullableDecimal28DenseHolderReaderImpl
,NullableDecimal28DenseReaderImpl
,NullableDecimal28SparseHolderReaderImpl
,NullableDecimal28SparseReaderImpl
,NullableDecimal38DenseHolderReaderImpl
,NullableDecimal38DenseReaderImpl
,NullableDecimal38SparseHolderReaderImpl
,NullableDecimal38SparseReaderImpl
,NullableDecimal9HolderReaderImpl
,NullableDecimal9ReaderImpl
,NullableFloat4HolderReaderImpl
,NullableFloat4ReaderImpl
,NullableFloat8HolderReaderImpl
,NullableFloat8ReaderImpl
,NullableIntervalDayHolderReaderImpl
,NullableIntervalDayReaderImpl
,NullableIntervalHolderReaderImpl
,NullableIntervalReaderImpl
,NullableIntervalYearHolderReaderImpl
,NullableIntervalYearReaderImpl
,NullableIntHolderReaderImpl
,NullableIntReaderImpl
,NullableSmallIntHolderReaderImpl
,NullableSmallIntReaderImpl
,NullableTimeHolderReaderImpl
,NullableTimeReaderImpl
,NullableTimeStampHolderReaderImpl
,NullableTimeStampReaderImpl
,NullableTinyIntHolderReaderImpl
,NullableTinyIntReaderImpl
,NullableUInt1HolderReaderImpl
,NullableUInt1ReaderImpl
,NullableUInt2HolderReaderImpl
,NullableUInt2ReaderImpl
,NullableUInt4HolderReaderImpl
,NullableUInt4ReaderImpl
,NullableUInt8HolderReaderImpl
,NullableUInt8ReaderImpl
,NullableVar16CharHolderReaderImpl
,NullableVar16CharReaderImpl
,NullableVarBinaryHolderReaderImpl
,NullableVarBinaryReaderImpl
,NullableVarCharHolderReaderImpl
,NullableVarCharReaderImpl
,NullableVarDecimalHolderReaderImpl
,NullableVarDecimalReaderImpl
,NullReader
,RepeatedBigIntHolderReaderImpl
,RepeatedBigIntReaderImpl
,RepeatedBitHolderReaderImpl
,RepeatedBitReaderImpl
,RepeatedDateHolderReaderImpl
,RepeatedDateReaderImpl
,RepeatedDecimal18HolderReaderImpl
,RepeatedDecimal18ReaderImpl
,RepeatedDecimal28DenseHolderReaderImpl
,RepeatedDecimal28DenseReaderImpl
,RepeatedDecimal28SparseHolderReaderImpl
,RepeatedDecimal28SparseReaderImpl
,RepeatedDecimal38DenseHolderReaderImpl
,RepeatedDecimal38DenseReaderImpl
,RepeatedDecimal38SparseHolderReaderImpl
,RepeatedDecimal38SparseReaderImpl
,RepeatedDecimal9HolderReaderImpl
,RepeatedDecimal9ReaderImpl
,RepeatedDictReaderImpl
,RepeatedFloat4HolderReaderImpl
,RepeatedFloat4ReaderImpl
,RepeatedFloat8HolderReaderImpl
,RepeatedFloat8ReaderImpl
,RepeatedIntervalDayHolderReaderImpl
,RepeatedIntervalDayReaderImpl
,RepeatedIntervalHolderReaderImpl
,RepeatedIntervalReaderImpl
,RepeatedIntervalYearHolderReaderImpl
,RepeatedIntervalYearReaderImpl
,RepeatedIntHolderReaderImpl
,RepeatedIntReaderImpl
,RepeatedListReaderImpl
,RepeatedMapReaderImpl
,RepeatedSmallIntHolderReaderImpl
,RepeatedSmallIntReaderImpl
,RepeatedTimeHolderReaderImpl
,RepeatedTimeReaderImpl
,RepeatedTimeStampHolderReaderImpl
,RepeatedTimeStampReaderImpl
,RepeatedTinyIntHolderReaderImpl
,RepeatedTinyIntReaderImpl
,RepeatedUInt1HolderReaderImpl
,RepeatedUInt1ReaderImpl
,RepeatedUInt2HolderReaderImpl
,RepeatedUInt2ReaderImpl
,RepeatedUInt4HolderReaderImpl
,RepeatedUInt4ReaderImpl
,RepeatedUInt8HolderReaderImpl
,RepeatedUInt8ReaderImpl
,RepeatedVar16CharHolderReaderImpl
,RepeatedVar16CharReaderImpl
,RepeatedVarBinaryHolderReaderImpl
,RepeatedVarBinaryReaderImpl
,RepeatedVarCharHolderReaderImpl
,RepeatedVarCharReaderImpl
,RepeatedVarDecimalHolderReaderImpl
,RepeatedVarDecimalReaderImpl
,SingleDictReaderImpl
,SingleLikeRepeatedMapReaderImpl
,SingleListReaderImpl
,SingleMapReaderImpl
,SmallIntHolderReaderImpl
,SmallIntReaderImpl
,TimeHolderReaderImpl
,TimeReaderImpl
,TimeStampHolderReaderImpl
,TimeStampReaderImpl
,TinyIntHolderReaderImpl
,TinyIntReaderImpl
,UInt1HolderReaderImpl
,UInt1ReaderImpl
,UInt2HolderReaderImpl
,UInt2ReaderImpl
,UInt4HolderReaderImpl
,UInt4ReaderImpl
,UInt8HolderReaderImpl
,UInt8ReaderImpl
,UnionListReader
,UnionReader
,UntypedHolderReaderImpl
,UntypedReaderImpl
,Var16CharHolderReaderImpl
,Var16CharReaderImpl
,VarBinaryHolderReaderImpl
,VarBinaryReaderImpl
,VarCharHolderReaderImpl
,VarCharReaderImpl
,VarDecimalHolderReaderImpl
,VarDecimalReaderImpl
- Enclosing interface:
- BaseReader
-
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copyAsValue
(BaseWriter.DictWriter writer) int
find
(int key) Obtain the index for given key in current row used to find a corresponding value with.int
Obtain the index for given key in current row used to find a corresponding value with.int
Obtain the index for given key in current row used to find a corresponding value with.void
read
(int key, ValueHolder holder) Reads a value corresponding to akey
into theholder
.void
read
(Object key, ValueHolder holder) Reads a value corresponding to akey
into theholder
.void
read
(String key, ValueHolder holder) Reads a value corresponding to akey
into theholder
.Methods inherited from interface org.apache.drill.exec.vector.complex.reader.BaseReader
copyAsValue, getField, getType, getTypeString, getVectorType, isSet, read, read, read, reset
Methods inherited from interface org.apache.drill.exec.vector.complex.reader.BaseReader.MapReader
reader
Methods inherited from interface org.apache.drill.exec.vector.complex.reader.BaseReader.RepeatedMapReader
copyAsValue, next, size
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.apache.drill.exec.vector.complex.Positionable
setPosition
-
Method Details
-
copyAsValue
-
find
Obtain 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.NameSegment
in cases whenDictVector.getValueType()
is complex.Despite
key
is passed asString
the value is converted to actual type based onDictVector.getKeyType()
.- Parameters:
key
- literal representing key value- Returns:
- index for the given key
- See Also:
-
find
int find(int key) Obtain 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.ArraySegment
in cases whenDictVector.getValueType()
is complex.Despite
key
is passed asint
the value is converted to actual type based onDictVector.getKeyType()
.- Parameters:
key
- literal representing key value- Returns:
- index for the given key
- See Also:
-
find
Obtain the index for given key in current row used to find a corresponding value with. Used in generated code when retrieving value from Dict usingPathSegment
with providedPathSegment.getOriginalValue()
in cases whenDictVector.getValueType()
is complex.The
key
is assumed to be of actual type, is not converted and used as is.- Parameters:
key
- key value- Returns:
- index for the given key
- See Also:
-
read
Reads a value corresponding to akey
into 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.NameSegment
in cases whenDictVector.getValueType()
is primitive.Despite
key
is passed asString
the value is converted to actual type based onDictVector.getKeyType()
.- Parameters:
key
- literal representing key valueholder
- a holder to write value's value into- See Also:
-
read
Reads a value corresponding to akey
into 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.ArraySegment
in cases whenDictVector.getValueType()
is primitive.Despite
key
is passed asint
the value is converted to actual type based onDictVector.getKeyType()
.- Parameters:
key
- literal representing key valueholder
- a holder to write value's value into- See Also:
-
read
Reads a value corresponding to akey
into 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
PathSegment
with providedPathSegment.getOriginalValue()
in cases whenDictVector.getValueType()
is primitive.The
key
is assumed to be of actual type, is not converted and used as is.- Parameters:
key
- key valueholder
- a holder to write value's value into- See Also:
-