org.apache.hadoop.hive.ql.udf
Class UDFOPPlus
java.lang.Object
org.apache.hadoop.hive.ql.exec.UDF
org.apache.hadoop.hive.ql.udf.UDFBaseNumericOp
org.apache.hadoop.hive.ql.udf.UDFOPPlus
public class UDFOPPlus
- extends UDFBaseNumericOp
The reason that we list evaluate methods with all numeric types is for both
better performance and type checking (so we know int + int is still an int
instead of a double); otherwise a single method that takes (Number a, Number
b) and use a.doubleValue() == b.doubleValue() is enough.
The case of int + double will be handled by implicit type casting using
UDFRegistry.implicitConvertable method.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UDFOPPlus
public UDFOPPlus()
evaluate
public ByteWritable evaluate(ByteWritable a,
ByteWritable b)
- Specified by:
evaluate
in class UDFBaseNumericOp
evaluate
public ShortWritable evaluate(ShortWritable a,
ShortWritable b)
- Specified by:
evaluate
in class UDFBaseNumericOp
evaluate
public IntWritable evaluate(IntWritable a,
IntWritable b)
- Specified by:
evaluate
in class UDFBaseNumericOp
evaluate
public LongWritable evaluate(LongWritable a,
LongWritable b)
- Specified by:
evaluate
in class UDFBaseNumericOp
evaluate
public FloatWritable evaluate(FloatWritable a,
FloatWritable b)
- Specified by:
evaluate
in class UDFBaseNumericOp
Copyright © 2012 The Apache Software Foundation