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 from
ScalarFunctionImpl , 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
ConstructorsModifierConstructorDescriptionprotectedScalarFunctionImpl(Method method, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementor implementor) protectedScalarFunctionImpl(Method method, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementor implementor, String jarPath) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.FunctionCreatesFunctionfrom given method.static org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.FunctionCreatesfrom given method.invalid reference
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.Functionstatic org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableMultimap<String, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.Function> CreatesFunctionfor each method in a given class.protected static org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementorcreateImplementor(Method method) org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementorOptional 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(Method method) Methods inherited from class org.apache.beam.sdk.extensions.sql.impl.UdfImplReflectiveFunctionBase
builder, getParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.Function
getParameters
-
Constructor Details
-
ScalarFunctionImpl
-
ScalarFunctionImpl
protected ScalarFunctionImpl(Method method, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementor implementor)
-
-
Method Details
-
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<String,org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.Function> createAll(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(Method method) CreatesFunctionfrom given method. Whenevalmethod does not suit,nullis returned.- Parameters:
method- method that is used to implement the function- Returns:
- created
Functionor null
-
create
public static org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.Function create(Method method, String jarPath) Createsfrom given method. Wheninvalid reference
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.Functionevalmethod does not suit,nullis returned.- Parameters:
method- method that is used to implement the functionjarPath- Path to jar that contains the method.- Returns:
- created
Functionor null
-
validateMethod
-
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(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)
-