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

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

public class UDFToDouble
extends UDF

UDFToDouble.


Constructor Summary
UDFToDouble()
           
 
Method Summary
 DoubleWritable evaluate(org.apache.hadoop.io.BooleanWritable i)
          Convert from boolean to a double.
 DoubleWritable evaluate(ByteWritable i)
          Convert from boolean to a double.
 DoubleWritable evaluate(org.apache.hadoop.io.FloatWritable i)
          Convert from float to a double.
 DoubleWritable evaluate(HiveDecimalWritable i)
           
 DoubleWritable evaluate(org.apache.hadoop.io.IntWritable i)
          Convert from integer to a double.
 DoubleWritable evaluate(org.apache.hadoop.io.LongWritable i)
          Convert from long to a double.
 DoubleWritable evaluate(org.apache.hadoop.io.NullWritable i)
          Convert from void to a double.
 DoubleWritable evaluate(ShortWritable i)
          Convert from short to a double.
 DoubleWritable evaluate(org.apache.hadoop.io.Text i)
          Convert from string to a double.
 DoubleWritable evaluate(TimestampWritable i)
           
 
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

UDFToDouble

public UDFToDouble()
Method Detail

evaluate

public DoubleWritable evaluate(org.apache.hadoop.io.NullWritable i)
Convert from void to a double. This is called for CAST(... AS DOUBLE)

Parameters:
i - The void value to convert
Returns:
DoubleWritable

evaluate

public DoubleWritable evaluate(org.apache.hadoop.io.BooleanWritable i)
Convert from boolean to a double. This is called for CAST(... AS DOUBLE)

Parameters:
i - The boolean value to convert
Returns:
DoubleWritable

evaluate

public DoubleWritable evaluate(ByteWritable i)
Convert from boolean to a double. This is called for CAST(... AS DOUBLE)

Parameters:
i - The byte value to convert
Returns:
DoubleWritable

evaluate

public DoubleWritable evaluate(ShortWritable i)
Convert from short to a double. This is called for CAST(... AS DOUBLE)

Parameters:
i - The short value to convert
Returns:
DoubleWritable

evaluate

public DoubleWritable evaluate(org.apache.hadoop.io.IntWritable i)
Convert from integer to a double. This is called for CAST(... AS DOUBLE)

Parameters:
i - The integer value to convert
Returns:
DoubleWritable

evaluate

public DoubleWritable evaluate(org.apache.hadoop.io.LongWritable i)
Convert from long to a double. This is called for CAST(... AS DOUBLE)

Parameters:
i - The long value to convert
Returns:
DoubleWritable

evaluate

public DoubleWritable evaluate(org.apache.hadoop.io.FloatWritable i)
Convert from float to a double. This is called for CAST(... AS DOUBLE)

Parameters:
i - The float value to convert
Returns:
DoubleWritable

evaluate

public DoubleWritable evaluate(org.apache.hadoop.io.Text i)
Convert from string to a double. This is called for CAST(... AS DOUBLE)

Parameters:
i - The string value to convert
Returns:
DoubleWritable

evaluate

public DoubleWritable evaluate(TimestampWritable i)

evaluate

public DoubleWritable evaluate(HiveDecimalWritable i)


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