Return-Path: Delivered-To: apmail-hive-dev-archive@www.apache.org Received: (qmail 99502 invoked from network); 20 Oct 2010 18:52:47 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Oct 2010 18:52:47 -0000 Received: (qmail 53819 invoked by uid 500); 20 Oct 2010 18:52:47 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 53779 invoked by uid 500); 20 Oct 2010 18:52:47 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 53771 invoked by uid 500); 20 Oct 2010 18:52:47 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 53768 invoked by uid 99); 20 Oct 2010 18:52:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Oct 2010 18:52:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Oct 2010 18:52:46 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9KIqQta000495 for ; Wed, 20 Oct 2010 18:52:26 GMT Message-ID: <11315087.14811287600746342.JavaMail.jira@thor> Date: Wed, 20 Oct 2010 14:52:26 -0400 (EDT) From: "John Sichi (JIRA)" To: hive-dev@hadoop.apache.org Subject: [jira] Commented: (HIVE-1376) Simple UDAFs with more than 1 parameter crash on empty row query In-Reply-To: <57022.58241275081049579.JavaMail.jira@thor> 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/HIVE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923090#action_12923090 ] John Sichi commented on HIVE-1376: ---------------------------------- This patch only did (1), not (3). I think we'll still need a followup to avoid the problem for arbitrary UDAF's (unless we require them to avoid primitive types). > Simple UDAFs with more than 1 parameter crash on empty row query > ----------------------------------------------------------------- > > Key: HIVE-1376 > URL: https://issues.apache.org/jira/browse/HIVE-1376 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 0.6.0 > Reporter: Mayank Lahiri > Assignee: Ning Zhang > Fix For: 0.7.0 > > Attachments: HIVE-1376.2.patch, HIVE-1376.patch > > > Simple UDAFs with more than 1 parameter crash when the query returns no rows. Currently, this only seems to affect the percentile() UDAF where the second parameter is the percentile to be computed (of type double). I've also verified the bug by adding a dummy parameter to ExampleMin in contrib. > On an empty query, Hive seems to be trying to resolve an iterate() method with signature {null,null} instead of {null,double}. You can reproduce this bug using: > CREATE TABLE pct_test ( val INT ); > SELECT percentile(val, 0.5) FROM pct_test; > which produces a lot of errors like: > Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public boolean org.apache.hadoop.hive.ql.udf.UDAFPercentile$PercentileLongEvaluator.iterate(org.apache.hadoop.io.LongWritable,double) on object org.apache.hadoop.hive.ql.udf.UDAFPercentile$PercentileLongEvaluator@11d13272 of class org.apache.hadoop.hive.ql.udf.UDAFPercentile$PercentileLongEvaluator with arguments {null, null} of size 2 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.