Interface OperatorFactory

All Known Implementing Classes:
AbstractPartitioningOperatorFactory, AbstractSortOperatorFactory, GlueingPartitioningOperatorFactory, NaivePartitioningOperatorFactory, NaiveSortOperatorFactory, PartitionSortOperatorFactory, ScanOperatorFactory, WindowOperatorFactory

public interface OperatorFactory
A factory for Operators. This class exists to encapsulate the user-definition of an Operator. I.e. which operator, what fields it should operate on, etc. etc. These Factory objects are then used to combine Operators together and run against concrete data.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Validates the equivalence of Operators.
    Builds an operator according to the definition of the OperatorFactory and wraps it around the operator passed in to this function.
  • Method Details

    • wrap

      Operator wrap(Operator op)
      Builds an operator according to the definition of the OperatorFactory and wraps it around the operator passed in to this function.
      Parameters:
      op - the Operator to wrap
      Returns:
      the wrapped Operator
    • validateEquivalent

      boolean validateEquivalent(OperatorFactory other)
      Validates the equivalence of Operators. This is similar to @{code .equals} but is its own method so that it can ignore certain fields that would be important for a true equality check. Namely, two Operators defined the same way but with different output names can be considered equivalent even though they are not equal.

      This primarily exists to simplify tests, where this equivalence can be used to validate that the Operators created by the SQL planner are actually equivalent to what we expect without needing to be overly dependent on how the planner names output columns

      Parameters:
      other - the processor to test equivalence of
      Returns:
      boolean identifying if these processors should be considered equivalent to each other.