Packages

abstract class Optimizer extends RuleExecutor[LogicalPlan] with SQLConfHelper

Abstract class all optimizers should inherit of, contains the standard batches (extending Optimizers can override this.

Linear Supertypes
SQLConfHelper, RuleExecutor[LogicalPlan], Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Optimizer
  2. SQLConfHelper
  3. RuleExecutor
  4. Logging
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Optimizer(catalogManager: CatalogManager)

Type Members

  1. case class Batch(name: String, strategy: Strategy, rules: Rule[TreeType]*) extends Product with Serializable

    A batch of rules.

    A batch of rules.

    Attributes
    protected[catalyst]
    Definition Classes
    RuleExecutor
  2. case class FixedPoint(maxIterations: Int, errorOnExceed: Boolean = false, maxIterationsSetting: String = null) extends Strategy with Product with Serializable

    A strategy that runs until fix point or maxIterations times, whichever comes first.

    A strategy that runs until fix point or maxIterations times, whichever comes first. Especially, a FixedPoint(1) batch is supposed to run only once.

    Definition Classes
    RuleExecutor
  3. abstract class Strategy extends AnyRef

    An execution strategy for rules that indicates the maximum number of executions.

    An execution strategy for rules that indicates the maximum number of executions. If the execution reaches fix point (i.e. converge) before maxIterations, it will stop.

    Definition Classes
    RuleExecutor

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. final def batches: Seq[Batch]

    Returns (defaultBatches - (excludedRules - nonExcludableRules)), the rule batches that eventually run in the Optimizer.

    Returns (defaultBatches - (excludedRules - nonExcludableRules)), the rule batches that eventually run in the Optimizer.

    Implementations of this class should override defaultBatches, and nonExcludableRules if necessary, instead of this method.

    Definition Classes
    OptimizerRuleExecutor
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def conf: SQLConf

    The active config object within the current scope.

    The active config object within the current scope. See SQLConf.get for more information.

    Definition Classes
    SQLConfHelper
  8. def defaultBatches: Seq[Batch]

    Defines the default rule batches in the Optimizer.

    Defines the default rule batches in the Optimizer.

    Implementations of this class should override this method, and nonExcludableRules if necessary, instead of batches. The rule batches that eventually run in the Optimizer, i.e., returned by batches, will be (defaultBatches - (excludedRules - nonExcludableRules)).

  9. def earlyScanPushDownRules: Seq[Rule[LogicalPlan]]

    Override to provide additional rules for early projection and filter pushdown to scans.

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. val excludedOnceBatches: Set[String]
    Attributes
    protected
    Definition Classes
    OptimizerRuleExecutor
  13. def execute(plan: LogicalPlan): LogicalPlan

    Executes the batches of rules defined by the subclass.

    Executes the batches of rules defined by the subclass. The batches are executed serially using the defined execution strategy. Within each batch, rules are also executed serially.

    Definition Classes
    RuleExecutor
  14. def executeAndTrack(plan: LogicalPlan, tracker: QueryPlanningTracker): LogicalPlan

    Executes the batches of rules defined by the subclass, and also tracks timing info for each rule using the provided tracker.

    Executes the batches of rules defined by the subclass, and also tracks timing info for each rule using the provided tracker.

    Definition Classes
    RuleExecutor
    See also

    execute

  15. def extendedOperatorOptimizationRules: Seq[Rule[LogicalPlan]]

    Override to provide additional rules for the operator optimization batch.

  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def fixedPoint: FixedPoint
    Attributes
    protected
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  21. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  24. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  25. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  26. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  27. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  28. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  29. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  30. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  31. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  32. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  33. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  34. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  35. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  36. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. def nonExcludableRules: Seq[String]

    Defines rules that cannot be excluded from the Optimizer even if they are specified in SQL config "excludedRules".

    Defines rules that cannot be excluded from the Optimizer even if they are specified in SQL config "excludedRules".

    Implementations of this class can override this method if necessary. The rule batches that eventually run in the Optimizer, i.e., returned by batches, will be (defaultBatches - (excludedRules - nonExcludableRules)).

  38. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  39. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  40. def preCBORules: Seq[Rule[LogicalPlan]]

    Override to provide additional rules for rewriting plans after operator optimization rules and before any cost-based optimization rules that depend on stats.

  41. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  42. def toString(): String
    Definition Classes
    AnyRef → Any
  43. def validatePlanChanges(previousPlan: LogicalPlan, currentPlan: LogicalPlan): Option[String]

    Defines a validate function that validates the plan changes after the execution of each rule, to make sure these rules make valid changes to the plan.

    Defines a validate function that validates the plan changes after the execution of each rule, to make sure these rules make valid changes to the plan. For example, we can check whether a plan is still resolved after each rule in Optimizer, so that we can catch rules that turn the plan into unresolved.

    Attributes
    protected
    Definition Classes
    OptimizerRuleExecutor
  44. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  47. object FinishAnalysis extends Rule[LogicalPlan]

    Apply finish-analysis rules for the entire plan including all subqueries.

  48. object OptimizeSubqueries extends Rule[LogicalPlan]

    Optimize all the subqueries inside expression.

  49. object UpdateCTERelationStats extends Rule[LogicalPlan]

    Update CTE reference stats.

  50. object Once extends Strategy with Product with Serializable

    A strategy that is run once and idempotent.

    A strategy that is run once and idempotent.

    Definition Classes
    RuleExecutor

Inherited from SQLConfHelper

Inherited from RuleExecutor[LogicalPlan]

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped