@Internal public class HiveSimpleUDF extends HiveScalarFunction<org.apache.hadoop.hive.ql.exec.UDF>
UDF.argTypes, constantArguments, function, hiveFunctionWrapper, returnInspector| 构造器和说明 |
|---|
HiveSimpleUDF(HiveFunctionWrapper<org.apache.hadoop.hive.ql.exec.UDF> hiveFunctionWrapper,
HiveShim hiveShim) |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
evalInternal(Object[] args)
Evaluation logical, args will be wrapped when is a single array.
|
org.apache.flink.table.types.DataType |
getHiveResultType(Object[] constantArguments,
org.apache.flink.table.types.DataType[] argTypes)
Get result type by arguments and argTypes.
|
void |
openInternal()
See
UserDefinedFunction.open(FunctionContext). |
eval, getResultType, isDeterministic, open, setArgumentTypesAndConstantspublic HiveSimpleUDF(HiveFunctionWrapper<org.apache.hadoop.hive.ql.exec.UDF> hiveFunctionWrapper, HiveShim hiveShim)
public void openInternal()
HiveScalarFunctionUserDefinedFunction.open(FunctionContext).openInternal 在类中 HiveScalarFunction<org.apache.hadoop.hive.ql.exec.UDF>public Object evalInternal(Object[] args)
HiveScalarFunctionevalInternal 在类中 HiveScalarFunction<org.apache.hadoop.hive.ql.exec.UDF>public org.apache.flink.table.types.DataType getHiveResultType(Object[] constantArguments, org.apache.flink.table.types.DataType[] argTypes)
HiveFunctionWe 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–2020 The Apache Software Foundation. All rights reserved.