Package org.apache.druid.segment.column
Class BaseTypeSignature<Type extends TypeDescriptor>
java.lang.Object
org.apache.druid.segment.column.BaseTypeSignature<Type>
- All Implemented Interfaces:
TypeSignature<Type>
- Direct Known Subclasses:
ColumnType,ExpressionType
@Immutable
public abstract class BaseTypeSignature<Type extends TypeDescriptor>
extends Object
implements TypeSignature<Type>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final TypeSignature<Type>protected final Type -
Constructor Summary
ConstructorsConstructorDescriptionBaseTypeSignature(TypeFactory typeFactory, Type type, String complexTypeName, TypeSignature<Type> elementType) -
Method Summary
Modifier and TypeMethodDescriptionbooleanType name of 'complex' types (ValueType.COMPLEX,ExprType.COMPLEX), which are 'registered' by their name, acting as a key to get the correct set of serialization, deserialization, and other type specific handling facilties.<T> NullableTypeStrategy<T>ANullableTypeStrategyis aTypeStrategywhich can handle reading and writing null values, at the very high cost of an additional byte per value, of which a single bit is used to storeTypeStrategies.IS_NULL_BYTEorTypeStrategies.IS_NOT_NULL_BYTEas appropriate.<T> TypeStrategy<T>ATypeStrategyprovides facilities to reading and writing values to buffers, as well as basic value comparators and byte size estimation.getType()TypeDescriptorenumeration used to handle different classes of typesinthashCode()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.druid.segment.column.TypeSignature
anyOf, asTypeString, is, isArray, isNumeric, isPrimitive, isPrimitiveArray
-
Field Details
-
type
-
complexTypeName
-
elementType
-
-
Constructor Details
-
BaseTypeSignature
public BaseTypeSignature(TypeFactory typeFactory, Type type, @Nullable String complexTypeName, @Nullable TypeSignature<Type> elementType)
-
-
Method Details
-
getType
Description copied from interface:TypeSignatureTypeDescriptorenumeration used to handle different classes of types- Specified by:
getTypein interfaceTypeSignature<Type extends TypeDescriptor>- See Also:
-
getComplexTypeName
Description copied from interface:TypeSignatureType name of 'complex' types (ValueType.COMPLEX,ExprType.COMPLEX), which are 'registered' by their name, acting as a key to get the correct set of serialization, deserialization, and other type specific handling facilties. For other types, this value will be null.- Specified by:
getComplexTypeNamein interfaceTypeSignature<Type extends TypeDescriptor>
-
getElementType
Description copied from interface:TypeSignatureTypeSignaturefor the elements contained in an array type (ValueType.ARRAY,ExprType.ARRAY). For non-array types, this value will be null.- Specified by:
getElementTypein interfaceTypeSignature<Type extends TypeDescriptor>
-
getStrategy
Description copied from interface:TypeSignatureATypeStrategyprovides facilities to reading and writing values to buffers, as well as basic value comparators and byte size estimation. UseTypeSignature.getNullableStrategy()if you need to read and write values which might possibly be null and aren't handling this in a different (probably better) way.- Specified by:
getStrategyin interfaceTypeSignature<Type extends TypeDescriptor>
-
getNullableStrategy
Description copied from interface:TypeSignatureANullableTypeStrategyis aTypeStrategywhich can handle reading and writing null values, at the very high cost of an additional byte per value, of which a single bit is used to storeTypeStrategies.IS_NULL_BYTEorTypeStrategies.IS_NOT_NULL_BYTEas appropriate. This pattern is common among buffer aggregators, which don't have access to an external memory location for more efficient tracking of null values and must store this information inline with the accumulated value.- Specified by:
getNullableStrategyin interfaceTypeSignature<Type extends TypeDescriptor>
-
equals
-
hashCode
public int hashCode() -
toString
-