@Internal public interface HiveFunction
Modifier and Type | Method and Description |
---|---|
DataType |
getHiveResultType(Object[] constantArguments,
DataType[] argTypes)
Get result type by arguments and argTypes.
|
void |
setArgumentTypesAndConstants(Object[] constantArguments,
DataType[] argTypes)
Set arguments and argTypes for Function instance.
|
void setArgumentTypesAndConstants(Object[] constantArguments, DataType[] argTypes)
constantArguments
- arguments of a function call (only literal arguments
are passed, nulls for non-literal ones)argTypes
- types of argumentsDataType getHiveResultType(Object[] constantArguments, 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.