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

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

public class NumericOpMethodResolver
extends Object
implements UDFMethodResolver

The class implements the method resolution for operators like (+, -, *, /, %, |, &, ^). The resolution logic is as follows: 1. The resolver first tries to find an exact parameter match. 2. If 1 fails then it returns the evaluate(Double, Double) method.


Constructor Summary
NumericOpMethodResolver(Class<? extends UDF> udfClass)
          Constuctor.
 
Method Summary
 Method getEvalMethod(List<Class<?>> argClasses)
          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

NumericOpMethodResolver

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

Method Detail

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