org.apache.pig.newplan.logical.relational
Class LogicalPlan
java.lang.Object
org.apache.pig.newplan.BaseOperatorPlan
org.apache.pig.newplan.logical.relational.LogicalPlan
- All Implemented Interfaces:
- OperatorPlan
public class LogicalPlan
- extends BaseOperatorPlan
LogicalPlan is the logical view of relational operations Pig will execute
for a given script. Note that it contains only relational operations.
All expressions will be contained in LogicalExpressionPlans inside
each relational operator.
Methods inherited from class org.apache.pig.newplan.BaseOperatorPlan |
add, connect, connect, createSoftLink, disconnect, getOperators, getPredecessors, getSinks, getSoftLinkPredecessors, getSoftLinkSuccessors, getSources, getSuccessors, insertBetween, isConnected, isEqual, pathExists, remove, removeAndReconnect, removeSoftLink, replace, size, toString |
LogicalPlan
public LogicalPlan(LogicalPlan other)
LogicalPlan
public LogicalPlan()
isEqual
public boolean isEqual(OperatorPlan other)
throws FrontendException
- Equality is checked by calling equals on every leaf in the plan. This
assumes that plans are always connected graphs. It is somewhat
inefficient since every leaf will test equality all the way to
every root. But it is only intended for use in testing, so that
should be ok. Checking predecessors (as opposed to successors) was
chosen because splits (which have multiple successors) do not depend
on order of outputs for correctness, whereas joins (with multiple
predecessors) do. That is, reversing the outputs of split in the
graph has no correctness implications, whereas reversing the inputs
of join can. This method of doing equals will detect predecessors
in different orders but not successors in different orders.
It will return false if either plan has non deterministic EvalFunc.
- Specified by:
isEqual
in interface OperatorPlan
- Overrides:
isEqual
in class BaseOperatorPlan
- Parameters:
other
- object to compare
- Returns:
- boolean if both the plans are equivalent
- Throws:
FrontendException
explain
public void explain(PrintStream ps,
String format,
boolean verbose)
throws FrontendException
- Overrides:
explain
in class BaseOperatorPlan
- Throws:
FrontendException
findByAlias
public Operator findByAlias(String alias)
Copyright © 2012 The Apache Software Foundation