Interface PartitionFunction

All Known Implementing Classes:
AbstractRangePartitionFunction

public interface PartitionFunction
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    eval(int index, int numPartitions)
    Evaluate a partitioning function for a particular row index and return the partition id
    Returns a FieldReference (LogicalExpression) for the partition function
    Return the list of FieldReferences that participate in the partitioning function
    void
    setup(List<VectorWrapper<?>> partitionKeys)
    Setup method for the partitioning function
  • Method Details

    • getPartitionRefList

      List<FieldReference> getPartitionRefList()
      Return the list of FieldReferences that participate in the partitioning function
      Returns:
      list of FieldReferences
    • setup

      void setup(List<VectorWrapper<?>> partitionKeys)
      Setup method for the partitioning function
      Parameters:
      partitionKeys - a list of partition columns on which range partitioning is needed
    • eval

      int eval(int index, int numPartitions)
      Evaluate a partitioning function for a particular row index and return the partition id
      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

      FieldReference getPartitionFieldRef()
      Returns a FieldReference (LogicalExpression) for the partition function
      Returns:
      FieldReference for the partition function