Bug in Schema comparison for equality
-------------------------------------

                 Key: PIG-666
                 URL: https://issues.apache.org/jira/browse/PIG-666
             Project: Pig
          Issue Type: Bug
          Components: build
         Environment: i686 i386 GNU/Linux
            Reporter: Araceli Henley
            Priority: Minor


Santhosh is currently improving Error Handling, I ran these tests against : 
pig_phase_3.jar
This is a bug in the schema comparison for equality

 # valid use of MAX with Bag as value
TEST: AggregateFunc_23.pig

 A =LOAD '/user/pig/tests/data/types/DataAll' USING PigStorage() AS ( Fint:int, 
Flong:long, Fdouble:double, Ffloat:float, Fchar:chararray, 
Fchararray:chararray, Fbytearray:bytearray, Fmap:map[], Fbag:BAG{ t:tuple( 
name, age, avg ) }, Ftuple:( name:chararray, age:int, avg:float) );
B =GROUP A ALL; 
X =FOREACH B GENERATE A.Fint, MAX( ( BAG{tuple(int)}) A.Fbag.age ); 
STORE X INTO '/user/pig/tests/results/araceli.1234381533/AggregateFunc_23.out' 
USING PigStorage();

 # valid use of SUM with int with valid cast
TEST:  AggregateFunc_231.pig

 A =LOAD '/user/pig/tests/data/types/DataAll' USING PigStorage() AS ( Fint:int, 
Flong:long, Fdouble:double, Ffloat:float, Fchar:chararray, 
Fchararray:chararray, Fbytearray:bytearray, Fmap:map[], Fbag:BAG{ t:tuple( 
name, age, avg ) }, Ftuple:( name:chararray, age:int, avg:float) );
B =GROUP A ALL; 
X =FOREACH B GENERATE A.Fint, SUM( ( BAG{ tuple(double)} ) A.Fbag.age ); 
STORE X INTO '/user/pig/tests/results/araceli.1234381533/AggregateFunc_231.out' 
USING PigStorage();

 # valid use of SUM with cast for field in bag
TEST: AggregateFunc_26.pig

A =LOAD '/user/pig/tests/data/types/DataAll' USING PigStorage() AS ( Fint:int, 
Flong:long, Fdouble:double, Ffloat:float, Fchar:chararray, 
Fchararray:chararray, Fbytearray:bytearray, Fmap:map[], Fbag:BAG{ t:tuple( 
name, age, avg ) }, Ftuple:( name:chararray, age:int, avg:float) )
;B =GROUP A ALL; 
X =FOREACH B GENERATE SUM ( (BAG{tuple(int)}) A.Fbag.age ); 
STORE X INTO '/user/pig/tests/results/araceli.1234381533/AggregateFunc_26.out' 
USING PigStorage();

# valid use of MIN with cast for field in bag
TEST:  AggregateFunc_27.pig

 A =LOAD '/user/pig/tests/data/types/DataAll' USING PigStorage() AS ( Fint:int, 
Flong:long, Fdouble:double, Ffloat:float, Fchar:chararray, 
Fchararray:chararray, Fbytearray:bytearray, Fmap:map[], Fbag:BAG{ t:tuple( 
name, age, avg ) }, Ftuple:( name:chararray, age:int, avg:float) );
B =GROUP A ALL; 
X =FOREACH B GENERATE MIN ( (BAG{tuple(int)}) A.Fbag.age ); 
STORE X INTO '/user/pig/tests/results/araceli.1234381533/AggregateFunc_27.out' 
USING PigStorage();

 # valid use of AVG with Long as value
TEST: AggregateFunc_46.pig

 A =LOAD '/user/pig/tests/data/types/DataAll' USING PigStorage() AS ( Fint:int, 
Flong:long, Fdouble:double, Ffloat:float, Fchar:chararray, 
Fchararray:chararray, Fbytearray:bytearray, Fmap:map[], Fbag:BAG{ t:tuple( 
name, age, avg ) }, Ftuple:( name:chararray, age:int, avg:float) );
B =GROUP A ALL; 
X =FOREACH B GENERATE A.Fint, AVG( ( BAG{tuple(double)} ) A.Fint ); 
STORE X INTO '/user/pig/tests/results/araceli.1234381533/AggregateFunc_47.out' 
USING PigStorage();


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to