org.apache.pig.impl.logicalLayer.optimizer
Class LogicalOptimizer

java.lang.Object
  extended by org.apache.pig.impl.plan.optimizer.PlanOptimizer<LogicalOperator,LogicalPlan>
      extended by org.apache.pig.impl.logicalLayer.optimizer.LogicalOptimizer

public class LogicalOptimizer
extends PlanOptimizer<LogicalOperator,LogicalPlan>

An optimizer for logical plans.


Field Summary
 
Fields inherited from class org.apache.pig.impl.plan.optimizer.PlanOptimizer
mMaxIterations, mPlan, mRules
 
Constructor Summary
LogicalOptimizer(LogicalPlan plan)
           
LogicalOptimizer(LogicalPlan plan, ExecType mode)
           
LogicalOptimizer(LogicalPlan plan, ExecType mode, Set<String> turnOffRules)
           
 
Method Summary
 int optimize()
          Run the optimizer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogicalOptimizer

public LogicalOptimizer(LogicalPlan plan)

LogicalOptimizer

public LogicalOptimizer(LogicalPlan plan,
                        ExecType mode)

LogicalOptimizer

public LogicalOptimizer(LogicalPlan plan,
                        ExecType mode,
                        Set<String> turnOffRules)
Method Detail

optimize

public final int optimize()
                   throws OptimizerException
Description copied from class: PlanOptimizer
Run the optimizer. This method attempts to match each of the Rules against the plan. If a Rule matches, it then calls the check method of the associated Transformer to give the it a chance to check whether it really wants to do the optimization. If that returns true as well, then Transformer.transform is called.

Overrides:
optimize in class PlanOptimizer<LogicalOperator,LogicalPlan>
Returns:
number of iterations the optimizer tried check and transform for the various rules
Throws:
OptimizerException


Copyright © ${year} The Apache Software Foundation