Package oracle.kv.hadoop.hive.table
Enum TableFieldTypeEnum
- java.lang.Object
-
- java.lang.Enum<TableFieldTypeEnum>
-
- oracle.kv.hadoop.hive.table.TableFieldTypeEnum
-
- All Implemented Interfaces:
Serializable
,Comparable<TableFieldTypeEnum>
public enum TableFieldTypeEnum extends Enum<TableFieldTypeEnum>
Enum class that defines values corresponding to each of the enum values defined in FieldDef.Type; which represent the possible field types of a KV Store table. The methods of this enum provide a mechanism for mapping a table defined in a given KV Store and a table created in Hive. - Note on Logging - Two loggers are currently employed by this class:- One logger based on Log4j version 1, accessed via the org.apache.commons.logging wrapper.
- One logger based on the Log4j2 API.
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TableFieldTypeEnum
fromHiveType(TypeInfo hiveType)
Maps the given Hive column type to the corresponding enum value defined in this class; corresponding to a field type of a KV Store table.static TableFieldTypeEnum
fromHiveType(TypeInfo hiveType, FieldDef.Type kvType)
static TableFieldTypeEnum
fromKvType(FieldDef.Type kvType)
Maps the given field type of a KV Store table to the corresponding enum value defined in this class; corresponding to a field type of a KV Store table.static boolean
kvHiveTypesMatch(FieldDef kvFieldDef, TypeInfo hiveColumnType)
static TableFieldTypeEnum
stringToEnumValue(String str)
static TableFieldTypeEnum
valueOf(String name)
Returns the enum constant of this type with the specified name.static TableFieldTypeEnum[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TABLE_FIELD_STRING
public static final TableFieldTypeEnum TABLE_FIELD_STRING
-
TABLE_FIELD_JSON
public static final TableFieldTypeEnum TABLE_FIELD_JSON
-
TABLE_FIELD_BOOLEAN
public static final TableFieldTypeEnum TABLE_FIELD_BOOLEAN
-
TABLE_FIELD_INTEGER
public static final TableFieldTypeEnum TABLE_FIELD_INTEGER
-
TABLE_FIELD_LONG
public static final TableFieldTypeEnum TABLE_FIELD_LONG
-
TABLE_FIELD_FLOAT
public static final TableFieldTypeEnum TABLE_FIELD_FLOAT
-
TABLE_FIELD_DOUBLE
public static final TableFieldTypeEnum TABLE_FIELD_DOUBLE
-
TABLE_FIELD_NUMBER
public static final TableFieldTypeEnum TABLE_FIELD_NUMBER
-
TABLE_FIELD_TIMESTAMP
public static final TableFieldTypeEnum TABLE_FIELD_TIMESTAMP
-
TABLE_FIELD_ENUM
public static final TableFieldTypeEnum TABLE_FIELD_ENUM
-
TABLE_FIELD_BINARY
public static final TableFieldTypeEnum TABLE_FIELD_BINARY
-
TABLE_FIELD_FIXED_BINARY
public static final TableFieldTypeEnum TABLE_FIELD_FIXED_BINARY
-
TABLE_FIELD_MAP
public static final TableFieldTypeEnum TABLE_FIELD_MAP
-
TABLE_FIELD_RECORD
public static final TableFieldTypeEnum TABLE_FIELD_RECORD
-
TABLE_FIELD_ARRAY
public static final TableFieldTypeEnum TABLE_FIELD_ARRAY
-
TABLE_FIELD_NULL
public static final TableFieldTypeEnum TABLE_FIELD_NULL
-
TABLE_FIELD_UNKNOWN_TYPE
public static final TableFieldTypeEnum TABLE_FIELD_UNKNOWN_TYPE
-
-
Method Detail
-
values
public static TableFieldTypeEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TableFieldTypeEnum c : TableFieldTypeEnum.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TableFieldTypeEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
fromKvType
public static TableFieldTypeEnum fromKvType(FieldDef.Type kvType)
Maps the given field type of a KV Store table to the corresponding enum value defined in this class; corresponding to a field type of a KV Store table.
-
fromHiveType
public static TableFieldTypeEnum fromHiveType(TypeInfo hiveType)
Maps the given Hive column type to the corresponding enum value defined in this class; corresponding to a field type of a KV Store table. Note that some of the Hive types have no corresponding type; in which case, TABLE_FIELD_UNKNOWN_TYPE is returned.
-
fromHiveType
public static TableFieldTypeEnum fromHiveType(TypeInfo hiveType, FieldDef.Type kvType)
-
stringToEnumValue
public static TableFieldTypeEnum stringToEnumValue(String str)
-
-