public class UDFHour extends UDF
Constructor and Description |
---|
UDFHour() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.io.IntWritable |
evaluate(HiveIntervalDayTimeWritable i) |
org.apache.hadoop.io.IntWritable |
evaluate(org.apache.hadoop.io.Text dateString)
Get the hour from a date string.
|
org.apache.hadoop.io.IntWritable |
evaluate(TimestampWritable t) |
getRequiredFiles, getRequiredJars, getResolver, setResolver
public org.apache.hadoop.io.IntWritable evaluate(org.apache.hadoop.io.Text dateString)
dateString
- the dateString in the format of "yyyy-MM-dd HH:mm:ss" or
"yyyy-MM-dd".public org.apache.hadoop.io.IntWritable evaluate(TimestampWritable t)
public org.apache.hadoop.io.IntWritable evaluate(HiveIntervalDayTimeWritable i)
Copyright © 2016 The Apache Software Foundation. All rights reserved.