You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by pi...@apache.org on 2008/07/12 17:26:37 UTC
svn commit: r676185 [4/4] - in /incubator/pig/branches/types:
src/org/apache/pig/ src/org/apache/pig/backend/hadoop/executionengine/
src/org/apache/pig/backend/local/executionengine/
src/org/apache/pig/builtin/ src/org/apache/pig/data/ src/org/apache/p...
Modified: incubator/pig/branches/types/test/org/apache/pig/test/TestTypeCheckingValidator.java
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/TestTypeCheckingValidator.java?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/TestTypeCheckingValidator.java (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/TestTypeCheckingValidator.java Sat Jul 12 08:26:35 2008
@@ -23,6 +23,7 @@
import junit.framework.TestCase;
+import org.apache.pig.FuncSpec;
import org.apache.pig.impl.logicalLayer.validators.*;
import org.apache.pig.impl.logicalLayer.* ;
import org.apache.pig.impl.logicalLayer.schema.Schema;
@@ -805,11 +806,11 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
LOLoad load2 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -929,11 +930,11 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
LOLoad load2 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -1033,11 +1034,11 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
LOLoad load2 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -1101,7 +1102,7 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -1169,7 +1170,7 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -1239,7 +1240,7 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -1309,7 +1310,7 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -1389,7 +1390,7 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -1487,7 +1488,7 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -1582,7 +1583,7 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -1710,7 +1711,7 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -1814,11 +1815,11 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
LOLoad load2 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -1985,11 +1986,11 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
LOLoad load2 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
@@ -2124,11 +2125,11 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
LOLoad load2 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// schema for input#1
Modified: incubator/pig/branches/types/test/org/apache/pig/test/TestTypeCheckingValidatorNoSchema.java
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/TestTypeCheckingValidatorNoSchema.java?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/TestTypeCheckingValidatorNoSchema.java (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/TestTypeCheckingValidatorNoSchema.java Sat Jul 12 08:26:35 2008
@@ -20,6 +20,7 @@
import junit.framework.TestCase;
import org.junit.Test;
+import org.apache.pig.FuncSpec;
import org.apache.pig.impl.logicalLayer.*;
import org.apache.pig.impl.logicalLayer.validators.TypeCheckingValidator;
import org.apache.pig.impl.logicalLayer.schema.Schema;
@@ -443,7 +444,7 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// set schemas
@@ -509,7 +510,7 @@
LOLoad load1 = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
// set schemas
Modified: incubator/pig/branches/types/test/org/apache/pig/test/TestUnion.java
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/TestUnion.java?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/TestUnion.java (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/TestUnion.java Sat Jul 12 08:26:35 2008
@@ -22,6 +22,7 @@
import java.io.File;
import java.io.IOException;
+import org.apache.pig.FuncSpec;
import org.apache.pig.backend.executionengine.ExecException;
import org.apache.pig.builtin.PigStorage;
import org.apache.pig.data.DataBag;
@@ -83,7 +84,7 @@
POLoad ld1 = GenPhyOp.topLoadOp();
String curDir = System.getProperty("user.dir");
String inpDir = curDir + File.separatorChar + "test/org/apache/pig/test/data/InputFiles/";
- FileSpec fSpec = new FileSpec("file:"+ inpDir +"passwd",PigStorage.class.getName() + "(':')");
+ FileSpec fSpec = new FileSpec("file:"+ inpDir +"passwd", new FuncSpec(PigStorage.class.getName() , new String[]{":"}));
ld1.setLFile(fSpec);
POLoad ld2 = GenPhyOp.topLoadOp();
Modified: incubator/pig/branches/types/test/org/apache/pig/test/Util.java
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/Util.java?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/Util.java (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/Util.java Sat Jul 12 08:26:35 2008
@@ -17,10 +17,16 @@
*/
package org.apache.pig.test;
+import java.util.HashMap;
+import java.util.Map;
+
import org.apache.pig.backend.executionengine.ExecException;
import org.apache.pig.data.*;
public class Util {
+ private static BagFactory mBagFactory = BagFactory.getInstance();
+ private static TupleFactory mTupleFactory = TupleFactory.getInstance();
+
// Helper Functions
// =================
static public Tuple loadFlatTuple(Tuple t, int[] input) throws ExecException {
@@ -66,7 +72,58 @@
return t;
}
+ // this one should handle String, DataByteArray, Long, Integer etc..
+ static public <T> Tuple loadNestTuple(Tuple t, T[] input) throws ExecException {
+ DataBag bag = BagFactory.getInstance().newDefaultBag();
+ for(int i = 0; i < input.length; i++) {
+ Tuple f = TupleFactory.getInstance().newTuple(1);
+ f.set(0, input[i]);
+ bag.add(f);
+ }
+ t.set(0, bag);
+ return t;
+ }
+
+ static public <T>void addToTuple(Tuple t, T[] b)
+ {
+ for(int i = 0; i < b.length; i++)
+ t.append(b[i]);
+ }
+
+
+
+ static public <T>Tuple createTuple(T[] s)
+ {
+ Tuple t = mTupleFactory.newTuple();
+ addToTuple(t, s);
+ return t;
+ }
+
+ static public DataBag createBag(Tuple[] t)
+ {
+ DataBag b = mBagFactory.newDefaultBag();
+ for(int i = 0; i < t.length; i++)b.add(t[i]);
+ return b;
+ }
+
+ static public Map<Object, Object> createMap(String[] contents)
+ {
+ Map<Object, Object> m = new HashMap<Object, Object>();
+ for(int i = 0; i < contents.length; ) {
+ m.put(contents[i], contents[i+1]);
+ i += 2;
+ }
+ return m;
+ }
+ static public DataByteArray[] toDataByteArrays(String[] input) {
+ DataByteArray[] dbas = new DataByteArray[input.length];
+ for (int i = 0; i < input.length; i++) {
+ dbas[i] = (input[i] == null)?null:new DataByteArray(input[i].getBytes());
+ }
+ return dbas;
+ }
+
static public Tuple loadNestTuple(Tuple t, int[][] input) throws ExecException {
for (int i = 0; i < input.length; i++) {
DataBag bag = BagFactory.getInstance().newDefaultBag();
Modified: incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Arithmetic.gld
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Arithmetic.gld?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Arithmetic.gld (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Arithmetic.gld Sat Jul 12 08:26:35 2008
@@ -22,4 +22,4 @@
| |
| Constant(hello) - Test-Plan-Builder-85
|
-|---Load(A:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-74
\ No newline at end of file
+|---Load(A:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-74
\ No newline at end of file
Modified: incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/BinCond.gld
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/BinCond.gld?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/BinCond.gld (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/BinCond.gld Sat Jul 12 08:26:35 2008
@@ -20,4 +20,4 @@
| |
| |---Project[bytearray][3] - Test-Plan-Builder-134
|
-|---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-126
\ No newline at end of file
+|---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-126
\ No newline at end of file
Modified: incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Cogroup.gld
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Cogroup.gld?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Cogroup.gld (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Cogroup.gld Sat Jul 12 08:26:35 2008
@@ -16,7 +16,7 @@
| | |
| | |---Project[bytearray][1] - Test-Plan-Builder-51
| |
- | |---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-42
+ | |---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-42
|
|---Local Rearrange[tuple]{tuple} - Test-Plan-Builder-53
| |
@@ -32,4 +32,4 @@
| |
| |---Project[bytearray][1] - Test-Plan-Builder-58
|
- |---Load(b:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-43
\ No newline at end of file
+ |---Load(b:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-43
\ No newline at end of file
Modified: incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/ComplexForeach.gld
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/ComplexForeach.gld?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/ComplexForeach.gld (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/ComplexForeach.gld Sat Jul 12 08:26:35 2008
@@ -12,4 +12,4 @@
| |
| |---Project[bytearray][0] - Test-Plan-Builder-10
|
-|---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-9
\ No newline at end of file
+|---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-9
\ No newline at end of file
Modified: incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Distinct.gld
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Distinct.gld?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Distinct.gld (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Distinct.gld Sat Jul 12 08:26:35 2008
@@ -1,3 +1,3 @@
PODistinct[bag] - Test-Plan-Builder-26
|
-|---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-25
\ No newline at end of file
+|---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-25
\ No newline at end of file
Modified: incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Generate.gld
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Generate.gld?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Generate.gld (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Generate.gld Sat Jul 12 08:26:35 2008
@@ -34,4 +34,4 @@
| |
| |---Project[bytearray][1] - Test-Plan-Builder-174
|
-|---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-158
\ No newline at end of file
+|---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-158
\ No newline at end of file
Modified: incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/IsNull1.gld
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/IsNull1.gld?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/IsNull1.gld (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/IsNull1.gld Sat Jul 12 08:26:35 2008
@@ -6,7 +6,7 @@
|
|---Split - Test-Plan-Builder-213
|
- |---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-212
+ |---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-212
Filter[tuple] - Test-Plan-Builder-217
| |
@@ -18,4 +18,4 @@
|
|---Split - Test-Plan-Builder-213
|
- |---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-212
\ No newline at end of file
+ |---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-212
\ No newline at end of file
Modified: incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/IsNull2.gld
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/IsNull2.gld?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/IsNull2.gld (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/IsNull2.gld Sat Jul 12 08:26:35 2008
@@ -8,7 +8,7 @@
|
|---Split - Test-Plan-Builder-213
|
- |---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-212
+ |---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-212
Filter[tuple] - Test-Plan-Builder-218
| |
@@ -18,4 +18,4 @@
|
|---Split - Test-Plan-Builder-213
|
- |---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-212
+ |---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-212
Modified: incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Sort.gld
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Sort.gld?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Sort.gld (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Sort.gld Sat Jul 12 08:26:35 2008
@@ -2,4 +2,4 @@
| |
| Project[bytearray][0] - Test-Plan-Builder-21
|
-|---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-20
\ No newline at end of file
+|---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-20
\ No newline at end of file
Modified: incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Split1.gld
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Split1.gld?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Split1.gld (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Split1.gld Sat Jul 12 08:26:35 2008
@@ -8,7 +8,7 @@
|
|---Split - Test-Plan-Builder-195
|
- |---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-194
+ |---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-194
Filter[tuple] - Test-Plan-Builder-200
| |
@@ -20,4 +20,4 @@
|
|---Split - Test-Plan-Builder-195
|
- |---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-194
\ No newline at end of file
+ |---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-194
\ No newline at end of file
Modified: incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Split2.gld
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Split2.gld?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Split2.gld (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Split2.gld Sat Jul 12 08:26:35 2008
@@ -8,7 +8,7 @@
|
|---Split - Test-Plan-Builder-195
|
- |---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-194
+ |---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-194
Filter[tuple] - Test-Plan-Builder-200
| |
@@ -20,4 +20,4 @@
|
|---Split - Test-Plan-Builder-195
|
- |---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-194
\ No newline at end of file
+ |---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-194
\ No newline at end of file
Modified: incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Union.gld
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Union.gld?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Union.gld (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/data/GoldenFiles/Union.gld Sat Jul 12 08:26:35 2008
@@ -1,7 +1,7 @@
Union[bag] - Test-Plan-Builder-184
|
-|---Load(a:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-181
+|---Load(a:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-181
|
-|---Load(b:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-182
+|---Load(b:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-182
|
-|---Load(c:org.apache.pig.builtin.PigStorage()) - Test-Plan-Builder-183
\ No newline at end of file
+|---Load(c:org.apache.pig.builtin.PigStorage) - Test-Plan-Builder-183
\ No newline at end of file
Modified: incubator/pig/branches/types/test/org/apache/pig/test/utils/GenPhyOp.java
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/utils/GenPhyOp.java?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/utils/GenPhyOp.java (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/utils/GenPhyOp.java Sat Jul 12 08:26:35 2008
@@ -23,6 +23,7 @@
import java.util.List;
import java.util.Random;
+import org.apache.pig.FuncSpec;
import org.apache.pig.backend.executionengine.ExecException;
import org.apache.pig.builtin.BinStorage;
import org.apache.pig.data.DataBag;
@@ -355,8 +356,8 @@
/**
* creates the PlansAndFlattens struct for
* 'generate field[0] field[1] ...'.
- *
- * @param field - The columns to be generated
+ *
+ * @param fields - The columns to be generated
* @param sample - The sample tuple that is used to infer
* result type
* @return - The PlansAndFlattens struct which has the exprplan
@@ -403,7 +404,7 @@
* creates the PlansAndFlattens struct for
* 'generate field[0] field[1] ...'.
* with the flatten list as specified
- * @param field - The columns to be generated
+ * @param fields - The columns to be generated
* @param toBeFlattened - The columns to be flattened
* @param sample - The sample tuple that is used to infer
* result type
@@ -744,7 +745,7 @@
public static POStore topStoreOp() {
POStore ret = new POStore(new OperatorKey("", r.nextLong()));
ret.setPc(pc);
- ret.setSFile(new FileSpec("DummyFil", "DummyLdr"));
+ ret.setSFile(new FileSpec("DummyFil", new FuncSpec("DummyLdr")));
return ret;
}
@@ -758,7 +759,7 @@
}
private static FileSpec getTempFileSpec() throws IOException {
- return new FileSpec(FileLocalizer.getTemporaryPath(null, pc).toString(),BinStorage.class.getName());
+ return new FileSpec(FileLocalizer.getTemporaryPath(null, pc).toString(),new FuncSpec(BinStorage.class.getName()));
}
public static POSplit topSplitOp() throws IOException{
@@ -825,7 +826,7 @@
List ufInps = new ArrayList();
ufInps.add(prjStar4);
- POUserFunc uf = new POUserFunc(new OperatorKey("", r.nextLong()), -1, ufInps, string);
+ POUserFunc uf = new POUserFunc(new OperatorKey("", r.nextLong()), -1, ufInps, new FuncSpec(string));
ep4.add(uf);
ep4.connect(prjStar4, uf);
ep4s.add(ep4);
Modified: incubator/pig/branches/types/test/org/apache/pig/test/utils/TypeCheckingTestUtil.java
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/utils/TypeCheckingTestUtil.java?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/utils/TypeCheckingTestUtil.java (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/utils/TypeCheckingTestUtil.java Sat Jul 12 08:26:35 2008
@@ -18,6 +18,7 @@
package org.apache.pig.test.utils;
+import org.apache.pig.FuncSpec;
import org.apache.pig.impl.logicalLayer.LogicalPlan;
import org.apache.pig.impl.logicalLayer.LOLoad;
import org.apache.pig.impl.plan.OperatorKey;
@@ -40,7 +41,7 @@
try {
LOLoad load = new LOLoad(plan,
genNewOperatorKey(),
- new FileSpec("pi", pigStorage),
+ new FileSpec("pi", new FuncSpec(pigStorage)),
null) ;
return load ;
} catch (IOException e) {
Modified: incubator/pig/branches/types/test/org/apache/pig/test/utils/dotGraph/LogicalPlanLoader.java
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/utils/dotGraph/LogicalPlanLoader.java?rev=676185&r1=676184&r2=676185&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/utils/dotGraph/LogicalPlanLoader.java (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/utils/dotGraph/LogicalPlanLoader.java Sat Jul 12 08:26:35 2008
@@ -18,6 +18,7 @@
package org.apache.pig.test.utils.dotGraph;
+import org.apache.pig.FuncSpec;
import org.apache.pig.impl.logicalLayer.*;
import org.apache.pig.impl.logicalLayer.schema.Schema;
import org.apache.pig.impl.logicalLayer.parser.QueryParser ;
@@ -91,7 +92,7 @@
private LOLoad createLOLoad(DotNode node, LogicalPlan plan) {
LOLoad load = null ;
FileSpec fileSpec = new FileSpec("pi",
- PigStorage.class.getName()) ;
+ new FuncSpec(PigStorage.class.getName())) ;
try {
load = new LOLoad(plan, getKey(node.attributes), fileSpec, null) ;
fillSchema(load, node.attributes) ;
@@ -116,7 +117,7 @@
private LOSort createLOSort(DotNode node, LogicalPlan plan) {
LOSort sort = new LOSort(plan, getKey(node.attributes),
- null, null, "") ;
+ null, null, null) ;
fillSchema(sort, node.attributes) ;
return sort ;
}