public abstract class UDFMath extends UDF
doubles
. By extending from
this class these UDFs will automatically support decimals as well.Constructor and Description |
---|
UDFMath() |
Modifier and Type | Method and Description |
---|---|
protected abstract DoubleWritable |
doEvaluate(DoubleWritable a)
For subclass to implement.
|
DoubleWritable |
evaluate(DoubleWritable a)
Returns
null if the passed in value is and passes on to doEvaluate(DoubleWritable) if not. |
DoubleWritable |
evaluate(HiveDecimalWritable writable)
Convert HiveDecimal to a double and call evaluate() on it.
|
getRequiredFiles, getRequiredJars, getResolver, setResolver
protected abstract DoubleWritable doEvaluate(DoubleWritable a)
public final DoubleWritable evaluate(DoubleWritable a)
null
if the passed in value is and passes on to doEvaluate(DoubleWritable)
if not.public final DoubleWritable evaluate(HiveDecimalWritable writable)
Copyright © 2016 The Apache Software Foundation. All rights reserved.