Interface TableLocationKey

All Superinterfaces:
Comparable<TableLocationKey>, LogOutputAppendable, NamedImplementation
All Known Subinterfaces:
IcebergTableLocationKey, ImmutableTableLocationKey
All Known Implementing Classes:
FileTableLocationKey, IcebergTableParquetLocationKey, ParquetTableLocationKey, PartitionedTableLocationKey, StandaloneTableLocationKey, URITableLocationKey

public interface TableLocationKey extends Comparable<TableLocationKey>, NamedImplementation, LogOutputAppendable

Interface for opaque table location keys for use in TableLocationProvider implementations. Note that implementations are generally only comparable to other implementations intended for use in the same provider and discovery framework.

This interface also provides a mechanism for communicating partition information from a discovery framework to the table engine. A partition of a table represents some sub-range of the overall available data, but can always be thought of as a table in its own right. By representing partition membership as an ordered set of key-value pairs with mutually-comparable values, we make it possible to:

  1. Totally order the set of partitions belonging to a table, and thus all rows of the table
  2. Refer to partitions via columns of the data, allowing vast savings in filtering efficiency for filters that only need evaluate one or more partitioning columns

Generally, only PartitionAwareSourceTable and SourcePartitionedTable are properly partition-aware.

  • Method Details

    • getPartitionValue

      <PARTITION_VALUE_TYPE extends Comparable<PARTITION_VALUE_TYPE>> PARTITION_VALUE_TYPE getPartitionValue(@NotNull @NotNull String partitionKey)
      Lookup the value of one of the table partitions enclosing the location keyed by this.
      Type Parameters:
      PARTITION_VALUE_TYPE - The expected type of the partition value
      Parameters:
      partitionKey - The name of the partition
      Returns:
      The partition value
      Throws:
      UnknownPartitionKeyException - If the partition cannot be found
    • getPartitionKeys

      Set<String> getPartitionKeys()
      Get the set of available partition keys.
      Returns:
      The set of available partition keys
    • makeImmutable

      ImmutableTableLocationKey makeImmutable()
      Get an ImmutableTableLocationKey that is equal to this.
      Returns:
      An immutable version of this key