org.apache.pig.newplan.logical.rules
Class ImplicitSplitInserter

java.lang.Object
  extended by org.apache.pig.newplan.optimizer.Rule
      extended by org.apache.pig.newplan.logical.rules.ImplicitSplitInserter

public class ImplicitSplitInserter
extends Rule

Super class for all rules that operates on the whole plan. It doesn't look for a specific pattern. An example of such kind rule is ColumnPrune.


Nested Class Summary
 class ImplicitSplitInserter.ImplicitSplitInserterTransformer
           
 
Field Summary
 
Fields inherited from class org.apache.pig.newplan.optimizer.Rule
currentPlan, log, name, pattern
 
Constructor Summary
ImplicitSplitInserter(String n)
           
 
Method Summary
protected  OperatorPlan buildPattern()
          Build the pattern that this rule will look for
 Transformer getNewTransformer()
          Get the transformer for this rule.
 List<OperatorPlan> match(OperatorPlan plan)
          Search for all the sub-plans that matches the pattern defined by this rule.
 
Methods inherited from class org.apache.pig.newplan.optimizer.Rule
getName, getPattern, isMandatory, isSkipListener, setSkipListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImplicitSplitInserter

public ImplicitSplitInserter(String n)
Method Detail

match

public List<OperatorPlan> match(OperatorPlan plan)
                         throws FrontendException
Description copied from class: Rule
Search for all the sub-plans that matches the pattern defined by this rule. See class description above for limitations on the patterns supported.

Overrides:
match in class Rule
Parameters:
plan - the OperatorPlan to look for matches to the pattern
Returns:
A list of all matched sub-plans. The returned plans are partial views of the original OperatorPlan. Each is a sub-set of the original plan and represents the same topology as the pattern, but operators in the returned plan are the same objects as the original plan. Therefore, a call getPlan() from any node in the return plan would return the original plan.
Throws:
FrontendException

getNewTransformer

public Transformer getNewTransformer()
Description copied from class: Rule
Get the transformer for this rule. Abstract because the rule may want to choose how to instantiate the transformer. This should never return a cached transformer, it should always return a fresh one with no state.

Specified by:
getNewTransformer in class Rule
Returns:
Transformer to use with this rule

buildPattern

protected OperatorPlan buildPattern()
Description copied from class: Rule
Build the pattern that this rule will look for

Specified by:
buildPattern in class Rule
Returns:
the pattern to look for by this rule


Copyright © 2012 The Apache Software Foundation