[ https://issues.apache.org/jira/browse/PIG-667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alan Gates updated PIG-667: --------------------------- Assignee: Alan Gates Fix Version/s: 0.9.0 Priority: Minor (was: Major) > Error in projection implementation or in typechecking when casting a member > of Bag > ----------------------------------------------------------------------------------- > > Key: PIG-667 > URL: https://issues.apache.org/jira/browse/PIG-667 > Project: Pig > Issue Type: Bug > Environment: i686 i386 GNU/Linux > Reporter: Araceli Henley > Assignee: Alan Gates > Priority: Minor > Fix For: 0.9.0 > > > As one of its members, a bag contains "age" of type "int". When this value is > used as an argument to DIFF and cast as an int for the comparison, the > following error is thrown: > 9/02/11 14:20:46 INFO mapReduceLayer.MapReduceLauncher: 50% complete > 09/02/11 14:21:31 ERROR mapReduceLayer.MapReduceLauncher: Map reduce job > failed > 09/02/11 14:21:31 ERROR mapReduceLayer.MapReduceLauncher: Number of failed > jobs: 1 > 09/02/11 14:21:31 ERROR mapReduceLayer.MapReduceLauncher: Job failed! > error message for task: map > error message for task: reduce > 09/02/11 14:21:31 ERROR grunt.Grunt: ERROR 1072: Out of bounds access: > Request for field number 1 exceeds tuple size of 1 > Steps to reproduce > # valid use of DIFF with valid cast for bag field > TEST ErrorHandling.AggregateFunc_601 > 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 ( ( BAG{tuple(int)} ) A.Fbag.age, A.Fint ); > STORE X INTO > '/user/pig/tests/results/araceli.1234390832/AggregateFunc_601.out' USING > PigStorage(); > # invalid use of DIFF with valid cast for bag field, DIFF contains one > argument instead off two > TEST ErrorHandling.AggregateFunc_60 > 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 ( ( BAG{tuple(int)} ) A.Fbag.age ); > STORE X INTO > '/user/pig/tests/results/araceli.1234381533/AggregateFunc_60.out' USING > PigStorage(); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.