@Internal public class HiveGenericUDF extends HiveScalarFunction<org.apache.hadoop.hive.ql.udf.generic.GenericUDF>
GenericUDF
.argTypes, constantArguments, function, hiveFunctionWrapper, returnInspector
Constructor and Description |
---|
HiveGenericUDF(HiveFunctionWrapper<org.apache.hadoop.hive.ql.udf.generic.GenericUDF> hiveFunctionWrapper,
HiveShim hiveShim) |
Modifier and Type | Method and Description |
---|---|
Object |
evalInternal(Object[] args)
Evaluation logical, args will be wrapped when is a single array.
|
DataType |
getHiveResultType(Object[] constantArguments,
DataType[] argTypes)
Get result type by arguments and argTypes.
|
void |
openInternal()
|
eval, getResultType, isDeterministic, open, setArgumentTypesAndConstants
getKind, getParameterTypes, getTypeInference
close, functionIdentifier, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRequirements
public HiveGenericUDF(HiveFunctionWrapper<org.apache.hadoop.hive.ql.udf.generic.GenericUDF> hiveFunctionWrapper, HiveShim hiveShim)
public void openInternal()
HiveScalarFunction
openInternal
in class HiveScalarFunction<org.apache.hadoop.hive.ql.udf.generic.GenericUDF>
public Object evalInternal(Object[] args)
HiveScalarFunction
evalInternal
in class HiveScalarFunction<org.apache.hadoop.hive.ql.udf.generic.GenericUDF>
public DataType getHiveResultType(Object[] constantArguments, DataType[] argTypes)
HiveFunction
We can't use getResultType(Object[], Class[]). The Class[] is the classes of what is defined in eval(), for example, if eval() is "public Integer eval(Double)", the argTypes would be Class[Double]. However, in our wrapper, the signature of eval() is "public Object eval(Object... args)", which means we cannot get any info from the interface.
constantArguments
- arguments of a function call (only literal arguments are passed,
nulls for non-literal ones)argTypes
- types of argumentsCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.