@Internal
public interface HiveFunction
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.flink.table.types.DataType |
getHiveResultType(Object[] constantArguments,
org.apache.flink.table.types.DataType[] argTypes)
Get result type by arguments and argTypes.
|
void |
setArgumentTypesAndConstants(Object[] constantArguments,
org.apache.flink.table.types.DataType[] argTypes)
Set arguments and argTypes for Function instance.
|
void setArgumentTypesAndConstants(Object[] constantArguments, org.apache.flink.table.types.DataType[] argTypes)
constantArguments - arguments of a function call (only literal arguments
are passed, nulls for non-literal ones)argTypes - types of argumentsorg.apache.flink.table.types.DataType getHiveResultType(Object[] constantArguments, org.apache.flink.table.types.DataType[] argTypes)
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–2020 The Apache Software Foundation. All rights reserved.