Interface QueryPlanNode

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
QueryPlan.BranchQueryPlanNode, QueryPlan.CachePointNode, QueryPlan.CompositeNode, QueryPlan.ConstantSelectNode, QueryPlan.CreateFunctionsNode, QueryPlan.DistinctNode, QueryPlan.EquiJoinNode, QueryPlan.ExhaustiveSelectNode, QueryPlan.FetchTableNode, QueryPlan.FetchViewNode, QueryPlan.FunctionalSelectNode, QueryPlan.GroupNode, QueryPlan.JoinNode, QueryPlan.LeftOuterJoinNode, QueryPlan.LogicalUnionNode, QueryPlan.MarkerNode, QueryPlan.MultiColumnEquiSelectNode, QueryPlan.NaturalJoinNode, QueryPlan.NonCorrelatedAnyAllNode, QueryPlan.RangeSelectNode, QueryPlan.SimplePatternSelectNode, QueryPlan.SimpleSelectNode, QueryPlan.SingleQueryPlanNode, QueryPlan.SingleRowTableNode, QueryPlan.SortNode, QueryPlan.SubsetNode

public interface QueryPlanNode extends Serializable, Cloneable
A node element of a query plan tree. A plan of a query is represented as a tree structure of such nodes. The design allows for plan nodes to be easily reorganised for the construction of better plans.
Author:
Tobias Downer
  • Method Details

    • evaluate

      Table evaluate(QueryContext context)
      Evaluates the node and returns the result as a Table. The VariableResolver resolves any outer variables
    • discoverTableNames

      ArrayList discoverTableNames(ArrayList list)
      Discovers a list of TableName that represent the sources that this query requires to complete itself. For example, if this is a query plan of two joined table, the fully resolved names of both tables are returned.

      The resultant list will not contain the same table name more than once. The resultant list contains TableName objects.

      NOTE, if a table is aliased, the unaliased name is returned.

    • discoverCorrelatedVariables

      ArrayList discoverCorrelatedVariables(int level, ArrayList list)
      Discovers all the correlated variables in the plan (and plan children) that reference a particular layer. For example, if we wanted to find all the CorrelatedVariable objects that reference the current layer, we would typically call 'discoverCorrelatedVariables(0, new ArrayList())'
    • clone

      Deep clones this query plan.
      Throws:
      CloneNotSupportedException
    • debugString

      void debugString(int indent, StringBuffer buf)
      Writes a textural representation of the node to the StringBuffer at the given indent level.