Return-Path: Delivered-To: apmail-hadoop-hive-commits-archive@minotaur.apache.org Received: (qmail 85244 invoked from network); 8 Mar 2010 22:08:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Mar 2010 22:08:05 -0000 Received: (qmail 14654 invoked by uid 500); 8 Mar 2010 22:07:41 -0000 Delivered-To: apmail-hadoop-hive-commits-archive@hadoop.apache.org Received: (qmail 14632 invoked by uid 500); 8 Mar 2010 22:07:41 -0000 Mailing-List: contact hive-commits-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-commits@hadoop.apache.org Received: (qmail 14624 invoked by uid 99); 8 Mar 2010 22:07:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Mar 2010 22:07:41 +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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Mar 2010 22:07:37 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C82CC2388980; Mon, 8 Mar 2010 22:07:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r920539 - in /hadoop/hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/exec/ test/queries/clientnegative/ test/results/clientnegative/ Date: Mon, 08 Mar 2010 22:07:16 -0000 To: hive-commits@hadoop.apache.org From: nzhang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100308220716.C82CC2388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: nzhang Date: Mon Mar 8 22:07:16 2010 New Revision: 920539 URL: http://svn.apache.org/viewvc?rev=920539&view=rev Log: HIVE-1212 [missing files from the last commit]. Explicitly say Hive Internal Error to ease debugging (Zheng Shao via Ning Zhang) Added: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/NoMatchingMethodException.java hadoop/hive/trunk/ql/src/test/queries/clientnegative/no_matching_udf.q hadoop/hive/trunk/ql/src/test/queries/clientnegative/wrong_column_type.q hadoop/hive/trunk/ql/src/test/results/clientnegative/no_matching_udf.q.out hadoop/hive/trunk/ql/src/test/results/clientnegative/wrong_column_type.q.out Added: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/NoMatchingMethodException.java URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/NoMatchingMethodException.java?rev=920539&view=auto ============================================================================== --- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/NoMatchingMethodException.java (added) +++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/NoMatchingMethodException.java Mon Mar 8 22:07:16 2010 @@ -0,0 +1,51 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.exec; + +import java.lang.reflect.Method; +import java.util.List; + +import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; + +/** + * Exception thrown by the UDF and UDAF method resolvers in case no matching method + * is found. + * + */ +public class NoMatchingMethodException extends UDFArgumentException { + + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param funcClass + * The UDF or UDAF class. + * @param argTypeInfos + * The list of argument types that lead to an ambiguity. + * @param methods + * All potential matches. + */ + public NoMatchingMethodException(Class funcClass, + List argTypeInfos, List methods) { + super("No matching method for " + funcClass + " with " + + argTypeInfos.toString().replace('[', '(').replace(']', ')'), + funcClass, argTypeInfos, methods); + } +} Added: hadoop/hive/trunk/ql/src/test/queries/clientnegative/no_matching_udf.q URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientnegative/no_matching_udf.q?rev=920539&view=auto ============================================================================== --- hadoop/hive/trunk/ql/src/test/queries/clientnegative/no_matching_udf.q (added) +++ hadoop/hive/trunk/ql/src/test/queries/clientnegative/no_matching_udf.q Mon Mar 8 22:07:16 2010 @@ -0,0 +1 @@ +SELECT percentile(3.5, 0.99) FROM src; Added: hadoop/hive/trunk/ql/src/test/queries/clientnegative/wrong_column_type.q URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientnegative/wrong_column_type.q?rev=920539&view=auto ============================================================================== --- hadoop/hive/trunk/ql/src/test/queries/clientnegative/wrong_column_type.q (added) +++ hadoop/hive/trunk/ql/src/test/queries/clientnegative/wrong_column_type.q Mon Mar 8 22:07:16 2010 @@ -0,0 +1,4 @@ +CREATE TABLE dest1(a float); + +INSERT OVERWRITE TABLE dest1 +SELECT array(1.0,2.0) FROM src; Added: hadoop/hive/trunk/ql/src/test/results/clientnegative/no_matching_udf.q.out URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientnegative/no_matching_udf.q.out?rev=920539&view=auto ============================================================================== --- hadoop/hive/trunk/ql/src/test/results/clientnegative/no_matching_udf.q.out (added) +++ hadoop/hive/trunk/ql/src/test/results/clientnegative/no_matching_udf.q.out Mon Mar 8 22:07:16 2010 @@ -0,0 +1 @@ +FAILED: Error in semantic analysis: No matching method for class org.apache.hadoop.hive.ql.udf.UDAFPercentile with (double, double). Possible choices: _FUNC_(bigint, array) _FUNC_(bigint, double) Added: hadoop/hive/trunk/ql/src/test/results/clientnegative/wrong_column_type.q.out URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientnegative/wrong_column_type.q.out?rev=920539&view=auto ============================================================================== --- hadoop/hive/trunk/ql/src/test/results/clientnegative/wrong_column_type.q.out (added) +++ hadoop/hive/trunk/ql/src/test/results/clientnegative/wrong_column_type.q.out Mon Mar 8 22:07:16 2010 @@ -0,0 +1,6 @@ +PREHOOK: query: CREATE TABLE dest1(a float) +PREHOOK: type: CREATETABLE +POSTHOOK: query: CREATE TABLE dest1(a float) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@dest1 +FAILED: Error in semantic analysis: No matching method for class org.apache.hadoop.hive.ql.udf.UDFToFloat with (array). Possible choices: _FUNC_(void) _FUNC_(boolean) _FUNC_(tinyint) _FUNC_(smallint) _FUNC_(int) _FUNC_(bigint) _FUNC_(double) _FUNC_(string)