Bug in Schema comparison for casting
------------------------------------
Key: PIG-669
URL: https://issues.apache.org/jira/browse/PIG-669
Project: Pig
Issue Type: Bug
Environment: i686 i386 GNU/Linux
Reporter: Araceli Henley
This is a bug int he Schema comparison for casting. This is a valid use of a
cast in SUM, the first and second arguments are a cast to a Bag with an int.
ERROR 1045: Could not infer the matching function for
org.apache.pig.builtin.SUM as multiple or none of them fit. Please use an
explicit cast.
TEST: AggregateFunc_61
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, ( BAG{tuple(int)} )
A.Fbag.age);
STORE X INTO '/user/pig/tests/results/araceli.1234465985/AggregateFunc_61.out'
USING PigStorage();
Suggest you also try:
X =FOREACH B GENERATE SUM ( ( BAG{tuple(int)} ) A.Fbag.age, A.Fint );
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.