Review Board 1.7.22


PIG-2167 - Naive implementation of CUBE operator

Review Request #4670 - Created April 6, 2012 and updated

Prasanth_J
PIG-2167
Reviewers
pig
dvryaboy
pig
This is a review board for https://issues.apache.org/jira/browse/PIG-2167
Unit tests: All passed

Pre-commit tests: All passed
ant clean test-commit

Diff revision 1

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

1 2 3
1 2 3

  1. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/optimizer/AllExpressionVisitor.java: Loading...
  2. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/optimizer/SchemaResetter.java: Loading...
  3. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/relational/LOCube.java: Loading...
  4. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/relational/LogicalRelationalNodesVisitor.java: Loading...
  5. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/visitor/ProjectStarExpander.java: Loading...
  6. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/AliasMasker.g: Loading...
  7. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/AstPrinter.g: Loading...
  8. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/AstValidator.g: Loading...
  9. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java: Loading...
  10. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/LogicalPlanGenerator.g: Loading...
  11. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/QueryLexer.g: Loading...
  12. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/QueryParser.g: Loading...
  13. http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestLexer.pig: Loading...
  14. http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestLogicalPlanGenerator.java: Loading...
  15. http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestParser.pig: Loading...
  16. http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestQueryLexer.java: Loading...
  17. http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestQueryParser.java: Loading...
  18. http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestCubeOperator.java: Loading...
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/optimizer/AllExpressionVisitor.java
Revision 1303571 New Change
[20] 24 lines
[+20]
25
import org.apache.pig.newplan.OperatorPlan;
25
import org.apache.pig.newplan.OperatorPlan;
26
import org.apache.pig.newplan.PlanWalker;
26
import org.apache.pig.newplan.PlanWalker;
27
import org.apache.pig.newplan.logical.expression.LogicalExpressionPlan;
27
import org.apache.pig.newplan.logical.expression.LogicalExpressionPlan;
28
import org.apache.pig.newplan.logical.expression.LogicalExpressionVisitor;
28
import org.apache.pig.newplan.logical.expression.LogicalExpressionVisitor;
29
import org.apache.pig.newplan.logical.relational.LOCogroup;
29
import org.apache.pig.newplan.logical.relational.LOCogroup;

    
   
30
import org.apache.pig.newplan.logical.relational.LOCube;
30
import org.apache.pig.newplan.logical.relational.LOFilter;
31
import org.apache.pig.newplan.logical.relational.LOFilter;
31
import org.apache.pig.newplan.logical.relational.LOForEach;
32
import org.apache.pig.newplan.logical.relational.LOForEach;
32
import org.apache.pig.newplan.logical.relational.LOGenerate;
33
import org.apache.pig.newplan.logical.relational.LOGenerate;
33
import org.apache.pig.newplan.logical.relational.LOInnerLoad;
34
import org.apache.pig.newplan.logical.relational.LOInnerLoad;
34
import org.apache.pig.newplan.logical.relational.LOJoin;
35
import org.apache.pig.newplan.logical.relational.LOJoin;
[+20] [20] 54 lines
[+20] [+] public void visit(LOJoin join) throws FrontendException {
89
            v.visit();
90
            v.visit();
90
        }
91
        }
91
    }
92
    }
92
    
93
    
93
    @Override
94
    @Override

    
   
95
    public void visit(LOCube cu) throws FrontendException {

    
   
96
        currentOp = cu;

    
   
97
        MultiMap<Integer, LogicalExpressionPlan> expressionPlans = cu.getExpressionPlans();

    
   
98
        for( Integer key : expressionPlans.keySet() ) {

    
   
99
            Collection<LogicalExpressionPlan> exprPlans = expressionPlans.get(key);

    
   
100
            for( LogicalExpressionPlan plan : exprPlans ) {

    
   
101
                LogicalExpressionVisitor v = getVisitor(plan);

    
   
102
                v.visit();

    
   
103
            }

    
   
104
        }

    
   
105
    }

    
   
106
    

    
   
107
    @Override
94
    public void visit(LOCogroup cg) throws FrontendException {
108
    public void visit(LOCogroup cg) throws FrontendException {
95
        currentOp = cg;
109
        currentOp = cg;
96
        MultiMap<Integer, LogicalExpressionPlan> expressionPlans = cg.getExpressionPlans();
110
        MultiMap<Integer, LogicalExpressionPlan> expressionPlans = cg.getExpressionPlans();
97
        for( Integer key : expressionPlans.keySet() ) {
111
        for( Integer key : expressionPlans.keySet() ) {
98
            Collection<LogicalExpressionPlan> exprPlans = expressionPlans.get(key);
112
            Collection<LogicalExpressionPlan> exprPlans = expressionPlans.get(key);
[+20] [20] 57 lines
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/optimizer/SchemaResetter.java
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/relational/LOCube.java
New File
 
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/relational/LogicalRelationalNodesVisitor.java
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/visitor/ProjectStarExpander.java
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/AliasMasker.g
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/AstPrinter.g
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/AstValidator.g
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/LogicalPlanGenerator.g
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/QueryLexer.g
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/QueryParser.g
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestLexer.pig
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestLogicalPlanGenerator.java
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestParser.pig
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestQueryLexer.java
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestQueryParser.java
Revision 1303571 New Change
 
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestCubeOperator.java
New File
 
  1. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/optimizer/AllExpressionVisitor.java: Loading...
  2. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/optimizer/SchemaResetter.java: Loading...
  3. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/relational/LOCube.java: Loading...
  4. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/relational/LogicalRelationalNodesVisitor.java: Loading...
  5. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/visitor/ProjectStarExpander.java: Loading...
  6. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/AliasMasker.g: Loading...
  7. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/AstPrinter.g: Loading...
  8. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/AstValidator.g: Loading...
  9. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java: Loading...
  10. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/LogicalPlanGenerator.g: Loading...
  11. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/QueryLexer.g: Loading...
  12. http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/QueryParser.g: Loading...
  13. http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestLexer.pig: Loading...
  14. http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestLogicalPlanGenerator.java: Loading...
  15. http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestParser.pig: Loading...
  16. http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestQueryLexer.java: Loading...
  17. http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/parser/TestQueryParser.java: Loading...
  18. http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestCubeOperator.java: Loading...