Package org.apache.gravitino.function
Class FunctionImpls
java.lang.Object
org.apache.gravitino.function.FunctionImpls
Helper methods to create
FunctionImpl instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FunctionImpl[]of(FunctionImpl... impls) Copy an array of function implementations.static JavaImplofJava(FunctionImpl.RuntimeType runtime, String className) Create a Java implementation.static JavaImplofJava(FunctionImpl.RuntimeType runtime, String className, FunctionResources resources, Map<String, String> properties) Create a Java implementation.static PythonImplofPython(FunctionImpl.RuntimeType runtime, String handler) Create a Python implementation.static PythonImplofPython(FunctionImpl.RuntimeType runtime, String handler, String codeBlock, FunctionResources resources, Map<String, String> properties) Create a Python implementation.static SQLImplofSql(FunctionImpl.RuntimeType runtime, String sql) Create a SQL implementation.static SQLImplofSql(FunctionImpl.RuntimeType runtime, String sql, FunctionResources resources, Map<String, String> properties) Create a SQL implementation.
-
Constructor Details
-
FunctionImpls
public FunctionImpls()
-
-
Method Details
-
of
Copy an array of function implementations.- Parameters:
impls- The function implementations.- Returns:
- A copy of the input array.
-
ofSql
Create a SQL implementation.- Parameters:
runtime- Target runtime.sql- SQL text body.- Returns:
- A
SQLImplinstance.
-
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
SQLImplinstance.
-
ofJava
Create a Java implementation.- Parameters:
runtime- Target runtime.className- Fully qualified class name.- Returns:
- A
JavaImplinstance.
-
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
JavaImplinstance.
-
ofPython
Create a Python implementation.- Parameters:
runtime- Target runtime.handler- Python handler entrypoint.- Returns:
- A
PythonImplinstance.
-
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
PythonImplinstance.
-