Enum TableFieldTypeEnum

java.lang.Object
java.lang.Enum<TableFieldTypeEnum>
oracle.kv.hadoop.hive.table.TableFieldTypeEnum
All Implemented Interfaces:
Serializable, Comparable<TableFieldTypeEnum>, java.lang.constant.Constable

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.
Two loggers are necessary because Hive2 employs the Log4j2 logging mechanism, whereas logging in Big Data SQL 4.0 is still based on Log4j version 1. As a result, when one executes a Hive query and wishes to log output from this class, the Log4j2-based logger specified by this class must be added to the Hive2 logging configuration file. On the other hand, to log output from this class when executing a Big Data SQL query, the Log4j v1 logger must be added to the Big Data SQL logging configuration file. In the future, when Big Data SQL changes its logging mechanims from Log4j v1 to Log4j2, this class should be changed to employ only the Log4j2-based logger.
  • Enum Constant Details

  • Method Details

    • values

      public static TableFieldTypeEnum[] 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

      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 name
      NullPointerException - 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)
    • kvHiveTypesMatch

      public static boolean kvHiveTypesMatch(FieldDef kvFieldDef, TypeInfo hiveColumnType)