Airblader commented on a change in pull request #18146:
URL: https://github.com/apache/flink/pull/18146#discussion_r771847905



##########
File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogManager.java
##########
@@ -538,16 +538,16 @@ public CatalogBaseTable getTable() {
 
     /**
      * Returns an array of names of all views(both temporary and permanent) 
registered in the
-     * namespace of the current catalog and database.
+     * namespace of the given catalog and database.
      *
      * @return names of registered views
      */
     public Set<String> listViews(String catalogName, String databaseName) {
-        Catalog currentCatalog = catalogs.get(getCurrentCatalog());
+        Catalog catalog = catalogs.get(catalogName);
 
         try {
             return Stream.concat(
-                            
currentCatalog.listViews(getCurrentDatabase()).stream(),
+                            catalog.listViews(databaseName).stream(),

Review comment:
       Can we also fix the exception message a few lines below in case the 
database doesn't exist?




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to