@Internal
public abstract class HiveScalarFunction<UDFType>
extends org.apache.flink.table.functions.ScalarFunction
UDF and GenericUDF functions.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.flink.table.types.DataType[] |
argTypes |
protected Object[] |
constantArguments |
protected UDFType |
function |
protected HiveFunctionWrapper<UDFType> |
hiveFunctionWrapper |
protected org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector |
returnInspector |
| Modifier and Type | Method and Description |
|---|---|
Object |
eval(Object... args) |
protected abstract Object |
evalInternal(Object[] args)
Evaluation logical, args will be wrapped when is a single array.
|
org.apache.flink.table.types.inference.TypeInference |
getTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory) |
protected abstract org.apache.flink.table.types.DataType |
inferReturnType()
Infer return type of this function call.
|
boolean |
isDeterministic() |
void |
open(org.apache.flink.table.functions.FunctionContext context) |
protected abstract void |
openInternal()
See
UserDefinedFunction.open(FunctionContext). |
getKind, getParameterTypes, getResultTypeclose, functionIdentifier, toStringprotected final HiveFunctionWrapper<UDFType> hiveFunctionWrapper
protected Object[] constantArguments
protected org.apache.flink.table.types.DataType[] argTypes
protected transient UDFType function
protected transient org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector returnInspector
public boolean isDeterministic()
public void open(org.apache.flink.table.functions.FunctionContext context)
open in class org.apache.flink.table.functions.UserDefinedFunctionpublic org.apache.flink.table.types.inference.TypeInference getTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory)
getTypeInference in interface org.apache.flink.table.functions.FunctionDefinitiongetTypeInference in class org.apache.flink.table.functions.ScalarFunctionprotected abstract void openInternal()
UserDefinedFunction.open(FunctionContext).protected abstract Object evalInternal(Object[] args)
protected abstract org.apache.flink.table.types.DataType inferReturnType()
throws org.apache.hadoop.hive.ql.exec.UDFArgumentException
org.apache.hadoop.hive.ql.exec.UDFArgumentExceptionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.