bowenli86 commented on a change in pull request #9971: [FLINK-14490][table] Add
methods for interacting with temporary objects
URL: https://github.com/apache/flink/pull/9971#discussion_r338168836
##########
File path:
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/catalog/CatalogCalciteSchema.java
##########
@@ -59,17 +62,34 @@ public CatalogCalciteSchema(boolean isStreamingMode,
String catalogName, Catalog
*/
@Override
public Schema getSubSchema(String schemaName) {
-
- if (catalog.databaseExists(schemaName)) {
- return new DatabaseCalciteSchema(isStreamingMode,
schemaName, catalogName, catalog);
+ if (temporaryDatabaseExists(schemaName) ||
permanentDatabaseExists(schemaName)) {
+ return new DatabaseCalciteSchema(isStreamingMode,
schemaName, catalogName, catalogManager);
} else {
return null;
}
}
+ private boolean temporaryDatabaseExists(String schemaName) {
Review comment:
redundant to those in DatabaseCalciteSchema. Move to CatalogManager?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services