public class UDFMonth extends UDF
Constructor and Description |
---|
UDFMonth() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.io.IntWritable |
evaluate(org.apache.hadoop.hive.serde2.io.DateWritable d) |
org.apache.hadoop.io.IntWritable |
evaluate(HiveIntervalYearMonthWritable i) |
org.apache.hadoop.io.IntWritable |
evaluate(org.apache.hadoop.io.Text dateString)
Get the month 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(org.apache.hadoop.hive.serde2.io.DateWritable d)
public org.apache.hadoop.io.IntWritable evaluate(TimestampWritable t)
public org.apache.hadoop.io.IntWritable evaluate(HiveIntervalYearMonthWritable i)
Copyright © 2021 The Apache Software Foundation. All rights reserved.