Package org.apache.calcite.schema.impl
Class ScalarFunctionImpl
java.lang.Object
org.apache.calcite.schema.impl.ReflectiveFunctionBase
org.apache.calcite.schema.impl.ScalarFunctionImpl
- All Implemented Interfaces:
- Function,- ImplementableFunction,- ScalarFunction
public class ScalarFunctionImpl
extends ReflectiveFunctionBase
implements ScalarFunction, ImplementableFunction
Implementation of 
ScalarFunction.- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.calcite.schema.impl.ReflectiveFunctionBaseReflectiveFunctionBase.ParameterListBuilder
- 
Field SummaryFields inherited from class org.apache.calcite.schema.impl.ReflectiveFunctionBasemethod, parameters
- 
Method SummaryModifier and TypeMethodDescriptionstatic @Nullable ScalarFunctionCreatesScalarFunctionfrom given class.static ScalarFunctionCreatesScalarFunctionfrom given method.static com.google.common.collect.ImmutableMultimap<String,ScalarFunction> Deprecated.static ScalarFunctioncreateUnsafe(Method method) Creates unsafe version ofScalarFunctionfrom any method.Returns a map of all functions based on the methods in a given class.Returns implementor that translates the function to linq4j expression.getReturnType(RelDataTypeFactory typeFactory) Returns the return type of this function, constructed using the given type factory.getReturnType(RelDataTypeFactory typeFactory, SqlOperatorBinding opBinding) Methods inherited from class org.apache.calcite.schema.impl.ReflectiveFunctionBasebuilder, getParametersMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.schema.FunctiongetParameters
- 
Method Details- 
createAll@Deprecated public static com.google.common.collect.ImmutableMultimap<String,ScalarFunction> createAll(Class<?> clazz) Deprecated.CreatesScalarFunctionfor each method in a given class.
- 
functionspublic static com.google.common.collect.ImmutableMultimap<String,Function> functions(Class<?> clazz) Returns a map of all functions based on the methods in a given class. It is keyed by method names and maps to bothScalarFunctionandTableFunction.
- 
createCreatesScalarFunctionfrom given class.If a method of the given name is not found, or it does not suit, returns null.- Parameters:
- clazz- class that is used to implement the function
- methodName- Method name (typically "eval")
- Returns:
- created ScalarFunctionor null
 
- 
create- Parameters:
- method- method that is used to implement the function
- Returns:
- created ScalarFunctionor null
 
- 
createUnsafeCreates unsafe version ofScalarFunctionfrom any method. The method does not need to be static or belong to a class with default constructor. It is the responsibility of the underlying engine to initialize the UDF object that contain the method.- Parameters:
- method- method that is used to implement the function
 
- 
getReturnTypeDescription copied from interface:ScalarFunctionReturns the return type of this function, constructed using the given type factory.- Specified by:
- getReturnTypein interface- ScalarFunction
- Parameters:
- typeFactory- Type factory
 
- 
getImplementorDescription copied from interface:ImplementableFunctionReturns implementor that translates the function to linq4j expression.- Specified by:
- getImplementorin interface- ImplementableFunction
- Returns:
- implementor that translates the function to linq4j expression.
 
- 
getReturnType
 
-