Class PigRelOpInnerVisitor


  • class PigRelOpInnerVisitor
    extends PigRelOpVisitor
    Visits Pig logical operators of Pig inner logical plans (in LOForEach) and converts them into corresponding relational algebra plans.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Deque<CorrelationId> corStack  
      private RelNode inputRel  
      • Fields inherited from class org.apache.pig.newplan.PlanVisitor

        currentWalker, DEFAULT_SCOPE, plan
    • Constructor Summary

      Constructors 
      Constructor Description
      PigRelOpInnerVisitor​(org.apache.pig.newplan.OperatorPlan plan, org.apache.pig.newplan.PlanWalker walker, PigRelBuilder builder)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void doGenerateWithoutMultisetFlatten​(org.apache.pig.newplan.logical.relational.LOGenerate gen, java.util.List<java.lang.Integer> multisetFlattens, java.util.List<java.lang.String> flattenOutputAliases)
      Projects all expressions in LOGenerate output expressions, but not consider flatten multiset columns yet.
      private void makeCorrelates()
      Rejoins all multiset (bag) columns that have been processed in the nested foreach block.
      boolean preVisit​(org.apache.pig.newplan.logical.relational.LogicalRelationalOperator root)
      Called before a node.
      void visit​(org.apache.pig.newplan.logical.relational.LOGenerate gen)  
      void visit​(org.apache.pig.newplan.logical.relational.LOInnerLoad load)  
      • Methods inherited from class org.apache.pig.newplan.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

      • inputRel

        private final RelNode inputRel
      • corStack

        private final java.util.Deque<CorrelationId> corStack
    • Constructor Detail

      • PigRelOpInnerVisitor

        PigRelOpInnerVisitor​(org.apache.pig.newplan.OperatorPlan plan,
                             org.apache.pig.newplan.PlanWalker walker,
                             PigRelBuilder builder)
                      throws org.apache.pig.impl.logicalLayer.FrontendException
        Parameters:
        plan - Pig inner logical plan
        walker - The walker over Pig logical plan
        builder - Relational algebra builder
        Throws:
        org.apache.pig.impl.logicalLayer.FrontendException - Exception during processing Pig operators
    • Method Detail

      • visit

        public void visit​(org.apache.pig.newplan.logical.relational.LOGenerate gen)
                   throws org.apache.pig.impl.logicalLayer.FrontendException
        Overrides:
        visit in class PigRelOpVisitor
        Throws:
        org.apache.pig.impl.logicalLayer.FrontendException
      • makeCorrelates

        private void makeCorrelates()
                             throws org.apache.pig.impl.logicalLayer.FrontendException
        Rejoins all multiset (bag) columns that have been processed in the nested foreach block.
        Throws:
        org.apache.pig.impl.logicalLayer.FrontendException - Exception during processing Pig operators
      • doGenerateWithoutMultisetFlatten

        private void doGenerateWithoutMultisetFlatten​(org.apache.pig.newplan.logical.relational.LOGenerate gen,
                                                      java.util.List<java.lang.Integer> multisetFlattens,
                                                      java.util.List<java.lang.String> flattenOutputAliases)
                                               throws org.apache.pig.impl.logicalLayer.FrontendException
        Projects all expressions in LOGenerate output expressions, but not consider flatten multiset columns yet.
        Parameters:
        gen - Pig logical generate operator
        Throws:
        org.apache.pig.impl.logicalLayer.FrontendException - Exception during processing Pig operators
      • visit

        public void visit​(org.apache.pig.newplan.logical.relational.LOInnerLoad load)
                   throws org.apache.pig.impl.logicalLayer.FrontendException
        Overrides:
        visit in class PigRelOpVisitor
        Throws:
        org.apache.pig.impl.logicalLayer.FrontendException
      • preVisit

        public boolean preVisit​(org.apache.pig.newplan.logical.relational.LogicalRelationalOperator root)
        Description copied from class: PigRelOpWalker.PlanPreVisitor
        Called before a node.
        Overrides:
        preVisit in class PigRelOpVisitor
        Parameters:
        root - Pig logical operator to check
        Returns:
        Returns whether the node has been visited before