[ 
https://issues.apache.org/jira/browse/PIG-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591650#action_12591650
 ] 

Pi Song commented on PIG-161:
-----------------------------

incr5.patch comments:-

1) MRCompiler. From the logic here I think what you really need might be just 
some if-cases instead of a visitor.
{code}
+        //Now we have the inputs compiled. Do something
+        //with the input oper op.
+        op.visit(this);
+        compiledInputs = prevCompInp;
{code}
The depth-first search logic in compile() also already does iterating through 
the plan. Possibly at the beginning you've tried to do it pure-visitor based 
right?

2) MapReduceOper - These methods seem to be the same. Are they gonna be 
different in the near future?
{code}
+    public void setMapDone(boolean mapDone) throws IOException{
+        this.mapDone = mapDone;
+        if (mapDone && mapPlan.getLeaves().size()>1) {
+            mapPlan.addAsLeaf(GenPhyOp.topUnionOp());
+        }
+    }
+    
+    public void setMapDoneSingle(boolean mapDone) throws IOException{
+        this.mapDone = mapDone;
+        if (mapDone && mapPlan.getLeaves().size()>1) {
+            mapPlan.addAsLeaf(GenPhyOp.topUnionOp());
+        }
+    }
+    
+    public void setMapDoneMultiple(boolean mapDone) throws IOException{
+        this.mapDone = mapDone;
+        if (mapDone && mapPlan.getLeaves().size()>0) {
+            mapPlan.addAsLeaf(GenPhyOp.topUnionOp());
+        }
+    }
{code}

> Rework physical plan
> --------------------
>
>                 Key: PIG-161
>                 URL: https://issues.apache.org/jira/browse/PIG-161
>             Project: Pig
>          Issue Type: Sub-task
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>         Attachments: arithmeticOperators.patch, incr2.patch, incr3.patch, 
> incr4.patch, incr5.patch, MRCompilerTests_PlansAndOutputs.txt, 
> Phy_AbsClass.patch, physicalOps.patch, podistinct.patch, pogenerate.patch, 
> pogenerate.patch, pogenerate.patch, posort.patch
>
>
> This bug tracks work to rework all of the physical operators as described in 
> http://wiki.apache.org/pig/PigTypesFunctionalSpec

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to