Class AbstractScalarReader
java.lang.Object
org.apache.drill.exec.vector.accessor.reader.AbstractScalarReader
- All Implemented Interfaces:
- ColumnReader,- ReaderEvents,- ScalarReader
- Direct Known Subclasses:
- AbstractScalarReader.NullReader,- BaseScalarReader
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic class
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidbindIndex(ColumnReaderIndex rowIndex) voidbindNullState(NullStateReader nullStateReader) protected UnsupportedConversionErrorconversionError(String javaType) The extended type of the value, describes the secondary type for DATE, TIME and TIMESTAMP for which the value type is int or long.Return the entire object as a string.booleanbyte[]getBytes()getDate()doublefloatgetFloat()intgetInt()longgetLong()Return the value of the underlying data as a Java object.org.joda.time.PeriodgetTime()getValue()Return the value of the object using the extended type.booleanisNull()Determine if this value is null.nullReader(ColumnMetadata schema) voidtype()The type of this reader.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.drill.exec.vector.accessor.ColumnReaderschemaMethods inherited from interface org.apache.drill.exec.vector.accessor.reader.ReaderEventsbindBufferMethods inherited from interface org.apache.drill.exec.vector.accessor.ScalarReadervalueType
- 
Field Details- 
vectorIndex
- 
nullStateReader
 
- 
- 
Constructor Details- 
AbstractScalarReaderpublic AbstractScalarReader()
 
- 
- 
Method Details- 
nullReader
- 
bindIndex- Specified by:
- bindIndexin interface- ReaderEvents
 
- 
bindNullState- Specified by:
- bindNullStatein interface- ReaderEvents
 
- 
typeDescription copied from interface:ColumnReaderThe type of this reader.- Specified by:
- typein interface- ColumnReader
- Returns:
- type of reader
 
- 
extendedTypeDescription copied from interface:ScalarReaderThe extended type of the value, describes the secondary type for DATE, TIME and TIMESTAMP for which the value type is int or long.- Specified by:
- extendedTypein interface- ScalarReader
 
- 
nullStateReader- Specified by:
- nullStateReaderin interface- ReaderEvents
 
- 
repositionpublic void reposition()- Specified by:
- repositionin interface- ReaderEvents
 
- 
isNullpublic boolean isNull()Description copied from interface:ColumnReaderDetermine if this value is null.- Nullable scalar: determine if the value is null.
- Non-nullable scalar: always returns false.
- Arrays: always returns falseinvalid input: '<'/tt.>
- Lists: determine if the list for the current row is null. In a list, an array entry can be null, empty, or can contain items. In repeated types, the array itself is never null. If the array is null, then it implicitly has no entries.
- Map or Repeated Map: Always returns false.
- Map inside a union, or in a list that contains a union, the tuple itself can be null.
- Union: Determine if the current value is null. Null values have no type and no associated reader.
 - Specified by:
- isNullin interface- ColumnReader
- Returns:
- true if this value is null; false otherwise
 
- 
conversionError
- 
getBooleanpublic boolean getBoolean()- Specified by:
- getBooleanin interface- ScalarReader
 
- 
getIntpublic int getInt()- Specified by:
- getIntin interface- ScalarReader
 
- 
getLongpublic long getLong()- Specified by:
- getLongin interface- ScalarReader
 
- 
getFloatpublic float getFloat()- Specified by:
- getFloatin interface- ScalarReader
 
- 
getDoublepublic double getDouble()- Specified by:
- getDoublein interface- ScalarReader
 
- 
getString- Specified by:
- getStringin interface- ScalarReader
 
- 
getBytespublic byte[] getBytes()- Specified by:
- getBytesin interface- ScalarReader
 
- 
getDecimal- Specified by:
- getDecimalin interface- ScalarReader
 
- 
getPeriodpublic org.joda.time.Period getPeriod()- Specified by:
- getPeriodin interface- ScalarReader
 
- 
getDate- Specified by:
- getDatein interface- ScalarReader
 
- 
getTime- Specified by:
- getTimein interface- ScalarReader
 
- 
getTimestamp- Specified by:
- getTimestampin interface- ScalarReader
 
- 
getObjectDescription copied from interface:ColumnReaderReturn the value of the underlying data as a Java object. Primarily for testing- Array: Return the entire array as an List of objects. Note, even if the array is scalar, the elements are still returned as a list.
 - Specified by:
- getObjectin interface- ColumnReader
- Returns:
- the value as a Java object
 
- 
getValueDescription copied from interface:ScalarReaderReturn the value of the object using the extended type.- Specified by:
- getValuein interface- ScalarReader
 
- 
getAsStringDescription copied from interface:ColumnReaderReturn the entire object as a string. Primarily for debugging.- Specified by:
- getAsStringin interface- ColumnReader
- Returns:
- string representation of the object
 
 
-