Class PartitionExplorerImpl

java.lang.Object
org.apache.drill.exec.store.PartitionExplorerImpl
All Implemented Interfaces:
PartitionExplorer

public class PartitionExplorerImpl extends Object implements PartitionExplorer
  • Constructor Details

    • PartitionExplorerImpl

      public PartitionExplorerImpl(org.apache.calcite.schema.SchemaPlus rootSchema)
  • Method Details

    • getSubPartitions

      public Iterable<String> getSubPartitions(String schema, String table, List<String> partitionColumns, List<String> partitionValues) throws PartitionNotFoundException
      Description copied from interface: PartitionExplorer
      For the schema provided, get a list of sub-partitions of a particular table and the partitions specified by partition columns and values. Individual storage plugins will assign specific meaning to the parameters and return values. A return value of an empty list should be given if the partition has no sub-partitions. Note this does cause a collision between empty partitions and leaf partitions, the interface should be modified if the distinction is meaningful. Example: for a filesystem plugin the partition information can be simply be a path from the root of the given workspace to the desired directory. The return value should be defined as a list of full paths (again from the root of the workspace), which can be passed by into this interface to explore partitions further down. An empty list would be returned if the partition provided was a file, or an empty directory. Note to future devs, keep this doc in sync with SchemaPartitionExplorer.
      Specified by:
      getSubPartitions in interface PartitionExplorer
      Parameters:
      schema - schema path, can be complete or relative to the default schema
      partitionColumns - a list of partitions to match
      partitionValues - list of values of each partition (corresponding to the partition column list)
      Returns:
      list of sub-partitions, will be empty if a there is no further level of sub-partitioning below, i.e. hit a leaf partition
      Throws:
      PartitionNotFoundException - when the partition does not exist in the given workspace