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_28_0.org.apache.calcite.schema.Function
,org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.schema.ImplementableFunction
,org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.schema.ScalarFunction
- Direct Known Subclasses:
ZetaSqlScalarFunctionImpl
public class ScalarFunctionImpl
extends UdfImplReflectiveFunctionBase
implements org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.schema.ScalarFunction, org.apache.beam.vendor.calcite.v1_28_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
ConstructorsModifierConstructorDescriptionprotected
ScalarFunctionImpl
(Method method, org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.adapter.enumerable.CallImplementor implementor) protected
ScalarFunctionImpl
(Method method, org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.adapter.enumerable.CallImplementor implementor, String jarPath) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.schema.Function
CreatesFunction
from given method.static org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.schema.Function
Createsinvalid reference
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.Function
static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableMultimap
<String, org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.schema.Function> CreatesFunction
for each method in a given class.protected static org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.adapter.enumerable.CallImplementor
createImplementor
(Method method) org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.adapter.enumerable.CallImplementor
Optional Beam filesystem path to the jar containing the bytecode for this function.org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rel.type.RelDataType
getReturnType
(org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rel.type.RelDataType
getReturnType
(org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.sql.SqlOperatorBinding opBinding) protected static void
validateMethod
(Method method) Methods inherited from class org.apache.beam.sdk.extensions.sql.impl.UdfImplReflectiveFunctionBase
builder, getParameters
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.schema.Function
getParameters
-
Constructor Details
-
ScalarFunctionImpl
-
ScalarFunctionImpl
protected ScalarFunctionImpl(Method method, org.apache.beam.vendor.calcite.v1_28_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_28_0.org.apache.calcite.schema.Function> createAll(Class<?> clazz) CreatesFunction
for each method in a given class. -
create
public static org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.schema.Function create(Method method) CreatesFunction
from given method. Wheneval
method does not suit,null
is returned.- Parameters:
method
- method that is used to implement the function- Returns:
- created
Function
or null
-
create
public static org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.schema.Function create(Method method, String jarPath) Createsinvalid reference
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.Function
eval
method does not suit,null
is returned.- Parameters:
method
- method that is used to implement the functionjarPath
- Path to jar that contains the method.- Returns:
- created
Function
or null
-
validateMethod
-
getReturnType
public org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rel.type.RelDataType getReturnType(org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) - Specified by:
getReturnType
in interfaceorg.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.schema.ScalarFunction
-
getImplementor
public org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.adapter.enumerable.CallImplementor getImplementor()- Specified by:
getImplementor
in interfaceorg.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.schema.ImplementableFunction
-
createImplementor
protected static org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.adapter.enumerable.CallImplementor createImplementor(Method method) -
getReturnType
public org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rel.type.RelDataType getReturnType(org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.sql.SqlOperatorBinding opBinding)
-