You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2012/03/28 04:34:10 UTC
svn commit: r1306125 - in /pig/trunk/test/e2e/pig/tests: macro.conf
negative.conf nightly.conf turing_jython.conf
Author: daijy
Date: Wed Mar 28 02:34:10 2012
New Revision: 1306125
URL: http://svn.apache.org/viewvc?rev=1306125&view=rev
Log:
Fix several e2e tests
Modified:
pig/trunk/test/e2e/pig/tests/macro.conf
pig/trunk/test/e2e/pig/tests/negative.conf
pig/trunk/test/e2e/pig/tests/nightly.conf
pig/trunk/test/e2e/pig/tests/turing_jython.conf
Modified: pig/trunk/test/e2e/pig/tests/macro.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/macro.conf?rev=1306125&r1=1306124&r2=1306125&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/macro.conf (original)
+++ pig/trunk/test/e2e/pig/tests/macro.conf Wed Mar 28 02:34:10 2012
@@ -556,6 +556,7 @@ $cfg = {
{
# import non-existent file
'num' => 1,
+ 'ignore' => 1, # different error message for different version of hadoop
'pig' => q#import 'nosuchfile';
a = load ':INPATH:/singlefile/studenttab10k' as (name, age, gpa);
Modified: pig/trunk/test/e2e/pig/tests/negative.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/negative.conf?rev=1306125&r1=1306124&r2=1306125&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/negative.conf (original)
+++ pig/trunk/test/e2e/pig/tests/negative.conf Wed Mar 28 02:34:10 2012
@@ -174,6 +174,7 @@ store a into ':INPATH:/singlefile/fileex
# currently (as of 09/18/2008), the following are not allowed
#a = b;
'num' => 1,
+ 'ignore' => 1, # different error message for different version of hadoop
'pig' => q\a = load ':INPATH:/singlefile/studenttab10k' as (name, age, gpa);
b = a;\,
'expected_err_regex' => "mismatched input ';' expecting LEFT_PAREN",
@@ -182,6 +183,7 @@ store a into ':INPATH:/singlefile/fileex
# currently (as of 09/18/2008), the following are not allowed
#a = b as (x,y,z);
'num' => 2,
+ 'ignore' => 1, # different error message for different version of hadoop
'pig' => q\a = load ':INPATH:/singlefile/studenttab10k' as (name, age, gpa);
b = a as (x,y,z);\,
'expected_err_regex' => "mismatched input 'as' expecting LEFT_PAREN",
Modified: pig/trunk/test/e2e/pig/tests/nightly.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/nightly.conf?rev=1306125&r1=1306124&r2=1306125&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/nightly.conf (original)
+++ pig/trunk/test/e2e/pig/tests/nightly.conf Wed Mar 28 02:34:10 2012
@@ -270,7 +270,7 @@ store b into ':OUTPATH:' using PigStorag
},
{
'num' => 21,
- 'ignore' => 1, # TODO Need to file a JIRA-2
+ 'ignore' => 1, # PIG-2593
'pig' => q\a = load ':INPATH:/singlefile/allscalar10k' as (name, age, gpa, instate);
b = filter a by instate == true;
store b into ':OUTPATH:' using PigStorage;\,
@@ -280,7 +280,7 @@ store b into ':OUTPATH:' using PigStorag
},
{
'num' => 22,
- 'ignore' => 1, # TODO Need to file a JIRA-2
+ 'ignore' => 1, # PIG-2593
'pig' => q\a = load ':INPATH:/singlefile/allscalar10k' as (name, age, gpa, instate);
b = filter a by instate == false;
store b into ':OUTPATH:' using PigStorage;\,
@@ -290,7 +290,7 @@ store b into ':OUTPATH:' using PigStorag
},
{
'num' => 23,
- 'ignore' => 1, # TODO Need to file a JIRA-1
+ 'ignore' => 1, # PIG-2593
'pig' => q\a = load ':INPATH:/singlefile/allscalar10k' as (name:chararray, age:int, gpa:double, instate:boolean);
b = filter a by instate;
store b into ':OUTPATH:' using PigStorage;\,
@@ -300,7 +300,7 @@ store b into ':OUTPATH:' using PigStorag
},
{
'num' => 24,
- 'ignore' => 1, # TODO Need to file a JIRA-1
+ 'ignore' => 1, # PIG-2593
'pig' => q\a = load ':INPATH:/singlefile/allscalar10k' as (name:chararray, age:int, gpa:double, instate:boolean);
b = filter a by not instate;
store b into ':OUTPATH:' using PigStorage;\,
@@ -3767,6 +3767,7 @@ store T4 into ':OUTPATH:.8';
# TEST : cast for TOTUPLE/TOBAG
'num' => 4
,'pig' => q?
+ ,'ignore' => 1 # different error message for different version of hadoop
A = load ':INPATH:/types/numbers.txt' using PigStorage(':') as (intnum1000: int,id: int,intnum5: int,intnum100: int,intnum: int,longnum: long,floatnum: float,doublenum: double);
B= limit A 10;
C = foreach B generate $0, TOTUPLE((int) $0, (long) $0, (double) $0), TOBAG( (float) $0, (chararray) $0), $0;
@@ -3860,11 +3861,24 @@ store T1 into ':OUTPATH:.3';
store T2 into ':OUTPATH:.4';
store T3 into ':OUTPATH:.5';
?
-
+ ,'verify_pig_script' => q?register :FUNCPATH:/testudf.jar;
+A = load ':INPATH:/types/numbers.txt' using PigStorage(':') as (intnum1000: int,id: int,intnum5: int,intnum100: int,intnum: int,longnum: long,floatnum: float,doublenum: double);
+B = limit A 10;
+C = foreach B generate TOBAG( $0, $1, $2);
+T1= foreach B generate TOTUPLE( TOBAG( $1, $2, $3),TOTUPLE($3, $4, $5) );
+T2= foreach B generate TOTUPLE( TOBAG( $1, $2, $3),TOBAG($3, $4, $5) );
+T3= foreach B generate org.apache.pig.test.udf.evalfunc.TOBAG2( TOTUPLE( $1, $2, $3), TOTUPLE($4,$5), TOTUPLE($6,$7));
+store B into ':OUTPATH:.1';
+store C into ':OUTPATH:.2';
+store T1 into ':OUTPATH:.3';
+store T2 into ':OUTPATH:.4';
+store T3 into ':OUTPATH:.5';
+?
}, {
#TEST negative test case: out of bounds positional parameter
# EVERYTHING IS CORRECT
'num' => 9
+ ,'ignore' => 1 # different error message for different version of hadoop
,'pig' => q?
A = load ':INPATH:/types/numbers.txt' using PigStorage(':') as (intnum1000: int,id: int,intnum5: int,intnum100: int,intnum: int,longnum: long,floatnum: float,doublenum: double);
B = limit A 10;
@@ -3875,6 +3889,7 @@ C = foreach B generate $0, $1, TOTUPLE($
#TEST negative test case: out of bounds positional parameter
# EVERYTHING IS CORRECT
'num' => 10
+ ,'ignore' => 1 # different error message for different version of hadoop
,'pig' => q?
A = load ':INPATH:/types/numbers.txt' using PigStorage(':') as (intnum1000: int,id: int,intnum5: int,intnum100: int,intnum: int,longnum: long,floatnum: float,doublenum: double);
B = limit A 10;
Modified: pig/trunk/test/e2e/pig/tests/turing_jython.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/turing_jython.conf?rev=1306125&r1=1306124&r2=1306125&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/turing_jython.conf (original)
+++ pig/trunk/test/e2e/pig/tests/turing_jython.conf Wed Mar 28 02:34:10 2012
@@ -997,8 +997,8 @@ from org.apache.pig.scripting import Pig
#create pig script
-ret = Pig.sql("""drop table if exists pig_script_hcat_ddl_1;
-create table pig_script_hcat_ddl_1(name string,
+Pig.sql("""drop table if exists pig_script_hcat_ddl_1;""")
+ret = Pig.sql("""create table pig_script_hcat_ddl_1(name string,
age int,
gpa double)
stored as textfile;