public class GenericUDFOPDTIPlus extends GenericUDFBaseDTI
GenericUDF.DeferredJavaObject, GenericUDF.DeferredObject
Modifier and Type | Field and Description |
---|---|
protected DateWritable |
dateResult |
protected int |
dtArgIdx |
protected ObjectInspectorConverters.Converter |
dtConverter |
protected DateTimeMath |
dtm |
protected int |
intervalArg1Idx |
protected int |
intervalArg2Idx |
protected HiveIntervalDayTimeWritable |
intervalDayTimeResult |
protected HiveIntervalYearMonthWritable |
intervalYearMonthResult |
protected org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPDTIPlus.OperationType |
plusOpType |
protected TimestampWritable |
timestampResult |
inputOIs
opDisplayName, opName
Constructor and Description |
---|
GenericUDFOPDTIPlus() |
Modifier and Type | Method and Description |
---|---|
Object |
evaluate(GenericUDF.DeferredObject[] arguments)
Evaluate the GenericUDF with the arguments.
|
protected DateWritable |
handleDateResult(Date result) |
protected HiveIntervalDayTimeWritable |
handleIntervalDayTimeResult(HiveIntervalDayTime result) |
protected HiveIntervalYearMonthWritable |
handleIntervalYearMonthResult(HiveIntervalYearMonth result) |
protected TimestampWritable |
handleTimestampResult(Timestamp result) |
ObjectInspector |
initialize(ObjectInspector[] arguments)
Initialize this GenericUDF.
|
checkArgs
getDisplayString
checkArgGroups, checkArgPrimitive, checkArgsSize, close, configure, copyToNewInstance, flip, getArgOrder, getConstantIntValue, getConstantLongValue, getConstantStringValue, getDateValue, getDoubleValue, getFuncName, getIntValue, getLongValue, getRequiredFiles, getRequiredJars, getStandardDisplayString, getStandardDisplayString, getStringValue, getTimestampValue, getUdfName, initializeAndFoldConstants, negative, obtainDateConverter, obtainDoubleConverter, obtainIntConverter, obtainLongConverter, obtainStringConverter, obtainTimestampConverter
protected transient DateTimeMath dtm
protected transient org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPDTIPlus.OperationType plusOpType
protected transient int intervalArg1Idx
protected transient int intervalArg2Idx
protected transient int dtArgIdx
protected transient ObjectInspectorConverters.Converter dtConverter
protected transient TimestampWritable timestampResult
protected transient DateWritable dateResult
protected transient HiveIntervalDayTimeWritable intervalDayTimeResult
protected transient HiveIntervalYearMonthWritable intervalYearMonthResult
public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException
GenericUDF
initialize
in class GenericUDF
arguments
- The ObjectInspector for the argumentsUDFArgumentException
- Thrown when arguments have wrong types, wrong length, etc.public Object evaluate(GenericUDF.DeferredObject[] arguments) throws HiveException
GenericUDF
evaluate
in class GenericUDF
arguments
- The arguments as DeferedObject, use DeferedObject.get() to get the
actual argument Object. The Objects can be inspected by the
ObjectInspectors passed in the initialize call.HiveException
protected DateWritable handleDateResult(Date result)
protected TimestampWritable handleTimestampResult(Timestamp result)
protected HiveIntervalYearMonthWritable handleIntervalYearMonthResult(HiveIntervalYearMonth result)
protected HiveIntervalDayTimeWritable handleIntervalDayTimeResult(HiveIntervalDayTime result)
Copyright © 2017 The Apache Software Foundation. All rights reserved.