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

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

public class UDFToByte
extends UDF


Constructor Summary
UDFToByte()
           
 
Method Summary
 Byte evaluate(Boolean i)
          Convert from boolean to a byte.
 Byte evaluate(Date i)
          Convert from date to a Byte.
 Byte evaluate(Double i)
          Convert from double to a byte.
 Byte evaluate(Float i)
          Convert from float to a byte.
 Byte evaluate(Integer i)
          Convert from integer to a byte.
 Byte evaluate(Long i)
          Convert from long to a byte.
 Byte evaluate(Short i)
          Convert from short to a byte.
 Byte evaluate(String i)
          Convert from string to a byte.
 Byte evaluate(Void i)
          Convert from void to a byte.
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.UDF
getResolver, setResolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UDFToByte

public UDFToByte()
Method Detail

evaluate

public Byte evaluate(Void i)
Convert from void to a byte. This is called for CAST(... AS TINYINT)

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

evaluate

public Byte evaluate(Boolean i)
Convert from boolean to a byte. This is called for CAST(... AS TINYINT)

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

evaluate

public Byte evaluate(Short i)
Convert from short to a byte. This is called for CAST(... AS TINYINT)

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

evaluate

public Byte evaluate(Integer i)
Convert from integer to a byte. This is called for CAST(... AS TINYINT)

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

evaluate

public Byte evaluate(Long i)
Convert from long to a byte. This is called for CAST(... AS TINYINT)

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

evaluate

public Byte evaluate(Float i)
Convert from float to a byte. This is called for CAST(... AS TINYINT)

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

evaluate

public Byte evaluate(Double i)
Convert from double to a byte. This is called for CAST(... AS TINYINT)

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

evaluate

public Byte evaluate(String i)
Convert from string to a byte. This is called for CAST(... AS TINYINT)

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

evaluate

public Byte evaluate(Date i)
Convert from date to a Byte. This is called for CAST(... AS TINYINT)

Parameters:
i - The date value to convert
Returns:
Byte


Copyright © 2009 The Apache Software Foundation