You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Araceli Henley (JIRA)" <ji...@apache.org> on 2009/02/12 21:12:59 UTC
[jira] Created: (PIG-673) several aggregate functions do not check
the number of arguments and do not correctly check for a type "bag"
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
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.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-673) several aggregate functions do not check
the number of arguments and do not correctly check for a type "bag"
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-673:
-------------------------------
Fix Version/s: 0.9.0
Description:
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
was:
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
> 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
> 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.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (PIG-673) several aggregate functions do not check
the number of arguments and do not correctly check for a type "bag"
Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alan Gates reassigned PIG-673:
------------------------------
Assignee: 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: Daniel Dai
> 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.
-
You can reply to this email to add a comment to the issue online.