org.apache.pig.experimental.logical.relational
Class LogToPhyTranslationVisitor

java.lang.Object
  extended by org.apache.pig.experimental.plan.PlanVisitor
      extended by org.apache.pig.experimental.logical.relational.LogicalPlanVisitor
          extended by org.apache.pig.experimental.logical.relational.LogToPhyTranslationVisitor

public class LogToPhyTranslationVisitor
extends LogicalPlanVisitor


Field Summary
protected  PhysicalPlan currentPlan
           
protected  Stack<PhysicalPlan> currentPlans
           
protected  Map<Operator,PhysicalOperator> logToPhyMap
           
protected  NodeIdGenerator nodeGen
           
protected  PigContext pc
           
 
Fields inherited from class org.apache.pig.experimental.plan.PlanVisitor
currentWalker, DEFAULT_SCOPE, plan
 
Constructor Summary
LogToPhyTranslationVisitor(OperatorPlan plan)
           
 
Method Summary
 PhysicalPlan getPhysicalPlan()
           
 void setPigContext(PigContext pc)
           
static void updateWithEmptyBagCheck(PhysicalPlan fePlan, Operator joinInput)
          updates plan with check for empty bag and if bag is empty to flatten a bag with as many null's as dictated by the schema
 void visitLOCogroup(LOCogroup cg)
           
 void visitLOFilter(LOFilter filter)
           
 void visitLOForEach(LOForEach foreach)
           
 void visitLOInnerLoad(LOInnerLoad load)
           
 void visitLOJoin(LOJoin loj)
           
 void visitLOLoad(LOLoad loLoad)
           
 void visitLOSplit(LOSplit loSplit)
           
 void visitLOSplitOutput(LOSplitOutput loSplitOutput)
           
 void visitLOStore(LOStore loStore)
           
 void visitLOUnion(LOUnion loUnion)
           
 
Methods inherited from class org.apache.pig.experimental.logical.relational.LogicalPlanVisitor
visitLOGenerate
 
Methods inherited from class org.apache.pig.experimental.plan.PlanVisitor
getPlan, popWalker, pushWalker, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logToPhyMap

protected Map<Operator,PhysicalOperator> logToPhyMap

currentPlans

protected Stack<PhysicalPlan> currentPlans

currentPlan

protected PhysicalPlan currentPlan

nodeGen

protected NodeIdGenerator nodeGen

pc

protected PigContext pc
Constructor Detail

LogToPhyTranslationVisitor

public LogToPhyTranslationVisitor(OperatorPlan plan)
Method Detail

setPigContext

public void setPigContext(PigContext pc)

getPhysicalPlan

public PhysicalPlan getPhysicalPlan()

visitLOLoad

public void visitLOLoad(LOLoad loLoad)
                 throws IOException
Overrides:
visitLOLoad in class LogicalPlanVisitor
Throws:
IOException

visitLOFilter

public void visitLOFilter(LOFilter filter)
                   throws IOException
Overrides:
visitLOFilter in class LogicalPlanVisitor
Throws:
IOException

visitLOInnerLoad

public void visitLOInnerLoad(LOInnerLoad load)
                      throws IOException
Overrides:
visitLOInnerLoad in class LogicalPlanVisitor
Throws:
IOException

visitLOForEach

public void visitLOForEach(LOForEach foreach)
                    throws IOException
Overrides:
visitLOForEach in class LogicalPlanVisitor
Throws:
IOException

visitLOStore

public void visitLOStore(LOStore loStore)
                  throws IOException
Overrides:
visitLOStore in class LogicalPlanVisitor
Throws:
IOException

visitLOCogroup

public void visitLOCogroup(LOCogroup cg)
                    throws IOException
Overrides:
visitLOCogroup in class LogicalPlanVisitor
Throws:
IOException

visitLOJoin

public void visitLOJoin(LOJoin loj)
                 throws IOException
Overrides:
visitLOJoin in class LogicalPlanVisitor
Throws:
IOException

visitLOUnion

public void visitLOUnion(LOUnion loUnion)
                  throws IOException
Overrides:
visitLOUnion in class LogicalPlanVisitor
Throws:
IOException

visitLOSplit

public void visitLOSplit(LOSplit loSplit)
                  throws IOException
Overrides:
visitLOSplit in class LogicalPlanVisitor
Throws:
IOException

visitLOSplitOutput

public void visitLOSplitOutput(LOSplitOutput loSplitOutput)
                        throws IOException
Overrides:
visitLOSplitOutput in class LogicalPlanVisitor
Throws:
IOException

updateWithEmptyBagCheck

public static void updateWithEmptyBagCheck(PhysicalPlan fePlan,
                                           Operator joinInput)
                                    throws FrontendException
updates plan with check for empty bag and if bag is empty to flatten a bag with as many null's as dictated by the schema

Parameters:
fePlan - the plan to update
joinInput - the relation for which the corresponding bag is being checked
Throws:
FrontendException


Copyright © ${year} The Apache Software Foundation