org.apache.hadoop.hive.ql.exec
Class ComparisonOpMethodResolver

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.ComparisonOpMethodResolver
All Implemented Interfaces:
UDFMethodResolver

public class ComparisonOpMethodResolver
extends Object
implements UDFMethodResolver

The class implements the method resolution for overloaded comparison operators. The resolution logic is as follows: 1. The resolver first tries to find an exact parameter match. 2. If 1 fails and any of the parameters is a date, it converts the other to the date. 3. If 1 and 3 fail then it returns the evaluate(Double, Double) method.


Constructor Summary
ComparisonOpMethodResolver(Class<? extends UDF> udfClass)
          Constuctor.
 
Method Summary
 Method getEvalMethod(List<TypeInfo> argTypeInfos)
          Gets the evaluate method for the UDF given the parameter types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComparisonOpMethodResolver

public ComparisonOpMethodResolver(Class<? extends UDF> udfClass)
Constuctor.

Method Detail

getEvalMethod

public Method getEvalMethod(List<TypeInfo> argTypeInfos)
                     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:
argTypeInfos - The list of the argument types that need to matched with the evaluate function signature.
Throws:
AmbiguousMethodException


Copyright © 2009 The Apache Software Foundation