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

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

public class UDFToInteger
extends UDF

UDFToInteger.


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

UDFToInteger

public UDFToInteger()
Method Detail

evaluate

public org.apache.hadoop.io.IntWritable evaluate(org.apache.hadoop.io.NullWritable i)
Convert from void to an integer. This is called for CAST(... AS INT)

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

evaluate

public org.apache.hadoop.io.IntWritable evaluate(org.apache.hadoop.io.BooleanWritable i)
Convert from boolean to an integer. This is called for CAST(... AS INT)

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

evaluate

public org.apache.hadoop.io.IntWritable evaluate(ByteWritable i)
Convert from byte to an integer. This is called for CAST(... AS INT)

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

evaluate

public org.apache.hadoop.io.IntWritable evaluate(ShortWritable i)
Convert from short to an integer. This is called for CAST(... AS INT)

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

evaluate

public org.apache.hadoop.io.IntWritable evaluate(org.apache.hadoop.io.LongWritable i)
Convert from long to an integer. This is called for CAST(... AS INT)

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

evaluate

public org.apache.hadoop.io.IntWritable evaluate(org.apache.hadoop.io.FloatWritable i)
Convert from float to an integer. This is called for CAST(... AS INT)

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

evaluate

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

Parameters:
i - The double value to convert
Returns:
IntWritable

evaluate

public org.apache.hadoop.io.IntWritable evaluate(org.apache.hadoop.io.Text i)
Convert from string to an integer. This is called for CAST(... AS INT)

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

evaluate

public org.apache.hadoop.io.IntWritable evaluate(TimestampWritable i)
Convert from Timestamp to an integer. This is called for CAST(... AS INT)

Parameters:
i - The Timestamp value to convert
Returns:
IntWritable

evaluate

public org.apache.hadoop.io.IntWritable evaluate(HiveDecimalWritable i)


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