|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.impl.plan.optimizer.Transformer<LogicalOperator,LogicalPlan>
org.apache.pig.impl.logicalLayer.optimizer.LogicalTransformer
public abstract class LogicalTransformer
Field Summary |
---|
Fields inherited from class org.apache.pig.impl.plan.optimizer.Transformer |
---|
mPlan |
Constructor Summary | |
---|---|
protected |
LogicalTransformer(LogicalPlan plan)
|
Method Summary | |
---|---|
protected void |
fixUpContainedPlans(LogicalOperator after,
LogicalOperator newNode,
LogicalOperator before,
Map<Integer,Integer> projectionMapping)
Once a node has been inserted, inner plans associated with other nodes may have references to the node that has been replaced or moved. |
protected void |
insertAfter(LogicalOperator after,
LogicalOperator newNode,
Map<Integer,Integer> projectionMapping)
Insert a node in after an existing nodes. |
protected void |
insertBetween(LogicalOperator after,
LogicalOperator newNode,
LogicalOperator before,
Map<Integer,Integer> projectionMapping)
Insert a node in between two existing nodes. |
protected void |
rebuildProjectionMaps()
Rebuild projection maps after a rule has transformed the tree. |
protected void |
rebuildSchemas()
Rebuild schemas after a rule has transformed the tree. |
void |
reset()
Reset any internal state after the transformation. |
Methods inherited from class org.apache.pig.impl.plan.optimizer.Transformer |
---|
check, getPlan, transform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected LogicalTransformer(LogicalPlan plan)
Method Detail |
---|
protected void rebuildSchemas() throws VisitorException, FrontendException
VisitorException,
- FrontendException
VisitorException
FrontendException
protected void rebuildProjectionMaps() throws VisitorException
VisitorException
protected void insertBetween(LogicalOperator after, LogicalOperator newNode, LogicalOperator before, Map<Integer,Integer> projectionMapping) throws VisitorException, FrontendException
after
- Node to insert the new node afternewNode
- New node to insertbefore
- Node to insert this node beforeprojectionMapping
- A map that defines how projections in after
relate to projections in newnode. Keys are the projection offsets in
after, values are the new offsets in newnode. If this field is null,
then it will be assumed that the mapping is 1-1.
VisitorException,
- FrontendException
VisitorException
FrontendException
protected void fixUpContainedPlans(LogicalOperator after, LogicalOperator newNode, LogicalOperator before, Map<Integer,Integer> projectionMapping) throws VisitorException, FrontendException
after
- Node that has had a new node inserted after it.newNode
- node that has been insertedbefore
- Node that has had a new node inserted before it.projectionMapping
- A map that defines how projections in after
relate to projections in newNode. Keys are the projection offsets in
after, values are the new offsets in newNode. If this field is null,
then it will be assumed that the mapping is 1-1.
VisitorException,
- FrontendException
VisitorException
FrontendException
protected void insertAfter(LogicalOperator after, LogicalOperator newNode, Map<Integer,Integer> projectionMapping) throws VisitorException, FrontendException
after
- Node to insert the new node afternewNode
- New node to insertprojectionMapping
- A map that defines how projections in after
relate to projections in newnode. Keys are the projection offsets in
after, values are the new offsets in newnode. If this field is null,
then it will be assumed that the mapping is 1-1.
VisitorException,
- FrontendException
VisitorException
FrontendException
public void reset()
Transformer
reset
in class Transformer<LogicalOperator,LogicalPlan>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |