Class ScalarFunctionImpl
- java.lang.Object
-
- org.apache.beam.sdk.extensions.sql.impl.UdfImplReflectiveFunctionBase
-
- org.apache.beam.sdk.extensions.sql.impl.ScalarFunctionImpl
-
- All Implemented Interfaces:
org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.Function,org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.ImplementableFunction,org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.ScalarFunction
public class ScalarFunctionImpl extends UdfImplReflectiveFunctionBase implements org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.ScalarFunction, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.ImplementableFunction
Beam-customized version fromScalarFunctionImpl, to address BEAM-5921.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.beam.sdk.extensions.sql.impl.UdfImplReflectiveFunctionBase
UdfImplReflectiveFunctionBase.ParameterListBuilder
-
-
Field Summary
-
Fields inherited from class org.apache.beam.sdk.extensions.sql.impl.UdfImplReflectiveFunctionBase
method, parameters
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedScalarFunctionImpl(java.lang.reflect.Method method, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementor implementor)protectedScalarFunctionImpl(java.lang.reflect.Method method, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementor implementor, java.lang.String jarPath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.Functioncreate(java.lang.reflect.Method method)CreatesFunctionfrom given method.static org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.Functioncreate(java.lang.reflect.Method method, java.lang.String jarPath)Createsorg.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.Functionfrom given method.static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableMultimap<java.lang.String,org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.Function>createAll(java.lang.Class<?> clazz)CreatesFunctionfor each method in a given class.protected static org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementorcreateImplementor(java.lang.reflect.Method method)org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementorgetImplementor()java.lang.StringgetJarPath()Optional Beam filesystem path to the jar containing the bytecode for this function.org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.type.RelDataTypegetReturnType(org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.type.RelDataTypegetReturnType(org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.sql.SqlOperatorBinding opBinding)protected static voidvalidateMethod(java.lang.reflect.Method method)-
Methods inherited from class org.apache.beam.sdk.extensions.sql.impl.UdfImplReflectiveFunctionBase
builder, getParameters
-
-
-
-
Constructor Detail
-
ScalarFunctionImpl
protected ScalarFunctionImpl(java.lang.reflect.Method method, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementor implementor, java.lang.String jarPath)
-
ScalarFunctionImpl
protected ScalarFunctionImpl(java.lang.reflect.Method method, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementor implementor)
-
-
Method Detail
-
getJarPath
public java.lang.String getJarPath()
Optional Beam filesystem path to the jar containing the bytecode for this function. Empty if the function is assumed to already be on the classpath.
-
createAll
public static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableMultimap<java.lang.String,org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.Function> createAll(java.lang.Class<?> clazz)
CreatesFunctionfor each method in a given class.
-
create
public static org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.Function create(java.lang.reflect.Method method)
CreatesFunctionfrom given method.- Parameters:
method- method that is used to implement the function- Returns:
- created
Function
-
create
public static org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.Function create(java.lang.reflect.Method method, java.lang.String jarPath)Createsorg.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.Functionfrom given method.- Parameters:
method- method that is used to implement the functionjarPath- Path to jar that contains the method.- Returns:
- created
Function
-
validateMethod
protected static void validateMethod(java.lang.reflect.Method method)
-
getReturnType
public org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.type.RelDataType getReturnType(org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)
- Specified by:
getReturnTypein interfaceorg.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.ScalarFunction
-
getImplementor
public org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementor getImplementor()
- Specified by:
getImplementorin interfaceorg.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.ImplementableFunction
-
createImplementor
protected static org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementor createImplementor(java.lang.reflect.Method method)
-
getReturnType
public org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.type.RelDataType getReturnType(org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.sql.SqlOperatorBinding opBinding)
-
-