Class

org.apache.spark.sql.internal

CatalogImpl

Related Doc: package internal

Permalink

class CatalogImpl extends Catalog

Internal implementation of the user-facing Catalog.

Linear Supertypes
Catalog, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CatalogImpl
  2. Catalog
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CatalogImpl(sparkSession: SparkSession)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def cacheTable(tableName: String): Unit

    Permalink

    Caches the specified table or view in-memory.

    Caches the specified table or view in-memory.

    tableName

    is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a temporary view or a table/view in the current database.

    Definition Classes
    CatalogImplCatalog
    Since

    2.0.0

  6. def clearCache(): Unit

    Permalink

    Removes all cached tables or views from the in-memory cache.

    Removes all cached tables or views from the in-memory cache.

    Definition Classes
    CatalogImplCatalog
    Since

    2.0.0

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def createTable(tableName: String, source: String, schema: StructType, options: Map[String, String]): DataFrame

    Permalink

    :: Experimental :: (Scala-specific) Creates a table based on the dataset in a data source, a schema and a set of options.

    :: Experimental :: (Scala-specific) Creates a table based on the dataset in a data source, a schema and a set of options. Then, returns the corresponding DataFrame.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    CatalogImplCatalog
    Annotations
    @Experimental()
    Since

    2.2.0

  9. def createTable(tableName: String, source: String, options: Map[String, String]): DataFrame

    Permalink

    :: Experimental :: (Scala-specific) Creates a table based on the dataset in a data source and a set of options.

    :: Experimental :: (Scala-specific) Creates a table based on the dataset in a data source and a set of options. Then, returns the corresponding DataFrame.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    CatalogImplCatalog
    Annotations
    @Experimental()
    Since

    2.2.0

  10. def createTable(tableName: String, path: String, source: String): DataFrame

    Permalink

    :: Experimental :: Creates a table from the given path and returns the corresponding DataFrame.

    :: Experimental :: Creates a table from the given path and returns the corresponding DataFrame.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    CatalogImplCatalog
    Annotations
    @Experimental()
    Since

    2.2.0

  11. def createTable(tableName: String, path: String): DataFrame

    Permalink

    :: Experimental :: Creates a table from the given path and returns the corresponding DataFrame.

    :: Experimental :: Creates a table from the given path and returns the corresponding DataFrame. It will use the default data source configured by spark.sql.sources.default.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    CatalogImplCatalog
    Annotations
    @Experimental()
    Since

    2.2.0

  12. def createTable(tableName: String, source: String, schema: StructType, options: Map[String, String]): DataFrame

    Permalink

    :: Experimental :: Create a table based on the dataset in a data source, a schema and a set of options.

    :: Experimental :: Create a table based on the dataset in a data source, a schema and a set of options. Then, returns the corresponding DataFrame.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    Catalog
    Annotations
    @Experimental() @Evolving()
    Since

    2.2.0

  13. def createTable(tableName: String, source: String, options: Map[String, String]): DataFrame

    Permalink

    :: Experimental :: Creates a table based on the dataset in a data source and a set of options.

    :: Experimental :: Creates a table based on the dataset in a data source and a set of options. Then, returns the corresponding DataFrame.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    Catalog
    Annotations
    @Experimental() @Evolving()
    Since

    2.2.0

  14. def currentDatabase: String

    Permalink

    Returns the current default database in this session.

    Returns the current default database in this session.

    Definition Classes
    CatalogImplCatalog
  15. def databaseExists(dbName: String): Boolean

    Permalink

    Checks if the database with the specified name exists.

    Checks if the database with the specified name exists.

    Definition Classes
    CatalogImplCatalog
  16. def dropGlobalTempView(viewName: String): Boolean

    Permalink

    Drops the global temporary view with the given view name in the catalog.

    Drops the global temporary view with the given view name in the catalog. If the view has been cached/persisted before, it's also unpersisted.

    viewName

    the identifier of the global temporary view to be dropped.

    returns

    true if the view is dropped successfully, false otherwise.

    Definition Classes
    CatalogImplCatalog
    Since

    2.1.0

  17. def dropTempView(viewName: String): Boolean

    Permalink

    Drops the local temporary view with the given view name in the catalog.

    Drops the local temporary view with the given view name in the catalog. If the view has been cached/persisted before, it's also unpersisted.

    viewName

    the identifier of the temporary view to be dropped.

    returns

    true if the view is dropped successfully, false otherwise.

    Definition Classes
    CatalogImplCatalog
    Since

    2.0.0

  18. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def functionExists(dbName: String, functionName: String): Boolean

    Permalink

    Checks if the function with the specified name exists in the specified database.

    Checks if the function with the specified name exists in the specified database.

    dbName

    is a name that designates a database.

    functionName

    is an unqualified name that designates a function.

    Definition Classes
    CatalogImplCatalog
  22. def functionExists(functionName: String): Boolean

    Permalink

    Checks if the function with the specified name exists.

    Checks if the function with the specified name exists. This can either be a temporary function or a function.

    functionName

    is either a qualified or unqualified name that designates a function. If no database identifier is provided, it refers to a function in the current database.

    Definition Classes
    CatalogImplCatalog
  23. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  24. def getDatabase(dbName: String): Database

    Permalink

    Gets the database with the specified name.

    Gets the database with the specified name. This throws an AnalysisException when no Database can be found.

    Definition Classes
    CatalogImplCatalog
  25. def getFunction(dbName: String, functionName: String): Function

    Permalink

    Gets the function with the specified name.

    Gets the function with the specified name. This returns None when no Function can be found.

    dbName

    is a name that designates a database.

    functionName

    is an unqualified name that designates a function in the specified database

    Definition Classes
    CatalogImplCatalog
  26. def getFunction(functionName: String): Function

    Permalink

    Gets the function with the specified name.

    Gets the function with the specified name. This function can be a temporary function or a function. This throws an AnalysisException when no Function can be found.

    functionName

    is either a qualified or unqualified name that designates a function. If no database identifier is provided, it refers to a temporary function or a function in the current database.

    Definition Classes
    CatalogImplCatalog
  27. def getTable(dbName: String, tableName: String): Table

    Permalink

    Gets the table or view with the specified name in the specified database.

    Gets the table or view with the specified name in the specified database. This throws an AnalysisException when no Table can be found.

    Definition Classes
    CatalogImplCatalog
  28. def getTable(tableName: String): Table

    Permalink

    Gets the table or view with the specified name.

    Gets the table or view with the specified name. This table can be a temporary view or a table/view. This throws an AnalysisException when no Table can be found.

    tableName

    is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a table/view in the current database.

    Definition Classes
    CatalogImplCatalog
  29. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  30. def isCached(qName: Dataset[_]): Boolean

    Permalink

    Returns true if the Dataset is currently cached in-memory.

    Returns true if the Dataset is currently cached in-memory.

    Attributes
    protected[org.apache.spark.sql]
    Since

    2.0.0

  31. def isCached(tableName: String): Boolean

    Permalink

    Returns true if the table or view is currently cached in-memory.

    Returns true if the table or view is currently cached in-memory.

    tableName

    is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a temporary view or a table/view in the current database.

    Definition Classes
    CatalogImplCatalog
    Since

    2.0.0

  32. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  33. def listColumns(dbName: String, tableName: String): Dataset[catalog.Column]

    Permalink

    Returns a list of columns for the given table/view or temporary view in the specified database.

    Returns a list of columns for the given table/view or temporary view in the specified database.

    dbName

    is a name that designates a database.

    tableName

    is an unqualified name that designates a table/view.

    Definition Classes
    CatalogImplCatalog
    Annotations
    @throws( "database or table does not exist" )
  34. def listColumns(tableName: String): Dataset[catalog.Column]

    Permalink

    Returns a list of columns for the given table/view or temporary view.

    Returns a list of columns for the given table/view or temporary view.

    tableName

    is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a temporary view or a table/view in the current database.

    Definition Classes
    CatalogImplCatalog
    Annotations
    @throws( "table does not exist" )
  35. def listDatabases(): Dataset[Database]

    Permalink

    Returns a list of databases available across all sessions.

    Returns a list of databases available across all sessions.

    Definition Classes
    CatalogImplCatalog
  36. def listFunctions(dbName: String): Dataset[Function]

    Permalink

    Returns a list of functions registered in the specified database.

    Returns a list of functions registered in the specified database. This includes all temporary functions

    Definition Classes
    CatalogImplCatalog
    Annotations
    @throws( "database does not exist" )
  37. def listFunctions(): Dataset[Function]

    Permalink

    Returns a list of functions registered in the current database.

    Returns a list of functions registered in the current database. This includes all temporary functions

    Definition Classes
    CatalogImplCatalog
  38. def listTables(dbName: String): Dataset[Table]

    Permalink

    Returns a list of tables in the specified database.

    Returns a list of tables in the specified database. This includes all temporary tables.

    Definition Classes
    CatalogImplCatalog
    Annotations
    @throws( "database does not exist" )
  39. def listTables(): Dataset[Table]

    Permalink

    Returns a list of tables in the current database.

    Returns a list of tables in the current database. This includes all temporary tables.

    Definition Classes
    CatalogImplCatalog
  40. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  41. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  42. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  43. def recoverPartitions(tableName: String): Unit

    Permalink

    Recovers all the partitions in the directory of a table and update the catalog.

    Recovers all the partitions in the directory of a table and update the catalog. Only works with a partitioned table, and not a temporary view.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    CatalogImplCatalog
    Since

    2.1.1

  44. def refreshByPath(resourcePath: String): Unit

    Permalink

    Refreshes the cache entry and the associated metadata for all Dataset (if any), that contain the given data source path.

    Refreshes the cache entry and the associated metadata for all Dataset (if any), that contain the given data source path. Path matching is by prefix, i.e. "/" would invalidate everything that is cached.

    Definition Classes
    CatalogImplCatalog
    Since

    2.0.0

  45. def refreshTable(tableName: String): Unit

    Permalink

    Invalidates and refreshes all the cached data and metadata of the given table or view.

    Invalidates and refreshes all the cached data and metadata of the given table or view. For Hive metastore table, the metadata is refreshed. For data source tables, the schema will not be inferred and refreshed.

    If this table is cached as an InMemoryRelation, drop the original cached version and make the new version cached lazily.

    tableName

    is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a temporary view or a table/view in the current database.

    Definition Classes
    CatalogImplCatalog
    Since

    2.0.0

  46. def setCurrentDatabase(dbName: String): Unit

    Permalink

    Sets the current default database in this session.

    Sets the current default database in this session.

    Definition Classes
    CatalogImplCatalog
    Annotations
    @throws( "database does not exist" )
  47. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  48. def tableExists(dbName: String, tableName: String): Boolean

    Permalink

    Checks if the table or view with the specified name exists in the specified database.

    Checks if the table or view with the specified name exists in the specified database.

    dbName

    is a name that designates a database.

    tableName

    is an unqualified name that designates a table.

    Definition Classes
    CatalogImplCatalog
  49. def tableExists(tableName: String): Boolean

    Permalink

    Checks if the table or view with the specified name exists.

    Checks if the table or view with the specified name exists. This can either be a temporary view or a table/view.

    tableName

    is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a table/view in the current database.

    Definition Classes
    CatalogImplCatalog
  50. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  51. def uncacheTable(tableName: String): Unit

    Permalink

    Removes the specified table or view from the in-memory cache.

    Removes the specified table or view from the in-memory cache.

    tableName

    is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a temporary view or a table/view in the current database.

    Definition Classes
    CatalogImplCatalog
    Since

    2.0.0

  52. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def createExternalTable(tableName: String, source: String, schema: StructType, options: Map[String, String]): DataFrame

    Permalink

    (Scala-specific) Create a table from the given path based on a data source, a schema and a set of options.

    (Scala-specific) Create a table from the given path based on a data source, a schema and a set of options. Then, returns the corresponding DataFrame.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    Catalog
    Annotations
    @deprecated
    Deprecated

    (Since version 2.2.0) use createTable instead.

    Since

    2.0.0

  2. def createExternalTable(tableName: String, source: String, schema: StructType, options: Map[String, String]): DataFrame

    Permalink

    :: Experimental :: Create a table from the given path based on a data source, a schema and a set of options.

    :: Experimental :: Create a table from the given path based on a data source, a schema and a set of options. Then, returns the corresponding DataFrame.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    Catalog
    Annotations
    @deprecated
    Deprecated

    (Since version 2.2.0) use createTable instead.

    Since

    2.0.0

  3. def createExternalTable(tableName: String, source: String, options: Map[String, String]): DataFrame

    Permalink

    (Scala-specific) Creates a table from the given path based on a data source and a set of options.

    (Scala-specific) Creates a table from the given path based on a data source and a set of options. Then, returns the corresponding DataFrame.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    Catalog
    Annotations
    @deprecated
    Deprecated

    (Since version 2.2.0) use createTable instead.

    Since

    2.0.0

  4. def createExternalTable(tableName: String, source: String, options: Map[String, String]): DataFrame

    Permalink

    Creates a table from the given path based on a data source and a set of options.

    Creates a table from the given path based on a data source and a set of options. Then, returns the corresponding DataFrame.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    Catalog
    Annotations
    @deprecated
    Deprecated

    (Since version 2.2.0) use createTable instead.

    Since

    2.0.0

  5. def createExternalTable(tableName: String, path: String, source: String): DataFrame

    Permalink

    Creates a table from the given path based on a data source and returns the corresponding DataFrame.

    Creates a table from the given path based on a data source and returns the corresponding DataFrame.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    Catalog
    Annotations
    @deprecated
    Deprecated

    (Since version 2.2.0) use createTable instead.

    Since

    2.0.0

  6. def createExternalTable(tableName: String, path: String): DataFrame

    Permalink

    Creates a table from the given path and returns the corresponding DataFrame.

    Creates a table from the given path and returns the corresponding DataFrame. It will use the default data source configured by spark.sql.sources.default.

    tableName

    is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

    Definition Classes
    Catalog
    Annotations
    @deprecated
    Deprecated

    (Since version 2.2.0) use createTable instead.

    Since

    2.0.0

Inherited from Catalog

Inherited from AnyRef

Inherited from Any

cachemgmt

ddl_ops

Ungrouped