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

UDFToByte.


Constructor Summary
UDFToByte()
           
 
Method Summary
 ByteWritable evaluate(BooleanWritable i)
          Convert from boolean to a byte.
 ByteWritable evaluate(FloatWritable i)
          Convert from float to a byte.
 ByteWritable evaluate(IntWritable i)
          Convert from integer to a byte.
 ByteWritable evaluate(LongWritable i)
          Convert from long to a byte.
 ByteWritable evaluate(NullWritable i)
          Convert from void to a byte.
 ByteWritable evaluate(Text i)
          Convert from string to a byte.
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.UDF
getRequiredFiles, getRequiredJars, 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 ByteWritable evaluate(NullWritable 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 ByteWritable evaluate(BooleanWritable 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 ByteWritable evaluate(IntWritable 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 ByteWritable evaluate(LongWritable 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 ByteWritable evaluate(FloatWritable 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 ByteWritable evaluate(Text i)
Convert from string to a byte. This is called for CAST(... AS TINYINT)

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


Copyright © 2012 The Apache Software Foundation