@@ -64,11 +64,13 @@ abstract class SessionCatalog(catalog: ExternalCatalog) {
6464 // sessions as their metadata is persisted in the underlying catalog.
6565 // ----------------------------------------------------------------------------
6666
67- // Methods that interact with metastore tables only.
67+ // ----------------------------------------------------
68+ // | Methods that interact with metastore tables only |
69+ // ----------------------------------------------------
6870
6971 /**
7072 * Create a metastore table in the database specified in `tableDefinition`.
71- * If no such table is specified, create it in the current database.
73+ * If no such database is specified, create it in the current database.
7274 */
7375 def createTable (
7476 currentDb : String ,
@@ -78,17 +80,23 @@ abstract class SessionCatalog(catalog: ExternalCatalog) {
7880 /**
7981 * Alter the metadata of an existing metastore table identified by `tableDefinition`.
8082 *
83+ * If no database is specified in `tableDefinition`, assume the table is in the
84+ * current database.
85+ *
8186 * Note: If the underlying implementation does not support altering a certain field,
8287 * this becomes a no-op.
8388 */
84- def alterTable (tableDefinition : CatalogTable ): Unit
89+ def alterTable (currentDb : String , tableDefinition : CatalogTable ): Unit
8590
8691 /**
8792 * Retrieve the metadata of an existing metastore table.
93+ * If no database is specified, assume the table is in the current database.
8894 */
89- def getTable (name : TableIdentifier ): CatalogTable
95+ def getTable (currentDb : String , name : TableIdentifier ): CatalogTable
9096
91- // Methods that interact with temporary tables and metastore tables.
97+ // -------------------------------------------------------------
98+ // | Methods that interact with temporary and metastore tables |
99+ // -------------------------------------------------------------
92100
93101 /**
94102 * Create a temporary table.
@@ -208,7 +216,9 @@ abstract class SessionCatalog(catalog: ExternalCatalog) {
208216 // their metadata is persisted in the underlying catalog.
209217 // ----------------------------------------------------------------------------
210218
211- // Methods that interact with metastore functions only.
219+ // -------------------------------------------------------
220+ // | Methods that interact with metastore functions only |
221+ // -------------------------------------------------------
212222
213223 def createFunction (currentDb : String , funcDefinition : CatalogFunction ): Unit
214224
@@ -223,7 +233,9 @@ abstract class SessionCatalog(catalog: ExternalCatalog) {
223233 */
224234 def alterFunction (currentDb : String , funcDefinition : CatalogFunction ): Unit
225235
226- // Methods that interact with temporary functions and metastore functions.
236+ // ----------------------------------------------------------------
237+ // | Methods that interact with temporary and metastore functions |
238+ // ----------------------------------------------------------------
227239
228240 def createTempFunction (funcDefinition : CatalogFunction ): Unit
229241
0 commit comments