Class SparkFunctionCatalog

  • All Implemented Interfaces:
    org.apache.spark.sql.connector.catalog.CatalogPlugin, org.apache.spark.sql.connector.catalog.FunctionCatalog

    public class SparkFunctionCatalog
    extends java.lang.Object
    A function catalog that can be used to resolve Iceberg functions without a metastore connection.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Default Methods 
      Modifier and Type Method Description
      static SparkFunctionCatalog get()  
      void initialize​(java.lang.String catalogName, org.apache.spark.sql.util.CaseInsensitiveStringMap options)  
      default boolean isExistingNamespace​(java.lang.String[] namespace)  
      default boolean isFunctionNamespace​(java.lang.String[] namespace)  
      default org.apache.spark.sql.connector.catalog.Identifier[] listFunctions​(java.lang.String[] namespace)  
      default org.apache.spark.sql.connector.catalog.functions.UnboundFunction loadFunction​(org.apache.spark.sql.connector.catalog.Identifier ident)  
      java.lang.String name()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.spark.sql.connector.catalog.CatalogPlugin

        defaultNamespace
      • Methods inherited from interface org.apache.spark.sql.connector.catalog.FunctionCatalog

        functionExists
    • Constructor Detail

      • SparkFunctionCatalog

        public SparkFunctionCatalog()
    • Method Detail

      • initialize

        public void initialize​(java.lang.String catalogName,
                               org.apache.spark.sql.util.CaseInsensitiveStringMap options)
        Specified by:
        initialize in interface org.apache.spark.sql.connector.catalog.CatalogPlugin
      • name

        public java.lang.String name()
        Specified by:
        name in interface org.apache.spark.sql.connector.catalog.CatalogPlugin
      • isFunctionNamespace

        public default boolean isFunctionNamespace​(java.lang.String[] namespace)
      • isExistingNamespace

        public default boolean isExistingNamespace​(java.lang.String[] namespace)
      • listFunctions

        public default org.apache.spark.sql.connector.catalog.Identifier[] listFunctions​(java.lang.String[] namespace)
                                                                                  throws org.apache.spark.sql.catalyst.analysis.NoSuchNamespaceException
        Specified by:
        listFunctions in interface org.apache.spark.sql.connector.catalog.FunctionCatalog
        Throws:
        org.apache.spark.sql.catalyst.analysis.NoSuchNamespaceException
      • loadFunction

        public default org.apache.spark.sql.connector.catalog.functions.UnboundFunction loadFunction​(org.apache.spark.sql.connector.catalog.Identifier ident)
                                                                                              throws org.apache.spark.sql.catalyst.analysis.NoSuchFunctionException
        Specified by:
        loadFunction in interface org.apache.spark.sql.connector.catalog.FunctionCatalog
        Throws:
        org.apache.spark.sql.catalyst.analysis.NoSuchFunctionException