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

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.UDF
      extended by org.apache.hadoop.hive.ql.udf.UDFSign

public class UDFSign
extends UDF


Constructor Summary
UDFSign()
           
 
Method Summary
 DoubleWritable evaluate(DoubleWritable a)
          Take sign of a
 org.apache.hadoop.io.IntWritable evaluate(HiveDecimalWritable dec)
          Get the sign of the decimal input
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.UDF
getRequiredFiles, getRequiredJars, getResolver, setResolver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UDFSign

public UDFSign()
Method Detail

evaluate

public DoubleWritable evaluate(DoubleWritable a)
Take sign of a


evaluate

public org.apache.hadoop.io.IntWritable evaluate(HiveDecimalWritable dec)
Get the sign of the decimal input

Parameters:
dec - decimal input
Returns:
-1, 0, or 1 representing the sign of the input decimal


Copyright © 2014 The Apache Software Foundation. All rights reserved.