Class FunctionImpls

java.lang.Object
org.apache.gravitino.function.FunctionImpls

public class FunctionImpls extends Object
Helper methods to create FunctionImpl instances.
  • Constructor Details

    • FunctionImpls

      public FunctionImpls()
  • Method Details

    • of

      public static FunctionImpl[] of(FunctionImpl... impls)
      Copy an array of function implementations.
      Parameters:
      impls - The function implementations.
      Returns:
      A copy of the input array.
    • ofSql

      public static SQLImpl ofSql(FunctionImpl.RuntimeType runtime, String sql)
      Create a SQL implementation.
      Parameters:
      runtime - Target runtime.
      sql - SQL text body.
      Returns:
      A SQLImpl instance.
    • ofSql

      public static SQLImpl ofSql(FunctionImpl.RuntimeType runtime, String sql, FunctionResources resources, Map<String,String> properties)
      Create a SQL implementation.
      Parameters:
      runtime - Target runtime.
      sql - SQL text body.
      resources - External resources required by the implementation.
      properties - Additional implementation properties.
      Returns:
      A SQLImpl instance.
    • ofJava

      public static JavaImpl ofJava(FunctionImpl.RuntimeType runtime, String className)
      Create a Java implementation.
      Parameters:
      runtime - Target runtime.
      className - Fully qualified class name.
      Returns:
      A JavaImpl instance.
    • ofJava

      public static JavaImpl ofJava(FunctionImpl.RuntimeType runtime, String className, FunctionResources resources, Map<String,String> properties)
      Create a Java implementation.
      Parameters:
      runtime - Target runtime.
      className - Fully qualified class name.
      resources - External resources required by the implementation.
      properties - Additional implementation properties.
      Returns:
      A JavaImpl instance.
    • ofPython

      public static PythonImpl ofPython(FunctionImpl.RuntimeType runtime, String handler)
      Create a Python implementation.
      Parameters:
      runtime - Target runtime.
      handler - Python handler entrypoint.
      Returns:
      A PythonImpl instance.
    • ofPython

      public static PythonImpl ofPython(FunctionImpl.RuntimeType runtime, String handler, String codeBlock, FunctionResources resources, Map<String,String> properties)
      Create a Python implementation.
      Parameters:
      runtime - Target runtime.
      handler - Python handler entrypoint.
      codeBlock - Inline code block for the handler.
      resources - External resources required by the implementation.
      properties - Additional implementation properties.
      Returns:
      A PythonImpl instance.