public class GenericUDFOPDTIMinus extends GenericUDFBaseDTI
GenericUDF.DeferredJavaObject, GenericUDF.DeferredObject
Modifier and Type | Field and Description |
---|---|
protected DateWritable |
dateResult |
protected ObjectInspectorConverters.Converter |
dt1Converter |
protected ObjectInspectorConverters.Converter |
dt2Converter |
protected int |
dtArg1Idx |
protected int |
dtArg2Idx |
protected DateTimeMath |
dtm |
protected int |
intervalArg1Idx |
protected int |
intervalArg2Idx |
protected HiveIntervalDayTimeWritable |
intervalDayTimeResult |
protected HiveIntervalYearMonthWritable |
intervalYearMonthResult |
protected org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPDTIMinus.OperationType |
minusOpType |
protected TimestampWritable |
timestampResult |
inputOIs
opDisplayName, opName
Constructor and Description |
---|
GenericUDFOPDTIMinus() |
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.GenericUDFOPDTIMinus.OperationType minusOpType
protected transient int intervalArg1Idx
protected transient int intervalArg2Idx
protected transient int dtArg1Idx
protected transient int dtArg2Idx
protected transient ObjectInspectorConverters.Converter dt1Converter
protected transient ObjectInspectorConverters.Converter dt2Converter
protected transient DateWritable dateResult
protected transient TimestampWritable timestampResult
protected transient HiveIntervalYearMonthWritable intervalYearMonthResult
protected transient HiveIntervalDayTimeWritable intervalDayTimeResult
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.