public final class UDHelper
extends java.lang.Object
Constructor and Description |
---|
UDHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class<?> |
asJavaClass(TypeCodec<?> codec) |
static TypeCodec<java.lang.Object> |
codecFor(DataType dataType) |
static java.lang.Object |
deserialize(TypeCodec<?> codec,
ProtocolVersion protocolVersion,
java.nio.ByteBuffer value) |
static DataType |
driverType(AbstractType abstractType)
Returns the
DataType for the C* internal type. |
static DataType |
driverTypeFromAbstractType(java.lang.String abstractTypeDef) |
static DataType[] |
driverTypes(java.util.List<AbstractType<?>> abstractTypes)
Construct an array containing the
DataType s for the
C* internal types. |
static boolean |
isNullOrEmpty(AbstractType<?> type,
java.nio.ByteBuffer bb) |
static java.nio.ByteBuffer |
serialize(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 given
DataType s. |
public static com.google.common.reflect.TypeToken<?>[] typeTokens(TypeCodec<java.lang.Object>[] dataTypes, boolean calledOnNullInput)
DataType
s.dataTypes
- array with UDF argument typescalledOnNullInput
- whether to allow null
as an argument valuepublic static DataType[] driverTypes(java.util.List<AbstractType<?>> abstractTypes)
DataType
s for the
C* internal types.abstractTypes
- list with UDF argument typesDataType
public static DataType driverType(AbstractType abstractType)
DataType
for the C* internal type.public static DataType driverTypeFromAbstractType(java.lang.String abstractTypeDef)
public static java.lang.Object deserialize(TypeCodec<?> codec, ProtocolVersion protocolVersion, java.nio.ByteBuffer value)
public static java.nio.ByteBuffer serialize(TypeCodec<?> codec, ProtocolVersion protocolVersion, java.lang.Object value)
public static java.lang.Class<?> asJavaClass(TypeCodec<?> codec)
public static boolean isNullOrEmpty(AbstractType<?> type, java.nio.ByteBuffer bb)
Copyright © 2009-2022 The Apache Software Foundation