hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hc busy <hc.b...@gmail.com>
Subject Fwd: more bagging fun
Date Mon, 08 Mar 2010 23:01:05 GMT
Can I file a bug to fix this?


On Mon, Mar 8, 2010 at 2:43 PM, hc busy <hc.busy@gmail.com> wrote:

> okay. Here's the bag that I have:
>
>   {group: (a: int,b: chararray,c: chararray,d: int), TABLE: {number1: int,
> number2:int}}
>
>
>
> and I want to do this
>
>  grunt> CALCULATE= FOREACH TABLE_group GENERATE group, SUM(TABLE.number1 /
> TABLE.number2);
>
> grunt> DUMP CALCULATE;
>
> 2010-03-08 14:02:41,055 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1039: Incompatible types in Multiplication Operator left hand side:bag
> right hand side:bag
>
>
>
> This seems useful that I may want to calculate an agg. of some arithmetic
> operations on member of a bag. Any suggestions?
>
> ... Looking at the documentation it looks like I want to do something like
>
> SUM(TABLE.(number1 / number2))
>
> but that doesn't work either :-(
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message