org.apache.hadoop.hive.ql.udf
Class UDFBaseNumericOp

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.UDF
      extended by org.apache.hadoop.hive.ql.udf.UDFBaseNumericOp
Direct Known Subclasses:
UDFOPMinus, UDFOPMod, UDFOPMultiply, UDFOPPlus, UDFPosMod

public abstract class UDFBaseNumericOp
extends UDF

Base class for numeric operators like +, -, / etc. All these operators share a common method resolver (NumericOpMethodResolver).


Field Summary
protected  BigDecimalWritable bigDecimalWritable
           
protected  ByteWritable byteWritable
           
protected  DoubleWritable doubleWritable
           
protected  FloatWritable floatWritable
           
protected  IntWritable intWritable
           
protected  LongWritable longWritable
           
protected  ShortWritable shortWritable
           
 
Constructor Summary
UDFBaseNumericOp()
          Constructor.
 
Method Summary
abstract  ByteWritable evaluate(ByteWritable a, ByteWritable b)
           
abstract  FloatWritable evaluate(FloatWritable a, FloatWritable b)
           
abstract  IntWritable evaluate(IntWritable a, IntWritable b)
           
abstract  LongWritable evaluate(LongWritable a, LongWritable b)
           
abstract  ShortWritable evaluate(ShortWritable a, ShortWritable b)
           
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.UDF
getRequiredFiles, getRequiredJars, getResolver, setResolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

byteWritable

protected ByteWritable byteWritable

shortWritable

protected ShortWritable shortWritable

intWritable

protected IntWritable intWritable

longWritable

protected LongWritable longWritable

floatWritable

protected FloatWritable floatWritable

doubleWritable

protected DoubleWritable doubleWritable

bigDecimalWritable

protected BigDecimalWritable bigDecimalWritable
Constructor Detail

UDFBaseNumericOp

public UDFBaseNumericOp()
Constructor. This constructor sets the resolver to be used for comparison operators. See UDFMethodResolver

Method Detail

evaluate

public abstract ByteWritable evaluate(ByteWritable a,
                                      ByteWritable b)

evaluate

public abstract ShortWritable evaluate(ShortWritable a,
                                       ShortWritable b)

evaluate

public abstract IntWritable evaluate(IntWritable a,
                                     IntWritable b)

evaluate

public abstract LongWritable evaluate(LongWritable a,
                                      LongWritable b)

evaluate

public abstract FloatWritable evaluate(FloatWritable a,
                                       FloatWritable b)


Copyright © 2012 The Apache Software Foundation