Class FunctionRegistry


  • public class FunctionRegistry
    extends Object
    Registry for scalar functions.

    TODO: Merge FunctionRegistry and FunctionDefinitionRegistry to provide one single registry for all functions.

    • Method Detail

      • init

        public static void init()
        Initializes the FunctionRegistry. NOTE: This method itself is a NO-OP, but can be used to explicitly trigger the static block of registering the scalar functions via reflection.
      • registerFunction

        public static void registerFunction​(Method method,
                                            boolean nullableParameters)
        Registers a method with the name of the method.
      • registerFunction

        public static void registerFunction​(String functionName,
                                            Method method,
                                            boolean nullableParameters)
        Registers a method with the given function name.
      • containsFunction

        public static boolean containsFunction​(String functionName)
        Returns true if the given function name is registered, false otherwise.
      • getFunctionInfo

        @Nullable
        public static FunctionInfo getFunctionInfo​(String functionName,
                                                   int numParameters)
        Returns the FunctionInfo associated with the given function name and number of parameters, or null if there is no matching method. This method should be called after the FunctionRegistry is initialized and all methods are already registered.