Class AbstractRangePartitionFunction

java.lang.Object
org.apache.drill.exec.planner.physical.AbstractRangePartitionFunction
All Implemented Interfaces:
PartitionFunction

public abstract class AbstractRangePartitionFunction extends Object implements PartitionFunction
  • Field Details

  • Constructor Details

    • AbstractRangePartitionFunction

      public AbstractRangePartitionFunction()
  • Method Details

    • getPartitionRefList

      public abstract List<FieldReference> getPartitionRefList()
      Description copied from interface: PartitionFunction
      Return the list of FieldReferences that participate in the partitioning function
      Specified by:
      getPartitionRefList in interface PartitionFunction
      Returns:
      list of FieldReferences
    • setup

      public abstract void setup(List<VectorWrapper<?>> partitionKeys)
      Description copied from interface: PartitionFunction
      Setup method for the partitioning function
      Specified by:
      setup in interface PartitionFunction
      Parameters:
      partitionKeys - a list of partition columns on which range partitioning is needed
    • eval

      public abstract int eval(int index, int numPartitions)
      Description copied from interface: PartitionFunction
      Evaluate a partitioning function for a particular row index and return the partition id
      Specified by:
      eval in interface PartitionFunction
      Parameters:
      index - the integer index into the partition keys vector for a specific 'row' of values
      numPartitions - the max number of partitions that are allowed
      Returns:
      partition id, an integer value
    • getPartitionFieldRef

      public FieldReference getPartitionFieldRef()
      Description copied from interface: PartitionFunction
      Returns a FieldReference (LogicalExpression) for the partition function
      Specified by:
      getPartitionFieldRef in interface PartitionFunction
      Returns:
      FieldReference for the partition function