Return-Path: Delivered-To: apmail-hadoop-hive-dev-archive@minotaur.apache.org Received: (qmail 7973 invoked from network); 5 Apr 2010 20:50:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Apr 2010 20:50:50 -0000 Received: (qmail 35090 invoked by uid 500); 5 Apr 2010 20:50:50 -0000 Delivered-To: apmail-hadoop-hive-dev-archive@hadoop.apache.org Received: (qmail 35071 invoked by uid 500); 5 Apr 2010 20:50:50 -0000 Mailing-List: contact hive-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hadoop.apache.org Delivered-To: mailing list hive-dev@hadoop.apache.org Received: (qmail 35063 invoked by uid 99); 5 Apr 2010 20:50:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 20:50:50 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 20:50:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2CD06234C48D for ; Mon, 5 Apr 2010 20:50:27 +0000 (UTC) Message-ID: <825759092.696851270500627182.JavaMail.jira@brutus.apache.org> Date: Mon, 5 Apr 2010 20:50:27 +0000 (UTC) From: "Zheng Shao (JIRA)" To: hive-dev@hadoop.apache.org Subject: [jira] Created: (HIVE-1291) Fix UDAFPercentile ndexOutOfBoundsException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Fix UDAFPercentile ndexOutOfBoundsException ------------------------------------------- Key: HIVE-1291 URL: https://issues.apache.org/jira/browse/HIVE-1291 Project: Hadoop Hive Issue Type: Bug Affects Versions: 0.6.0 Reporter: Zheng Shao Assignee: Zheng Shao The counts array can be empty. We should directly return null in that case. {code} org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.hive.serde2.io.DoubleWritable org.apache.hadoop.hive.ql.udf.UDAFPercentile$PercentileLongEvaluator.terminate() on object org.apache.hadoop.hive.ql.udf.UDAFPercentile$PercentileLongEvaluator@530d0eae of class org.apache.hadoop.hive.ql.udf.UDAFPercentile$PercentileLongEvaluator with arguments {} of size 0 at org.apache.hadoop.hive.ql.exec.FunctionRegistry.invoke(FunctionRegistry.java:725) at org.apache.hadoop.hive.ql.udf.generic.GenericUDAFBridge$GenericUDAFBridgeEvaluator.terminate(GenericUDAFBridge.java:181) at org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.evaluate(GenericUDAFEvaluator.java:157) at org.apache.hadoop.hive.ql.exec.GroupByOperator.forward(GroupByOperator.java:838) at org.apache.hadoop.hive.ql.exec.GroupByOperator.closeOp(GroupByOperator.java:885) at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:539) at org.apache.hadoop.hive.ql.exec.ExecReducer.close(ExecReducer.java:300) at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:474) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:412) at org.apache.hadoop.mapred.Child.main(Child.java:159) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.hive.ql.exec.FunctionRegistry.invoke(FunctionRegistry.java:701) ... 9 more Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at org.apache.hadoop.hive.ql.udf.UDAFPercentile.getPercentile(UDAFPercentile.java:97) at org.apache.hadoop.hive.ql.udf.UDAFPercentile.access$300(UDAFPercentile.java:44) at org.apache.hadoop.hive.ql.udf.UDAFPercentile$PercentileLongEvaluator.terminate(UDAFPercentile.java:196) ... 14 more {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.