Skip to content

GenericStrategy — Planning Strategies

GenericStrategy is an abstraction of planning strategies of QueryPlanner.

Type Constructor and PhysicalPlan Type

GenericStrategy is a type constructor in Scala (generic class in Java) with the following definition:

abstract class GenericStrategy[PhysicalPlan <: TreeNode[PhysicalPlan]]

GenericStrategy uses PhysicalPlan as the name of a type that is a subtype of TreeNode and for which a concrete class can be created (e.g. SparkStrategy).

Contract

Executing Rule

apply(
  plan: LogicalPlan): Seq[PhysicalPlan]

Executes the planning strategy (to generate a TreeNode)

planLater

planLater(
  plan: LogicalPlan): PhysicalPlan

Implementations