@InterfaceAudience.Public @InterfaceStability.Evolving public enum Type extends Enum<Type>
Enum Constant and Description |
---|
BINARY |
BOOL |
DATE |
DECIMAL |
DOUBLE |
FLOAT |
INT16 |
INT32 |
INT64 |
INT8 |
STRING |
UNIXTIME_MICROS |
VARCHAR |
Modifier and Type | Method and Description |
---|---|
org.apache.kudu.Common.DataType |
getDataType()
Deprecated.
|
org.apache.kudu.Common.DataType |
getDataType(ColumnTypeAttributes typeAttributes)
Get the data type from the common's pb
|
String |
getName()
Get the string representation of this type
|
int |
getSize()
Deprecated.
|
int |
getSize(ColumnTypeAttributes typeAttributes)
The size of this type on the wire
|
static Type |
getTypeForDataType(org.apache.kudu.Common.DataType type)
Convert the pb DataType to a Type
|
static Type |
getTypeForName(String name)
Create a Type from its name
|
String |
toString() |
static Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Type INT8
public static final Type INT16
public static final Type INT32
public static final Type INT64
public static final Type BINARY
public static final Type STRING
public static final Type BOOL
public static final Type FLOAT
public static final Type DOUBLE
public static final Type UNIXTIME_MICROS
public static final Type DECIMAL
public static final Type VARCHAR
public static final Type DATE
public static Type[] values()
for (Type c : Type.values()) System.out.println(c);
public static Type valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Deprecated public org.apache.kudu.Common.DataType getDataType()
getDataType(ColumnTypeAttributes)
public org.apache.kudu.Common.DataType getDataType(ColumnTypeAttributes typeAttributes)
typeAttributes
- the additional attributes of the type.public String getName()
@Deprecated public int getSize()
getSize(ColumnTypeAttributes)
public int getSize(ColumnTypeAttributes typeAttributes)
typeAttributes
- the additional attributes of the type.public static Type getTypeForDataType(org.apache.kudu.Common.DataType type)
type
- DataType to convertpublic static Type getTypeForName(String name)
name
- The DataType name. It accepts Type name (from the getName()
method) and ENUM name (from the name() method).IllegalArgumentException
- if the provided name doesn't map to any
known type.