hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nzh...@apache.org
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 GMT
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<TypeInfo> argTypeInfos, List<Method> 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<double>)  _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<double>). Possible choices: _FUNC_(void)  _FUNC_(boolean)  _FUNC_(tinyint)
 _FUNC_(smallint)  _FUNC_(int)  _FUNC_(bigint)  _FUNC_(double)  _FUNC_(string)  



Mime
View raw message