Return-Path: Delivered-To: apmail-hadoop-pig-dev-archive@www.apache.org Received: (qmail 97654 invoked from network); 8 Mar 2010 23:01:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Mar 2010 23:01:51 -0000 Received: (qmail 76802 invoked by uid 500); 8 Mar 2010 23:01:26 -0000 Delivered-To: apmail-hadoop-pig-dev-archive@hadoop.apache.org Received: (qmail 76786 invoked by uid 500); 8 Mar 2010 23:01:26 -0000 Mailing-List: contact pig-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pig-dev@hadoop.apache.org Delivered-To: mailing list pig-dev@hadoop.apache.org Received: (qmail 76778 invoked by uid 99); 8 Mar 2010 23:01:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Mar 2010 23:01:26 +0000 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=FREEMAIL_FROM,HTML_FONT_FACE_BAD,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hc.busy@gmail.com designates 209.85.216.185 as permitted sender) Received: from [209.85.216.185] (HELO mail-px0-f185.google.com) (209.85.216.185) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Mar 2010 23:01:25 +0000 Received: by pxi15 with SMTP id 15so2448330pxi.20 for ; Mon, 08 Mar 2010 15:01:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=KSlbe3VqNFqzRl+gG4PrpBGajcqaNBbo+ZH93B8KII0=; b=HAmTqvZALDk0MVITKAIaJNV9vjv+nGp3EglY/kS+JMwu29nwvI7aRXoTybe1ir5cD7 m/nCVCu134ublnQcICxPna6eNhTu71uvM/ZZjugfJKyK0Y9JJbr7wjgXPRLm6fIV5szq DKMXPoCFINRH04KB3o1cXs4jz6EvIeR12KS7U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=aOXeeUH+VQDAAnjhfbqmhLT4eIsGXi7Me9fX8cvgyln18KBrtampj7dq4vBdSNt7/A YTvXq4yFNdJO9k32IZK9nbLUkNG7pK7RbibD/CC6TdpQHiYzHf9J7ImQ6C6bi98yslL/ 2W1Ujp5eUcb9/0T1mGOURspwC4GkUHLd+32xo= MIME-Version: 1.0 Received: by 10.114.87.17 with SMTP id k17mr2136657wab.82.1268089265610; Mon, 08 Mar 2010 15:01:05 -0800 (PST) In-Reply-To: <2cbdb1fd1003081500h3b36b27fg911994efe310737f@mail.gmail.com> References: <2cbdb1fd1003081443h25fa1fcat264e320f9c180c2f@mail.gmail.com> <2cbdb1fd1003081500h3b36b27fg911994efe310737f@mail.gmail.com> Date: Mon, 8 Mar 2010 15:01:05 -0800 Message-ID: <2cbdb1fd1003081501u9c0a496w9a1296b264c8dc5@mail.gmail.com> Subject: Fwd: more bagging fun From: hc busy To: pig-dev@hadoop.apache.org Content-Type: multipart/alternative; boundary=00504502ead33860950481520a15 --00504502ead33860950481520a15 Content-Type: text/plain; charset=ISO-8859-1 Can I file a bug to fix this? On Mon, Mar 8, 2010 at 2:43 PM, hc busy 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 :-( > > --00504502ead33860950481520a15--