Enum ColumnMetadata.StructureType

java.lang.Object
java.lang.Enum<ColumnMetadata.StructureType>
org.apache.drill.exec.record.metadata.ColumnMetadata.StructureType
All Implemented Interfaces:
Serializable, Comparable<ColumnMetadata.StructureType>
Enclosing interface:
ColumnMetadata

public static enum ColumnMetadata.StructureType extends Enum<ColumnMetadata.StructureType>
Rough characterization of Drill types into metadata categories. Various aspects of Drill's type system are very, very messy. However, Drill is defined by its code, not some abstract design, so the metadata system here does the best job it can to simplify the messy type system while staying close to the underlying implementation.
  • Enum Constant Details

    • PRIMITIVE

      public static final ColumnMetadata.StructureType PRIMITIVE
      Primitive column (all types except List, Map and Union.) Includes (one-dimensional) arrays of those types.
    • TUPLE

      public static final ColumnMetadata.StructureType TUPLE
      Map or repeated map. Also describes the row as a whole.
    • VARIANT

      public static final ColumnMetadata.StructureType VARIANT
      Union or (non-repeated) list. (A non-repeated list is, essentially, a repeated union.)
    • MULTI_ARRAY

      public static final ColumnMetadata.StructureType MULTI_ARRAY
      A repeated list. A repeated list is not simply the repeated form of a list, it is something else entirely. It acts as a dimensional wrapper around any other type (except list) and adds a non-nullable extra dimension. Hence, this type is for 2D+ arrays.

      In theory, a 2D list of, say, INT would be an INT column, but repeated in to dimensions. Alas, that is not how it is. Also, if we have a separate category for 2D lists, we should have a separate category for 1D lists. But, again, that is not how the code has evolved.

    • DICT

      public static final ColumnMetadata.StructureType DICT
      Dict or repeated dict.
    • DYNAMIC

      public static final ColumnMetadata.StructureType DYNAMIC
      Unknown, specified at runtime. (Only for logical columns, not for physical columns.)
  • Method Details

    • values

      public static ColumnMetadata.StructureType[] 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 ColumnMetadata.StructureType 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