Class 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.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ScalarFunctionImpl​(java.lang.reflect.Method method, org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementor implementor)  
      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)  
    • 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.Function create​(java.lang.reflect.Method method)
      Creates Function from given method.
      static org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.schema.Function create​(java.lang.reflect.Method method, java.lang.String jarPath)
      Creates org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.Function from 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)
      Creates Function for each method in a given class.
      protected static org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementor createImplementor​(java.lang.reflect.Method method)  
      org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.adapter.enumerable.CallImplementor getImplementor()  
      java.lang.String getJarPath()
      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.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.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)  
      protected static void validateMethod​(java.lang.reflect.Method method)  
      • 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_40_0.org.apache.calcite.schema.Function

        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)
        Creates Function for 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)
        Creates Function from 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)
        Creates org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.Function from given method.
        Parameters:
        method - method that is used to implement the function
        jarPath - 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:
        getReturnType in interface org.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:
        getImplementor in interface org.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)