Package org.apache.druid.segment.column
Class Types
java.lang.Object
org.apache.druid.segment.column.Types
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends TypeDescriptor>
booleaneither(TypeSignature<T> typeSignature1, TypeSignature<T> typeSignature2, T typeDescriptor) Returns true if either suppliedTypeSignature.getType()is the givenTypeDescriptorUseful for choosing a commonTypeDescriptorbetween twoTypeSignaturewhen one of the signatures might be null.static <T extends TypeSignature<?>>
TfromString(TypeFactory<T> typeFactory, String typeString) static <T extends TypeDescriptor>
booleanis(TypeSignature<T> typeSignature, T typeDescriptor) Returns true ifTypeSignature.getType()is of the specifiedTypeDescriptorstatic <T extends TypeDescriptor>
booleanisNullOr(TypeSignature<T> typeSignature, T typeDescriptor) Returns true ifTypeSignature.getType()is null, or of the specifiedTypeDescriptorstatic <T extends TypeDescriptor>
booleanisNullOrAnyOf(TypeSignature<T> typeSignature, T... typeDescriptors) Returns true if theTypeSignatureis null, or is any one of the specifiedTypeDescriptorstatic <T extends TypeDescriptor>
booleanisNumeric(TypeSignature<T> typeSignature) Returns true ifTypeSignatureis not null and isTypeSignature.isNumeric()static <T extends TypeDescriptor>
booleanisNumericOrNumericArray(TypeSignature<T> typeSignature) Returns true ifTypeSignatureis not null and isTypeSignature.isNumeric()or hasTypeSignature.getElementType()that is numeric.
-
Constructor Details
-
Types
public Types()
-
-
Method Details
-
fromString
@Nullable public static <T extends TypeSignature<?>> T fromString(TypeFactory<T> typeFactory, @Nullable String typeString) -
is
public static <T extends TypeDescriptor> boolean is(@Nullable TypeSignature<T> typeSignature, T typeDescriptor) Returns true ifTypeSignature.getType()is of the specifiedTypeDescriptor -
isNullOr
public static <T extends TypeDescriptor> boolean isNullOr(@Nullable TypeSignature<T> typeSignature, T typeDescriptor) Returns true ifTypeSignature.getType()is null, or of the specifiedTypeDescriptor -
isNullOrAnyOf
public static <T extends TypeDescriptor> boolean isNullOrAnyOf(@Nullable TypeSignature<T> typeSignature, T... typeDescriptors) Returns true if theTypeSignatureis null, or is any one of the specifiedTypeDescriptor -
either
public static <T extends TypeDescriptor> boolean either(@Nullable TypeSignature<T> typeSignature1, @Nullable TypeSignature<T> typeSignature2, T typeDescriptor) Returns true if either suppliedTypeSignature.getType()is the givenTypeDescriptorUseful for choosing a commonTypeDescriptorbetween twoTypeSignaturewhen one of the signatures might be null. -
isNumeric
public static <T extends TypeDescriptor> boolean isNumeric(@Nullable TypeSignature<T> typeSignature) Returns true ifTypeSignatureis not null and isTypeSignature.isNumeric() -
isNumericOrNumericArray
public static <T extends TypeDescriptor> boolean isNumericOrNumericArray(@Nullable TypeSignature<T> typeSignature) Returns true ifTypeSignatureis not null and isTypeSignature.isNumeric()or hasTypeSignature.getElementType()that is numeric.
-