org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans
Class PatternPlan

java.lang.Object
  extended by org.apache.pig.newplan.BaseOperatorPlan
      extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PatternPlan
All Implemented Interfaces:
OperatorPlan

public class PatternPlan
extends BaseOperatorPlan

Used for finding/representing a pattern in the plan This class represents the pattern Finds only a single matching pattern This is finding a sub-graph( represented by pattern) in the graph(plan)


Field Summary
 
Fields inherited from class org.apache.pig.newplan.BaseOperatorPlan
fromEdges, log, ops, softFromEdges, softToEdges, toEdges
 
Constructor Summary
PatternPlan()
           
 
Method Summary
static PatternPlan create(Class<?>[] classList)
          This function can be used to create a new PatternPlan if the pattern nodes have at most one parent/child, and they are connected to each other.
 boolean match(OperatorPlan<? extends Operator<?>> inpPlan)
          Return true if the given plan has nodes that match the pattern represented by this class If a match is found, the PatterNodes in the plan will return non null node for getMatch().
 
Methods inherited from class org.apache.pig.newplan.BaseOperatorPlan
add, connect, connect, createSoftLink, disconnect, explain, getOperators, getPredecessors, getSinks, getSoftLinkPredecessors, getSoftLinkSuccessors, getSources, getSuccessors, insertBetween, isConnected, isEqual, isEqual, pathExists, remove, removeAndReconnect, removeSoftLink, replace, size, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PatternPlan

public PatternPlan()
Method Detail

match

public boolean match(OperatorPlan<? extends Operator<?>> inpPlan)
Return true if the given plan has nodes that match the pattern represented by this class If a match is found, the PatterNodes in the plan will return non null node for getMatch().

Parameters:
inpPlan - - input plan to match
Returns:
true if match is found

create

public static PatternPlan create(Class<?>[] classList)
This function can be used to create a new PatternPlan if the pattern nodes have at most one parent/child, and they are connected to each other. The PatternNode corresponding to the i'th class in classList will be the predecessor of the one corresponding to i+1'th class.

Parameters:
classList -
Returns:
new PatterPlan corresponding to classList


Copyright © 2007-2012 The Apache Software Foundation