xuefuz commented on a change in pull request #8404: [FLINK-11476][table] Create 
CatalogManager to manage multiple catalogs
URL: https://github.com/apache/flink/pull/8404#discussion_r282961373
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableEnvironment.java
 ##########
 @@ -280,6 +316,55 @@
         */
        void sqlUpdate(String stmt, QueryConfig config);
 
+       /**
+        * Gets the current default catalog name of the current session.
+        *
+        * @return the current default catalog that is used for path resolution
+        * @see TableEnvironment#setCurrentCatalog(String)
+        */
+       String getCurrentCatalogName();
+
+       /**
+        * Sets the current catalog to the given value. It also sets the default
+        * database to the catalog's default one. To assign both catalog and 
database explicitly
+        * see {@link TableEnvironment#setCurrentDatabase(String, String)}.
+        *
+        * <p>This is used during resolution of object paths. The default path 
is constructed as
+        * {@code [current-catalog].[current.database]}. During the resolution, 
first we try to look for
+        * {@code [default-path].[object-path]} if no object is found we assume 
the object path is a fully
+        * qualified one and we look for {@code [object-path]}.
+        *
+        * @param name name of the catalog to set as current default catalog
+        * @throws CatalogNotExistException thrown if the catalog doesn't exist
+        */
+       void setCurrentCatalog(String name) throws CatalogNotExistException;
+
+       /**
+        * Gets the current default database name of the running session.
+        *
+        * @return the current database of the current catalog
+        * @see TableEnvironment#setCurrentDatabase(String, String)
+        */
+       String getCurrentDatabaseName();
+
+       /**
+        * Sets the current default catalog and database. That path will be 
used as the default one
+        * when looking for unqualified object names.
+        *
+        * <p>This is used during resolution of object paths. The default path 
is constructed as
+        * {@code [current-catalog].[current.database]}. During the resolution, 
first we try to look for
 
 Review comment:
   should it be [current-database]?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to