Class HiveColumnHandle

java.lang.Object
io.trino.plugin.hive.HiveColumnHandle
All Implemented Interfaces:
ColumnHandle

public class HiveColumnHandle extends Object implements ColumnHandle
ColumnHandle for Hive Connector representing a full top level column or a projected column. Currently projected columns that represent a simple chain of dereferences are supported. e.g. for a column "A" with type struct(B struct(C bigint, ...), ....) there can be a projected column representing expression "A.B.C".
  • Field Details

    • PATH_COLUMN_INDEX

      public static final int PATH_COLUMN_INDEX
      See Also:
    • PATH_COLUMN_NAME

      public static final String PATH_COLUMN_NAME
      See Also:
    • PATH_HIVE_TYPE

      public static final HiveType PATH_HIVE_TYPE
    • PATH_TYPE

      public static final Type PATH_TYPE
    • BUCKET_COLUMN_INDEX

      public static final int BUCKET_COLUMN_INDEX
      See Also:
    • BUCKET_COLUMN_NAME

      public static final String BUCKET_COLUMN_NAME
      See Also:
    • BUCKET_HIVE_TYPE

      public static final HiveType BUCKET_HIVE_TYPE
    • BUCKET_TYPE_SIGNATURE

      public static final Type BUCKET_TYPE_SIGNATURE
    • FILE_SIZE_COLUMN_INDEX

      public static final int FILE_SIZE_COLUMN_INDEX
      See Also:
    • FILE_SIZE_COLUMN_NAME

      public static final String FILE_SIZE_COLUMN_NAME
      See Also:
    • FILE_SIZE_TYPE

      public static final HiveType FILE_SIZE_TYPE
    • FILE_SIZE_TYPE_SIGNATURE

      public static final Type FILE_SIZE_TYPE_SIGNATURE
    • FILE_MODIFIED_TIME_COLUMN_INDEX

      public static final int FILE_MODIFIED_TIME_COLUMN_INDEX
      See Also:
    • FILE_MODIFIED_TIME_COLUMN_NAME

      public static final String FILE_MODIFIED_TIME_COLUMN_NAME
      See Also:
    • FILE_MODIFIED_TIME_TYPE

      public static final HiveType FILE_MODIFIED_TIME_TYPE
    • FILE_MODIFIED_TIME_TYPE_SIGNATURE

      public static final Type FILE_MODIFIED_TIME_TYPE_SIGNATURE
    • PARTITION_COLUMN_INDEX

      public static final int PARTITION_COLUMN_INDEX
      See Also:
    • PARTITION_COLUMN_NAME

      public static final String PARTITION_COLUMN_NAME
      See Also:
    • PARTITION_HIVE_TYPE

      public static final HiveType PARTITION_HIVE_TYPE
    • PARTITION_TYPE_SIGNATURE

      public static final Type PARTITION_TYPE_SIGNATURE
    • UPDATE_ROW_ID_COLUMN_INDEX

      public static final int UPDATE_ROW_ID_COLUMN_INDEX
      See Also:
    • UPDATE_ROW_ID_COLUMN_NAME

      public static final String UPDATE_ROW_ID_COLUMN_NAME
      See Also:
  • Constructor Details

  • Method Details

    • createBaseColumn

      public static HiveColumnHandle createBaseColumn(String topLevelColumnName, int topLevelColumnIndex, HiveType hiveType, Type type, HiveColumnHandle.ColumnType columnType, Optional<String> comment)
    • getBaseColumn

      public HiveColumnHandle getBaseColumn()
    • getName

      public String getName()
    • getBaseColumnName

      public String getBaseColumnName()
    • getBaseHiveType

      public HiveType getBaseHiveType()
    • getBaseType

      public Type getBaseType()
    • getBaseHiveColumnIndex

      public int getBaseHiveColumnIndex()
    • getHiveColumnProjectionInfo

      public Optional<HiveColumnProjectionInfo> getHiveColumnProjectionInfo()
    • getHiveType

      public HiveType getHiveType()
    • getType

      public Type getType()
    • isPartitionKey

      public boolean isPartitionKey()
    • isHidden

      public boolean isHidden()
    • getColumnMetadata

      public ColumnMetadata getColumnMetadata()
    • getComment

      public Optional<String> getComment()
    • getColumnType

      public HiveColumnHandle.ColumnType getColumnType()
    • isBaseColumn

      public boolean isBaseColumn()
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface ColumnHandle
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface ColumnHandle
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toMetastoreColumn

      public Column toMetastoreColumn()
    • mergeRowIdColumnHandle

      public static HiveColumnHandle mergeRowIdColumnHandle()
    • pathColumnHandle

      public static HiveColumnHandle pathColumnHandle()
    • bucketColumnHandle

      public static HiveColumnHandle bucketColumnHandle()
      The column indicating the bucket id. When table bucketing differs from partition bucketing, this column indicates what bucket the row will fall in under the table bucketing scheme.
    • fileSizeColumnHandle

      public static HiveColumnHandle fileSizeColumnHandle()
    • fileModifiedTimeColumnHandle

      public static HiveColumnHandle fileModifiedTimeColumnHandle()
    • partitionColumnHandle

      public static HiveColumnHandle partitionColumnHandle()
    • isPathColumnHandle

      public static boolean isPathColumnHandle(HiveColumnHandle column)
    • isBucketColumnHandle

      public static boolean isBucketColumnHandle(HiveColumnHandle column)
    • isFileSizeColumnHandle

      public static boolean isFileSizeColumnHandle(HiveColumnHandle column)
    • isFileModifiedTimeColumnHandle

      public static boolean isFileModifiedTimeColumnHandle(HiveColumnHandle column)
    • isPartitionColumnHandle

      public static boolean isPartitionColumnHandle(HiveColumnHandle column)
    • isRowIdColumnHandle

      public static boolean isRowIdColumnHandle(HiveColumnHandle column)
    • getRetainedSizeInBytes

      public long getRetainedSizeInBytes()