public class ScalarFunctionImpl extends ReflectiveFunctionBase implements ScalarFunction, ImplementableFunction
ScalarFunction.ReflectiveFunctionBase.ParameterListBuilder| Modifier and Type | Field and Description |
|---|---|
private CallImplementor |
implementor |
method, parameters| Modifier | Constructor and Description |
|---|---|
private |
ScalarFunctionImpl(Method method,
CallImplementor implementor)
Private constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static ScalarFunction |
create(Class<?> clazz,
String methodName)
Creates
ScalarFunction from given class. |
static ScalarFunction |
create(Method method)
Creates
ScalarFunction from given method. |
static com.google.common.collect.ImmutableMultimap<String,ScalarFunction> |
createAll(Class<?> clazz)
Creates
ScalarFunction for each method in
a given class. |
private static CallImplementor |
createImplementor(Method method) |
CallImplementor |
getImplementor()
Returns implementor that translates the function to linq4j expression.
|
private static NullPolicy |
getNullPolicy(Method m) |
RelDataType |
getReturnType(RelDataTypeFactory typeFactory)
Returns the return type of this function, constructed using the given
type factory.
|
RelDataType |
getReturnType(RelDataTypeFactory typeFactory,
SqlOperatorBinding opBinding) |
builder, classHasPublicZeroArgsConstructor, findMethod, getParametersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetParametersprivate final CallImplementor implementor
private ScalarFunctionImpl(Method method, CallImplementor implementor)
public static com.google.common.collect.ImmutableMultimap<String,ScalarFunction> createAll(Class<?> clazz)
ScalarFunction for each method in
a given class.public static ScalarFunction create(Class<?> clazz, String methodName)
ScalarFunction from given class.
If a method of the given name is not found or it does not suit,
returns null.
clazz - class that is used to implement the functionmethodName - Method name (typically "eval")ScalarFunction or nullpublic static ScalarFunction create(Method method)
method - method that is used to implement the functionScalarFunction or nullpublic RelDataType getReturnType(RelDataTypeFactory typeFactory)
ScalarFunctiongetReturnType in interface ScalarFunctiontypeFactory - Type factorypublic CallImplementor getImplementor()
ImplementableFunctiongetImplementor in interface ImplementableFunctionprivate static CallImplementor createImplementor(Method method)
private static NullPolicy getNullPolicy(Method m)
public RelDataType getReturnType(RelDataTypeFactory typeFactory, SqlOperatorBinding opBinding)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.