Interface FunctionCatalog
- All Superinterfaces:
CatalogPlugin
- All Known Subinterfaces:
CatalogExtension
- All Known Implementing Classes:
DelegatingCatalogExtension
Catalog methods for working with Functions.
- Since:
- 3.2.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
functionExists
(Identifier ident) Returns true if the function exists, false otherwise.listFunctions
(String[] namespace) List the functions in a namespace from the catalog.loadFunction
(Identifier ident) Load a function byidentifier
from the catalog.Methods inherited from interface org.apache.spark.sql.connector.catalog.CatalogPlugin
defaultNamespace, initialize, name
-
Method Details
-
listFunctions
Identifier[] listFunctions(String[] namespace) throws org.apache.spark.sql.catalyst.analysis.NoSuchNamespaceException List the functions in a namespace from the catalog.If there are no functions in the namespace, implementations should return an empty array.
- Parameters:
namespace
- a multi-part namespace- Returns:
- an array of Identifiers for functions
- Throws:
org.apache.spark.sql.catalyst.analysis.NoSuchNamespaceException
- If the namespace does not exist (optional).
-
loadFunction
UnboundFunction loadFunction(Identifier ident) throws org.apache.spark.sql.catalyst.analysis.NoSuchFunctionException Load a function byidentifier
from the catalog.- Parameters:
ident
- a function identifier- Returns:
- an unbound function instance
- Throws:
org.apache.spark.sql.catalyst.analysis.NoSuchFunctionException
- If the function doesn't exist
-
functionExists
Returns true if the function exists, false otherwise.- Since:
- 3.3.0
-