Package org.apache.drill.exec.expr
Class BasicTypeHelper
java.lang.Object
org.apache.drill.exec.expr.BasicTypeHelper
- Direct Known Subclasses:
TypeHelper
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static String
buildErrorMessage
(String operation, TypeProtos.MajorType type) protected static String
buildErrorMessage
(String operation, TypeProtos.MinorType type, TypeProtos.DataMode mode) static boolean
compareValues
(ValueVector v1, int v1index, ValueVector v2, int v2index) static ValueHolder
Create a ValueHolder of MajorType.static ValueHolder
deNullify
(ValueHolder holder) static FieldReader
getHolderReaderImpl
(TypeProtos.MajorType type, ValueHolder holder) static Class<?>
static ValueVector
getNewVector
(String name, BufferAllocator allocator, TypeProtos.MajorType type, CallBack callback) static ValueVector
getNewVector
(MaterializedField field, TypeProtos.MajorType type, BufferAllocator allocator, CallBack callBack) static ValueVector
getNewVector
(MaterializedField field, BufferAllocator allocator) static ValueVector
getNewVector
(MaterializedField field, BufferAllocator allocator, CallBack callBack) static Class<?>
getReaderClassName
(TypeProtos.MinorType type, TypeProtos.DataMode mode, boolean isSingularRepeated) static int
getSize
(TypeProtos.MajorType major) static TypeProtos.MajorType
getType
(Decimal18Holder holder) static TypeProtos.MajorType
getType
(Decimal28DenseHolder holder) static TypeProtos.MajorType
getType
(Decimal28SparseHolder holder) static TypeProtos.MajorType
getType
(Decimal38DenseHolder holder) static TypeProtos.MajorType
getType
(Decimal38SparseHolder holder) static TypeProtos.MajorType
getType
(Decimal9Holder holder) static TypeProtos.MajorType
getType
(NullableDecimal18Holder holder) static TypeProtos.MajorType
getType
(NullableDecimal28DenseHolder holder) static TypeProtos.MajorType
getType
(NullableDecimal28SparseHolder holder) static TypeProtos.MajorType
getType
(NullableDecimal38DenseHolder holder) static TypeProtos.MajorType
getType
(NullableDecimal38SparseHolder holder) static TypeProtos.MajorType
getType
(NullableDecimal9Holder holder) static TypeProtos.MajorType
getType
(NullableVarDecimalHolder holder) static TypeProtos.MajorType
getType
(RepeatedDecimal18Holder holder) static TypeProtos.MajorType
getType
(RepeatedDecimal28DenseHolder holder) static TypeProtos.MajorType
getType
(RepeatedDecimal28SparseHolder holder) static TypeProtos.MajorType
getType
(RepeatedDecimal38DenseHolder holder) static TypeProtos.MajorType
getType
(RepeatedDecimal38SparseHolder holder) static TypeProtos.MajorType
getType
(RepeatedDecimal9Holder holder) static TypeProtos.MajorType
getType
(RepeatedVarDecimalHolder holder) static TypeProtos.MajorType
getType
(VarDecimalHolder holder) static ValueHolder
getValue
(ValueVector vector, int index) static TypeProtos.MajorType
getValueHolderType
(ValueHolder holder) static Class<? extends ValueVector>
static Class<?>
getWriterImpl
(TypeProtos.MinorType type, TypeProtos.DataMode mode) static Class<?>
static boolean
isNull
(ValueHolder holder) static ValueHolder
nullify
(ValueHolder holder) static void
setValue
(ValueVector vector, int index, ValueHolder holder) static void
setValueSafe
(ValueVector vector, int index, ValueHolder holder)
-
Field Details
-
WIDTH_ESTIMATE
public static final int WIDTH_ESTIMATE- See Also:
-
-
Constructor Details
-
BasicTypeHelper
public BasicTypeHelper()
-
-
Method Details
-
buildErrorMessage
protected static String buildErrorMessage(String operation, TypeProtos.MinorType type, TypeProtos.DataMode mode) -
buildErrorMessage
-
getSize
-
getValueVectorClass
public static Class<? extends ValueVector> getValueVectorClass(TypeProtos.MinorType type, TypeProtos.DataMode mode) -
getReaderClassName
public static Class<?> getReaderClassName(TypeProtos.MinorType type, TypeProtos.DataMode mode, boolean isSingularRepeated) -
getWriterInterface
-
getWriterImpl
-
getHolderReaderImpl
- Parameters:
type
- type of resultingFieldReader
instanceholder
- value holder forFieldReader
creation- Returns:
FieldReader
instance
-
getHolderReaderImpl
-
getNewVector
public static ValueVector getNewVector(String name, BufferAllocator allocator, TypeProtos.MajorType type, CallBack callback) -
getNewVector
-
getNewVector
public static ValueVector getNewVector(MaterializedField field, BufferAllocator allocator, CallBack callBack) -
getNewVector
public static ValueVector getNewVector(MaterializedField field, TypeProtos.MajorType type, BufferAllocator allocator, CallBack callBack) -
getValue
-
setValue
-
setValueSafe
-
compareValues
-
createValueHolder
Create a ValueHolder of MajorType.- Parameters:
type
-- Returns:
-
isNull
-
deNullify
-
nullify
-
getValueHolderType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-
getType
-