You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ya...@apache.org on 2010/12/13 20:11:04 UTC
svn commit: r1045314 [5/5] - in /pig/trunk: ./ src/org/apache/pig/
src/org/apache/pig/backend/hadoop/executionengine/
src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/ src...
Modified: pig/trunk/src/org/apache/pig/tools/pigscript/parser/PigScriptParser.jj
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/tools/pigscript/parser/PigScriptParser.jj?rev=1045314&r1=1045313&r2=1045314&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/tools/pigscript/parser/PigScriptParser.jj (original)
+++ pig/trunk/src/org/apache/pig/tools/pigscript/parser/PigScriptParser.jj Mon Dec 13 19:11:00 2010
@@ -108,7 +108,7 @@ public abstract class PigScriptParser
abstract protected void processRemove(String path, String opt) throws IOException;
- abstract protected void processIllustrate(String alias) throws IOException;
+ abstract protected void processIllustrate(String alias, String script, String target, List<String> params, List<String> files) throws IOException, ParseException;
abstract protected void processScript(String script, boolean batch, List<String> params, List<String> files) throws IOException, ParseException;
@@ -454,9 +454,7 @@ void parse() throws IOException:
t1 = <IDENTIFIER>
{processDump(t1.image);}
|
- <ILLUSTRATE>
- t1 = <IDENTIFIER>
- {processIllustrate(t1.image);}
+ Illustrate()
|
<DESCRIBE>
(
@@ -552,6 +550,46 @@ void parse() throws IOException:
)
}
+void Illustrate() throws IOException:
+{
+ Token t;
+ String alias = null;
+ String script = null;
+ String target=null;
+ ArrayList<String> params;
+ ArrayList<String> files;
+
+}
+{
+ <ILLUSTRATE>
+ {
+ params = new ArrayList<String>();
+ files = new ArrayList<String>();
+ }
+ (
+ <OUT>
+ t = GetPath()
+ {target = t.image;}
+ |
+ <SCRIPT>
+ t = GetPath()
+ {script = t.image;}
+ |
+ <PARAM>
+ t = GetPath()
+ {params.add(t.image);}
+ |
+ <PARAM_FILE>
+ t = GetPath()
+ {files.add(t.image);}
+ )*
+ (
+ t = <IDENTIFIER>
+ {alias = t.image;}
+ )?
+ {processIllustrate(alias, script, target, params, files);}
+}
+
void Explain() throws IOException:
{
Token t;
Modified: pig/trunk/test/org/apache/pig/test/TestExampleGenerator.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestExampleGenerator.java?rev=1045314&r1=1045313&r2=1045314&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestExampleGenerator.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestExampleGenerator.java Mon Dec 13 19:11:00 2010
@@ -98,6 +98,20 @@ public class TestExampleGenerator extend
}
@Test
+ public void testLoad() throws Exception {
+
+ PigServer pigserver = new PigServer(pigContext);
+
+ String query = "A = load " + A
+ + " using PigStorage() as (x : int, y : int);\n";
+ pigserver.registerQuery(query);
+ Map<LogicalOperator, DataBag> derivedData = pigserver.getExamples("A");
+
+ assertTrue(derivedData != null);
+
+ }
+
+ @Test
public void testFilter() throws Exception {
PigServer pigserver = new PigServer(pigContext);
@@ -114,6 +128,43 @@ public class TestExampleGenerator extend
}
@Test
+ public void testFilter2() throws Exception {
+
+ PigServer pigserver = new PigServer(pigContext);
+
+ String query = "A = load " + A
+ + " using PigStorage() as (x : int, y : int);\n";
+ pigserver.registerQuery(query);
+ query = "B = filter A by x > 5 AND y < 6;";
+ pigserver.registerQuery(query);
+ Map<LogicalOperator, DataBag> derivedData = pigserver.getExamples("B");
+
+ assertTrue(derivedData != null);
+ }
+
+ @Test
+ public void testFilter3() throws Exception {
+
+ PigServer pigserver = new PigServer(pigContext);
+
+ String query = "A = load " + A
+ + " using PigStorage() as (x : int, y : int);\n";
+ pigserver.registerQuery(query);
+ query = "B = filter A by x > 10;";
+ pigserver.registerQuery(query);
+ query = "C = FOREACH B GENERATE (x+1) as x1, (y+1) as y1;";
+ pigserver.registerQuery(query);
+ query = "D = FOREACH C GENERATE (x1+1) as x2, (y1+1) as y2;";
+ pigserver.registerQuery(query);
+ query = "E = DISTINCT D;";
+ pigserver.registerQuery(query);
+ Map<LogicalOperator, DataBag> derivedData = pigserver.getExamples("E");
+
+ assertTrue(derivedData != null);
+
+ }
+
+ @Test
public void testForeach() throws ExecException, IOException {
PigServer pigServer = new PigServer(pigContext);
@@ -140,6 +191,19 @@ public class TestExampleGenerator extend
}
@Test
+ public void testJoin2() throws IOException, ExecException {
+ PigServer pigServer = new PigServer(pigContext);
+ pigServer.registerQuery("A1 = load " + A + " as (x, y);");
+ pigServer.registerQuery("B1 = load " + A + " as (x, y);");
+
+ pigServer.registerQuery("E = join A1 by x, B1 by x;");
+
+ Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("E");
+
+ assertTrue(derivedData != null);
+ }
+
+ @Test
public void testCogroupMultipleCols() throws Exception {
PigServer pigServer = new PigServer(pigContext);
@@ -174,6 +238,68 @@ public class TestExampleGenerator extend
}
@Test
+ public void testGroup2() throws Exception {
+ PigServer pigServer = new PigServer(pigContext);
+ pigServer.registerQuery("A = load " + A.toString() + " as (x:int, y:int);");
+ pigServer.registerQuery("B = group A by x;");
+ pigServer.registerQuery("C = foreach B generate group, COUNT(A);};");
+ Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("C");
+
+ assertTrue(derivedData != null);
+
+ }
+
+ @Test
+ public void testGroup3() throws Exception {
+ PigServer pigServer = new PigServer(pigContext);
+ pigServer.registerQuery("A = load " + A.toString() + " as (x:int, y:int);");
+ pigServer.registerQuery("B = FILTER A by x > 3;");
+ pigServer.registerQuery("C = group B by y;");
+ pigServer.registerQuery("D = foreach C generate group, COUNT(B);};");
+ Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("D");
+
+ assertTrue(derivedData != null);
+
+ }
+
+ @Test
+ public void testFilterUnion() throws Exception {
+ PigServer pigServer = new PigServer(pigContext);
+ pigServer.registerQuery("A = load " + A.toString() + " as (x:int, y:int);");
+ pigServer.registerQuery("B = FILTER A by x > 3;");
+ pigServer.registerQuery("C = FILTER A by x < 3;");
+ pigServer.registerQuery("D = UNION B, C;");
+ Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("D");
+
+ assertTrue(derivedData != null);
+
+ }
+
+ @Test
+ public void testForEachNestedBlock() throws Exception {
+ PigServer pigServer = new PigServer(pigContext);
+ pigServer.registerQuery("A = load " + A.toString() + " as (x:int, y:int);");
+ pigServer.registerQuery("B = group A by x;");
+ pigServer.registerQuery("C = foreach B { FA = filter A by y == 6; generate group, COUNT(FA);};");
+ Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("C");
+
+ assertTrue(derivedData != null);
+
+ }
+
+ @Test
+ public void testForEachNestedBlock2() throws Exception {
+ PigServer pigServer = new PigServer(pigContext);
+ pigServer.registerQuery("A = load " + A.toString() + " as (x:int, y:int);");
+ pigServer.registerQuery("B = group A by x;");
+ pigServer.registerQuery("C = foreach B { FA = filter A by y == 6; DA = DISTINCT FA; generate group, COUNT(DA);};");
+ Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("C");
+
+ assertTrue(derivedData != null);
+
+ }
+
+ @Test
public void testUnion() throws Exception {
PigServer pigServer = new PigServer(pigContext);
pigServer.registerQuery("A = load " + A.toString() + " as (x, y);");
@@ -184,4 +310,34 @@ public class TestExampleGenerator extend
assertTrue(derivedData != null);
}
+ @Test
+ public void testDistinct() throws Exception {
+ PigServer pigServer = new PigServer(pigContext);
+ pigServer.registerQuery("A = load " + A.toString() + " as (x, y);");
+ pigServer.registerQuery("B = DISTINCT A;");
+ Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("B");
+
+ assertTrue(derivedData != null);
+ }
+
+ @Test
+ public void testCross() throws Exception {
+ PigServer pigServer = new PigServer(pigContext);
+ pigServer.registerQuery("A = load " + A.toString() + " as (x, y);");
+ pigServer.registerQuery("B = load " + B.toString() + " as (x, y);");
+ pigServer.registerQuery("C = CROSS A, B;");
+ Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("C");
+
+ assertTrue(derivedData != null);
+ }
+
+ @Test
+ public void testLimit() throws Exception {
+ PigServer pigServer = new PigServer(pigContext);
+ pigServer.registerQuery("A = load " + A.toString() + " as (x, y);");
+ pigServer.registerQuery("B = limit A 5;");
+ Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("B");
+
+ assertTrue(derivedData != null);
+ }
}
Modified: pig/trunk/test/org/apache/pig/test/TestGrunt.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestGrunt.java?rev=1045314&r1=1045313&r2=1045314&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestGrunt.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestGrunt.java Mon Dec 13 19:11:00 2010
@@ -24,8 +24,6 @@ import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import junit.framework.TestCase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.log4j.Appender;
import org.apache.log4j.FileAppender;
import org.apache.log4j.PatternLayout;
@@ -34,9 +32,7 @@ import org.apache.pig.PigException;
import org.apache.pig.PigServer;
import org.apache.pig.backend.executionengine.ExecException;
import org.apache.pig.impl.PigContext;
-import org.apache.pig.test.Util.ProcessReturnInfo;
import org.apache.pig.tools.grunt.Grunt;
-import org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor;
import org.apache.pig.tools.pigscript.parser.ParseException;
import org.apache.pig.impl.util.LogUtils;
@@ -45,17 +41,12 @@ import java.io.File;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.BufferedReader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.util.ArrayList;
@RunWith(JUnit4.class)
public class TestGrunt extends TestCase {
static MiniCluster cluster = MiniCluster.buildCluster();
private String basedir = "test/org/apache/pig/test/data";
- private final Log log = LogFactory.getLog(getClass());
-
@BeforeClass
public static void oneTimeSetup() throws Exception {
cluster.setProperty("opt.multiquery","true");
@@ -468,6 +459,105 @@ public class TestGrunt extends TestCase
grunt.exec();
}
+ @Test
+ public void testIllustrateScript() throws Throwable {
+ PigServer server = new PigServer(ExecType.LOCAL, cluster.getProperties());
+ PigContext context = server.getPigContext();
+
+ String strCmd = "illustrate -script "
+ + basedir + "/illustrate.pig;";
+
+ ByteArrayInputStream cmd = new ByteArrayInputStream(strCmd.getBytes());
+ InputStreamReader reader = new InputStreamReader(cmd);
+
+ Grunt grunt = new Grunt(new BufferedReader(reader), context);
+
+ grunt.exec();
+ }
+
+ @Test
+ public void testIllustrateScript2() throws Throwable {
+ PigServer server = new PigServer(ExecType.LOCAL, cluster.getProperties());
+ PigContext context = server.getPigContext();
+
+ String strCmd = "illustrate -script "
+ + basedir + "/illustrate2.pig;";
+
+ ByteArrayInputStream cmd = new ByteArrayInputStream(strCmd.getBytes());
+ InputStreamReader reader = new InputStreamReader(cmd);
+
+ Grunt grunt = new Grunt(new BufferedReader(reader), context);
+
+ grunt.exec();
+ }
+
+ @Test
+ public void testIllustrateScript3() throws Throwable {
+ PigServer server = new PigServer(ExecType.LOCAL, cluster.getProperties());
+ PigContext context = server.getPigContext();
+
+ String strCmd = "illustrate -script "
+ + basedir + "/illustrate3.pig;";
+
+ ByteArrayInputStream cmd = new ByteArrayInputStream(strCmd.getBytes());
+ InputStreamReader reader = new InputStreamReader(cmd);
+
+ Grunt grunt = new Grunt(new BufferedReader(reader), context);
+
+ grunt.exec();
+ }
+
+ @Test
+ public void testIllustrateScript4() throws Throwable {
+ // empty line/field test
+ PigServer server = new PigServer(ExecType.LOCAL, cluster.getProperties());
+ PigContext context = server.getPigContext();
+
+ String strCmd = "illustrate -script "
+ + basedir + "/illustrate4.pig;";
+
+ ByteArrayInputStream cmd = new ByteArrayInputStream(strCmd.getBytes());
+ InputStreamReader reader = new InputStreamReader(cmd);
+
+ Grunt grunt = new Grunt(new BufferedReader(reader), context);
+
+ grunt.exec();
+ }
+
+ @Test
+ public void testIllustrateScript5() throws Throwable {
+ // empty line/field test
+ PigServer server = new PigServer(ExecType.LOCAL, cluster.getProperties());
+ PigContext context = server.getPigContext();
+
+ String strCmd = "illustrate -script "
+ + basedir + "/illustrate5.pig;";
+
+ ByteArrayInputStream cmd = new ByteArrayInputStream(strCmd.getBytes());
+ InputStreamReader reader = new InputStreamReader(cmd);
+
+ Grunt grunt = new Grunt(new BufferedReader(reader), context);
+
+ grunt.exec();
+ }
+
+ @Test
+ public void testIllustrateScript6() throws Throwable {
+ // empty line/field test
+ PigServer server = new PigServer(ExecType.LOCAL, cluster.getProperties());
+ PigContext context = server.getPigContext();
+
+ String strCmd = "illustrate -script "
+ + basedir + "/illustrate6.pig;";
+
+ ByteArrayInputStream cmd = new ByteArrayInputStream(strCmd.getBytes());
+ InputStreamReader reader = new InputStreamReader(cmd);
+
+ Grunt grunt = new Grunt(new BufferedReader(reader), context);
+
+ grunt.exec();
+ }
+
/**
* verify that grunt commands are ignored in explain -script mode
*/
@@ -678,7 +768,7 @@ public class TestGrunt extends TestCase
+"f = foreach e generate group, COUNT($1);"
+"store f into 'bla';"
+"f1 = load 'bla' as (f:chararray);"
- +"g = order f1 by $1;"
+ +"g = order f1 by $0;"
+"illustrate g;";
ByteArrayInputStream cmd = new ByteArrayInputStream(strCmd.getBytes());
Modified: pig/trunk/test/org/apache/pig/test/TestMultiQueryLocal.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestMultiQueryLocal.java?rev=1045314&r1=1045313&r2=1045314&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestMultiQueryLocal.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestMultiQueryLocal.java Mon Dec 13 19:11:00 2010
@@ -427,6 +427,7 @@ public class TestMultiQueryLocal extends
GruntParser parser = new GruntParser(new StringReader(script));
parser.setInteractive(false);
+ myPig.getPigContext().getProperties().setProperty("pig.usenewlogicalplan", "true");
parser.setParams(myPig);
parser.parseStopOnError();
@@ -435,6 +436,7 @@ public class TestMultiQueryLocal extends
Assert.fail();
} finally {
deleteOutputFiles();
+ myPig.getPigContext().getProperties().setProperty("pig.usenewlogicalplan", "false");
}
}
Modified: pig/trunk/test/org/apache/pig/test/TestStore.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestStore.java?rev=1045314&r1=1045313&r2=1045314&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestStore.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestStore.java Mon Dec 13 19:11:00 2010
@@ -67,7 +67,6 @@ import org.apache.pig.impl.logicalLayer.
import org.apache.pig.impl.plan.CompilationMessageCollector;
import org.apache.pig.impl.plan.OperatorKey;
import org.apache.pig.impl.plan.PlanValidationException;
-import org.apache.pig.pen.physicalOperators.POCounter;
import org.apache.pig.test.utils.GenRandomData;
import org.apache.pig.test.utils.LogicalPlanTester;
import org.apache.pig.test.utils.TestHelper;
@@ -87,7 +86,6 @@ public class TestStore extends junit.fra
PigContext pc;
POProject proj;
PigServer pig;
- POCounter pcount;
String inputFileName;
String outputFileName;
@@ -136,10 +134,8 @@ public class TestStore extends junit.fra
PhysicalPlan pp = new PhysicalPlan();
pp.add(proj);
pp.add(st);
- pp.add(pcount);
//pp.connect(proj, st);
- pp.connect(proj, pcount);
- pp.connect(pcount, st);
+ pp.connect(proj, st);
pc.setExecType(ExecType.LOCAL);
return new MapReduceLauncher().launchPig(pp, "TestStore", pc);
}
Added: pig/trunk/test/org/apache/pig/test/data/TestIllustrateInput.txt
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/TestIllustrateInput.txt?rev=1045314&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/TestIllustrateInput.txt (added)
+++ pig/trunk/test/org/apache/pig/test/data/TestIllustrateInput.txt Mon Dec 13 19:11:00 2010
@@ -0,0 +1,7 @@
+4 6
+3 1
+5 7
+1 4
+0 9
+7 8
+10 9
Added: pig/trunk/test/org/apache/pig/test/data/TestIllustrateInput2.txt
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/TestIllustrateInput2.txt?rev=1045314&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/TestIllustrateInput2.txt (added)
+++ pig/trunk/test/org/apache/pig/test/data/TestIllustrateInput2.txt Mon Dec 13 19:11:00 2010
@@ -0,0 +1,7 @@
+14 16
+13 11
+15 17
+11 14
+10 19
+17 18
+20 19
Added: pig/trunk/test/org/apache/pig/test/data/TestIllustrateInput_invalid.txt
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/TestIllustrateInput_invalid.txt?rev=1045314&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/TestIllustrateInput_invalid.txt (added)
+++ pig/trunk/test/org/apache/pig/test/data/TestIllustrateInput_invalid.txt Mon Dec 13 19:11:00 2010
@@ -0,0 +1,2 @@
+,
+1,2
Added: pig/trunk/test/org/apache/pig/test/data/illustrate.pig
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/illustrate.pig?rev=1045314&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/illustrate.pig (added)
+++ pig/trunk/test/org/apache/pig/test/data/illustrate.pig Mon Dec 13 19:11:00 2010
@@ -0,0 +1,6 @@
+A = load 'test/org/apache/pig/test/data/TestIllustrateInput.txt' as (x:int, y:int);
+B = distinct A;
+C = FILTER B by x > 3;
+D = FILTER B by x < 3;
+store C into 'Bigger';
+store D into 'Smaller';
Added: pig/trunk/test/org/apache/pig/test/data/illustrate2.pig
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/illustrate2.pig?rev=1045314&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/illustrate2.pig (added)
+++ pig/trunk/test/org/apache/pig/test/data/illustrate2.pig Mon Dec 13 19:11:00 2010
@@ -0,0 +1,5 @@
+A = load 'test/org/apache/pig/test/data/TestIllustrateInput.txt' as (x:int, y:int);
+B = FILTER A by x > 3;
+C = FILTER A by x < 3;
+store B into 'Bigger';
+store C into 'Smaller';
Added: pig/trunk/test/org/apache/pig/test/data/illustrate3.pig
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/illustrate3.pig?rev=1045314&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/illustrate3.pig (added)
+++ pig/trunk/test/org/apache/pig/test/data/illustrate3.pig Mon Dec 13 19:11:00 2010
@@ -0,0 +1,8 @@
+A = load 'test/org/apache/pig/test/data/TestIllustrateInput.txt' as (x:int);
+A1 = group A by x;
+A2 = foreach A1 generate group, COUNT(A);
+store A2 into 'A';
+B = load 'test/org/apache/pig/test/data/TestIllustrateInput.txt' as (x:double, y:int);
+B1 = group B by x;
+B2 = foreach B1 generate group, COUNT(B);
+store B2 into 'B';
Added: pig/trunk/test/org/apache/pig/test/data/illustrate4.pig
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/illustrate4.pig?rev=1045314&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/illustrate4.pig (added)
+++ pig/trunk/test/org/apache/pig/test/data/illustrate4.pig Mon Dec 13 19:11:00 2010
@@ -0,0 +1,2 @@
+A = load 'test/org/apache/pig/test/data/TestIllustrateInput_invalid.txt' using PigStorage(',') as (x:int, y:int);
+STORE A INTO 'A.txt';
Added: pig/trunk/test/org/apache/pig/test/data/illustrate5.pig
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/illustrate5.pig?rev=1045314&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/illustrate5.pig (added)
+++ pig/trunk/test/org/apache/pig/test/data/illustrate5.pig Mon Dec 13 19:11:00 2010
@@ -0,0 +1,5 @@
+A = load 'test/org/apache/pig/test/data/TestIllustrateInput.txt' as (x:int, y:int);
+B = group A by x;
+C = foreach B generate group, COUNT(A);
+store C into 'out1';
+store A into 'out2';
Added: pig/trunk/test/org/apache/pig/test/data/illustrate6.pig
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/illustrate6.pig?rev=1045314&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/illustrate6.pig (added)
+++ pig/trunk/test/org/apache/pig/test/data/illustrate6.pig Mon Dec 13 19:11:00 2010
@@ -0,0 +1,3 @@
+a = load 'test/org/apache/pig/test/data/TestIllustrateInput.txt' as (x:int, y:int);
+b = group a all;
+c = foreach b generate COUNT(a) as count; d = foreach a generate x / c.count; store d into 'test.out';
Modified: pig/trunk/test/org/apache/pig/test/utils/POCastDummy.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/utils/POCastDummy.java?rev=1045314&r1=1045313&r2=1045314&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/utils/POCastDummy.java (original)
+++ pig/trunk/test/org/apache/pig/test/utils/POCastDummy.java Mon Dec 13 19:11:00 2010
@@ -21,6 +21,7 @@ import java.util.List;
import org.apache.pig.backend.executionengine.ExecException;
import org.apache.pig.data.DataByteArray;
+import org.apache.pig.data.Tuple;
import org.apache.pig.impl.plan.OperatorKey;
import org.apache.pig.backend.hadoop.executionengine.physicalLayer.POStatus;
import org.apache.pig.backend.hadoop.executionengine.physicalLayer.Result;
@@ -103,4 +104,7 @@ public class POCastDummy extends Express
return null;
}
+ public Tuple illustratorMarkup(Object in, Object out, int eqClassIndex) {
+ return null;
+ }
}