Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A1261788 for ; Wed, 20 Apr 2011 20:52:44 +0000 (UTC) Received: (qmail 39972 invoked by uid 500); 20 Apr 2011 20:52:44 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 39944 invoked by uid 500); 20 Apr 2011 20:52:44 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 39936 invoked by uid 500); 20 Apr 2011 20:52:44 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 39933 invoked by uid 99); 20 Apr 2011 20:52:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2011 20:52:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2011 20:52:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E5B23AB664 for ; Wed, 20 Apr 2011 20:52:05 +0000 (UTC) Date: Wed, 20 Apr 2011 20:52:05 +0000 (UTC) From: "Daniel Dai (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <1816034548.70974.1303332725937.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <850494052.69634.1303294685729.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Assigned] (PIG-2004) Incorrect input types passed on to eval function MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PIG-2004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Dai reassigned PIG-2004: ------------------------------- Assignee: Thejas M Nair (was: Xuefu Zhang) > Incorrect input types passed on to eval function > ------------------------------------------------ > > Key: PIG-2004 > URL: https://issues.apache.org/jira/browse/PIG-2004 > Project: Pig > Issue Type: Bug > Components: impl > Affects Versions: 0.9.0 > Reporter: Vivek Padmanabhan > Assignee: Thejas M Nair > Fix For: 0.9.0 > > Attachments: PIG-2004-0.patch > > > The below script fails by throwing a ClassCastException from the MAX udf. The udf expects the value of the bag supplied to be databyte array, but at run time the udf gets the actual type, ie Double in this case. This causes the script execution to fail with exception; > | Caused by: java.lang.ClassCastException: java.lang.Double cannot be cast to org.apache.pig.data.DataByteArray > The same script runs properly with Pig 0.8. > {code} > A = LOAD 'myinput' as (f1,f2,f3); > B = foreach A generate f1,f2+f3/1000.0 as doub; > C = group B by f1; > D = foreach C generate (long)(MAX(B.doub)) as f4; > dump D; > {code} > myinput > ------- > a 1000 12345 > b 2000 23456 > c 3000 34567 > a 1500 54321 > b 2500 65432 -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira