org.apache.hadoop.hive.ql.udf
Class UDFIf.UDFIfMethodResolver
java.lang.Object
org.apache.hadoop.hive.ql.udf.UDFIf.UDFIfMethodResolver
- All Implemented Interfaces:
- UDFMethodResolver
- Enclosing class:
- UDFIf
public static class UDFIf.UDFIfMethodResolver
- extends Object
- implements UDFMethodResolver
Method Resolver for SQL construct "IF".
This method resolver follows the type determination process:
1. If valueTrue or valueFalse is a String, then result is String
2. If valueTrue or valueFalse is a Double, then result is Double
3. If valueTrue or valueFalse is a Long, then result is a Long
4. If valueTrue or valueFalse is a Integer, then result is a Integer
5. If valueTrue or valueFalse is a Short, then result is a Short
6. If valueTrue or valueFalse is a Byte, then result is a Byte
7. If valueTrue or valueFalse is a Boolean, then result is a Boolean
This mimics the process from MySQL http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html#function_if
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UDFIf.UDFIfMethodResolver
public UDFIf.UDFIfMethodResolver(Class<? extends UDF> udfClass)
- Constuctor.
getEvalMethod
public Method getEvalMethod(List<Class<?>> argClasses)
throws AmbiguousMethodException
- Description copied from interface:
UDFMethodResolver
- Gets the evaluate method for the UDF given the parameter types.
- Specified by:
getEvalMethod
in interface UDFMethodResolver
- Parameters:
argClasses
- The list of the argument types that need to matched with the evaluate
function signature.
- Throws:
AmbiguousMethodException
Copyright © 2009 The Apache Software Foundation