Class UDHelper
- java.lang.Object
-
- org.apache.cassandra.cql3.functions.UDHelper
-
public final class UDHelper extends java.lang.ObjectHelper class for User Defined Functions, Types and Aggregates.
-
-
Constructor Summary
Constructors Constructor Description UDHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Class<?>asJavaClass(TypeCodec<?> codec)static TypeCodec<java.lang.Object>codecFor(DataType dataType)static java.lang.Objectdeserialize(TypeCodec<?> codec, ProtocolVersion protocolVersion, java.nio.ByteBuffer value)static DataTypedriverType(AbstractType abstractType)Returns theDataTypefor the C* internal type.static DataTypedriverTypeFromAbstractType(java.lang.String abstractTypeDef)static DataType[]driverTypes(java.util.List<AbstractType<?>> abstractTypes)Construct an array containing theDataTypes for the C* internal types.static booleanisNullOrEmpty(AbstractType<?> type, java.nio.ByteBuffer bb)static java.nio.ByteBufferserialize(TypeCodec<?> codec, ProtocolVersion protocolVersion, java.lang.Object value)static com.google.common.reflect.TypeToken<?>[]typeTokens(TypeCodec<java.lang.Object>[] dataTypes, boolean calledOnNullInput)Construct an array containing the Java classes for the givenDataTypes.
-
-
-
Method Detail
-
typeTokens
public static com.google.common.reflect.TypeToken<?>[] typeTokens(TypeCodec<java.lang.Object>[] dataTypes, boolean calledOnNullInput)
Construct an array containing the Java classes for the givenDataTypes.- Parameters:
dataTypes- array with UDF argument typescalledOnNullInput- whether to allownullas an argument value- Returns:
- array of same size with UDF arguments
-
driverTypes
public static DataType[] driverTypes(java.util.List<AbstractType<?>> abstractTypes)
Construct an array containing theDataTypes for the C* internal types.- Parameters:
abstractTypes- list with UDF argument types- Returns:
- array with argument types as
DataType
-
driverType
public static DataType driverType(AbstractType abstractType)
Returns theDataTypefor the C* internal type.
-
driverTypeFromAbstractType
public static DataType driverTypeFromAbstractType(java.lang.String abstractTypeDef)
-
deserialize
public static java.lang.Object deserialize(TypeCodec<?> codec, ProtocolVersion protocolVersion, java.nio.ByteBuffer value)
-
serialize
public static java.nio.ByteBuffer serialize(TypeCodec<?> codec, ProtocolVersion protocolVersion, java.lang.Object value)
-
asJavaClass
public static java.lang.Class<?> asJavaClass(TypeCodec<?> codec)
-
isNullOrEmpty
public static boolean isNullOrEmpty(AbstractType<?> type, java.nio.ByteBuffer bb)
-
-