Package oracle.kv.hadoop.hive.table
Enum TableFieldTypeEnum
- All Implemented Interfaces:
Serializable
,Comparable<TableFieldTypeEnum>
,java.lang.constant.Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
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 Details
-
TABLE_FIELD_STRING
-
TABLE_FIELD_JSON
-
TABLE_FIELD_BOOLEAN
-
TABLE_FIELD_INTEGER
-
TABLE_FIELD_LONG
-
TABLE_FIELD_FLOAT
-
TABLE_FIELD_DOUBLE
-
TABLE_FIELD_NUMBER
-
TABLE_FIELD_TIMESTAMP
-
TABLE_FIELD_ENUM
-
TABLE_FIELD_BINARY
-
TABLE_FIELD_FIXED_BINARY
-
TABLE_FIELD_MAP
-
TABLE_FIELD_RECORD
-
TABLE_FIELD_ARRAY
-
TABLE_FIELD_NULL
-
TABLE_FIELD_UNKNOWN_TYPE
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
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
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
-
stringToEnumValue
-
kvHiveTypesMatch
-