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 org.apache.hadoop.io.IntWritable evaluate(org.apache.hadoop.io.IntWritable a,
org.apache.hadoop.io.IntWritable b)
- Specified by:
evaluate
in class UDFBaseNumericOp
evaluate
public org.apache.hadoop.io.LongWritable evaluate(org.apache.hadoop.io.LongWritable a,
org.apache.hadoop.io.LongWritable b)
- Specified by:
evaluate
in class UDFBaseNumericOp
evaluate
public org.apache.hadoop.io.FloatWritable evaluate(org.apache.hadoop.io.FloatWritable a,
org.apache.hadoop.io.FloatWritable b)
- Specified by:
evaluate
in class UDFBaseNumericOp
evaluate
public DoubleWritable evaluate(DoubleWritable a,
DoubleWritable b)
- Specified by:
evaluate
in class UDFBaseNumericOp
evaluate
public BigDecimalWritable evaluate(BigDecimalWritable a,
BigDecimalWritable b)
- Specified by:
evaluate
in class UDFBaseNumericOp
Copyright © 2013 The Apache Software Foundation