You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Thejas M Nair (JIRA)" <ji...@apache.org> on 2011/02/14 19:28:57 UTC
[jira] Assigned: (PIG-673) several aggregate functions do not check
the number of arguments and do not correctly check for a type "bag"
[ https://issues.apache.org/jira/browse/PIG-673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thejas M Nair reassigned PIG-673:
---------------------------------
Assignee: Thejas M Nair (was: Daniel Dai)
> several aggregate functions do not check the number of arguments and do not correctly check for a type "bag"
> ------------------------------------------------------------------------------------------------------------
>
> Key: PIG-673
> URL: https://issues.apache.org/jira/browse/PIG-673
> Project: Pig
> Issue Type: Bug
> Environment: i686 i386 GNU/Linux
> Reporter: Araceli Henley
> Assignee: Thejas M Nair
> Fix For: 0.9.0
>
>
> DIFF expects two bags as the argument. But in this negative test case we pass:
> 1) there is a single argument to diff instead of two,
> 2) The argument should be a bag but is an int.
> TEST: AggregateFunc_190
> 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 DIFF( A.Fint) + DIFF( A.Fint);
> STORE X INTO '/user/pig/tests/results/araceli.1234381533/AggregateFunc_190.out' USING PigStorage();
> ERROR 1000: Error during parsing. Atomic field expected but found non-atomic field
> TEST AggregateFunc_1901
> 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 DIFF( A.Fint, A.Fint) + DIFF( A.Fint, A.Fint);
> STORE X INTO '/user/pig/tests/results/araceli.1234467894/AggregateFunc_1901.out' USING PigStorage();
> ERROR 1000: Error during parsing. Atomic field expected but found non-atomic field
> TEST AggregateFunc_1902
> 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 DIFF( A.Fint, A.Fint + A.Fint);
> STORE X INTO '/user/pig/tests/results/araceli.1234467894/AggregateFunc_1902.out' USING PigStorage();
> throws error: ERROR 1039: Incompatible types in Add Operator left hand side:bag right hand side:bag
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira