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

UDFToByte

public UDFToByte()
Method Detail

evaluate

public ByteWritable evaluate(org.apache.hadoop.io.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(org.apache.hadoop.io.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(ShortWritable 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 ByteWritable evaluate(org.apache.hadoop.io.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(org.apache.hadoop.io.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(org.apache.hadoop.io.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(DoubleWritable 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 ByteWritable evaluate(org.apache.hadoop.io.Text 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 ByteWritable evaluate(TimestampWritable i)

evaluate

public ByteWritable evaluate(HiveDecimalWritable i)


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