You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ga...@apache.org on 2008/07/18 17:54:18 UTC
svn commit: r677947 - in /incubator/pig/branches/types:
src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt
test/org/apache/pig/test/TestBuiltin.java
Author: gates
Date: Fri Jul 18 08:54:17 2008
New Revision: 677947
URL: http://svn.apache.org/viewvc?rev=677947&view=rev
Log:
PIG-308 Fixed join rewrites in the parser, with Santhosh's help. Also uncommented two tests in TestBuiltin that should have been uncommented a while ago.
Modified:
incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt
incubator/pig/branches/types/test/org/apache/pig/test/TestBuiltin.java
Modified: incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt?rev=677947&r1=677946&r2=677947&view=diff
==============================================================================
--- incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt (original)
+++ incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt Fri Jul 18 08:54:17 2008
@@ -227,12 +227,16 @@
*/
- LogicalPlan foreachPlan = new LogicalPlan();
+
+ //Construct the cogroup operator and add it to the logical plan
+ LogicalOperator cogroup = parseCogroup(gis, lp);
+ lp.add(cogroup);
+ log.debug("Added operator " + cogroup.getClass().getName() + " to the logical plan");
+
for (int i = 0; i < n; i++) {
LogicalPlan projectPlan = new LogicalPlan();
- LogicalOperator projectInput = gis.get(i).op;
+ LogicalOperator projectInput = cogroup;
ExpressionOperator column = new LOProject(projectPlan, new OperatorKey(scope, getNextId()), projectInput, i+1);
- ((LOProject)column).setStar(true);
flattenList.add(true);
flattenedColumns.add(column);
(gis.get(i)).isInner = true;
@@ -246,26 +250,11 @@
}
- //Construct the cogroup operator and add it to the logical plan
-
- LogicalOperator cogroup = parseCogroup(gis, lp);
- lp.add(cogroup);
- log.debug("Added operator " + cogroup.getClass().getName() + " to the logical plan");
-
-
- //Construct the generate operator from the list of projection plans
- //Add the generate operator to the foreach logical plan
- /*
- LogicalOperator generate = new LOGenerate(lp, new OperatorKey(scope, getNextId()), generatePlans, flattenList);
- foreachPlan.add(generate);
- log.debug("Added operator " + generate.getClass().getName() + " to the logical plan " + lp);
- */
/*
* Construct the foreach operator from the foreach logical plan
* Add the foreach operator to the top level logical plan
*/
-
LogicalOperator foreach = new LOForEach(lp, new OperatorKey(scope, getNextId()), generatePlans, flattenList);
lp.add(foreach);
log.debug("Added operator " + foreach.getClass().getName() + " to the logical plan");
Modified: incubator/pig/branches/types/test/org/apache/pig/test/TestBuiltin.java
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/TestBuiltin.java?rev=677947&r1=677946&r2=677947&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/TestBuiltin.java (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/TestBuiltin.java Fri Jul 18 08:54:17 2008
@@ -873,8 +873,6 @@
assertTrue(f1.equals(f2));
}
- // TODO FIX
- /*
@Test
public void testShellFuncSingle() throws Throwable {
//ShellBagEvalFunc func = new ShellBagEvalFunc("tr o 0");
@@ -935,7 +933,6 @@
assertFalse(iter.hasNext());
tempFile.delete();
}
- */
private static String getInputType(String typeFor) {
return allowedInput.get(typeFor);