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

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

public class UDFToShort
extends UDF

UDFToShort.


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

UDFToShort

public UDFToShort()
Method Detail

evaluate

public ShortWritable evaluate(org.apache.hadoop.io.NullWritable i)
Convert from void to a short. This is called for CAST(... AS SMALLINT)

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

evaluate

public ShortWritable evaluate(org.apache.hadoop.io.BooleanWritable i)
Convert from boolean to a short. This is called for CAST(... AS SMALLINT)

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

evaluate

public ShortWritable evaluate(ByteWritable i)
Convert from byte to a short. This is called for CAST(... AS SMALLINT)

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

evaluate

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

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

evaluate

public ShortWritable evaluate(org.apache.hadoop.io.LongWritable i)
Convert from long to a short. This is called for CAST(... AS SMALLINT)

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

evaluate

public ShortWritable evaluate(org.apache.hadoop.io.FloatWritable i)
Convert from float to a short. This is called for CAST(... AS SMALLINT)

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

evaluate

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

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

evaluate

public ShortWritable evaluate(org.apache.hadoop.io.Text i)
Convert from string to a short. This is called for CAST(... AS SMALLINT)

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

evaluate

public ShortWritable evaluate(TimestampWritable i)

evaluate

public ShortWritable evaluate(HiveDecimalWritable i)


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