bowenli86 commented on a change in pull request #8390: [FLINK-12469][table] 
Clean up catalog API on default/current database
URL: https://github.com/apache/flink/pull/8390#discussion_r283436850
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/GenericInMemoryCatalog.java
 ##########
 @@ -65,9 +64,15 @@
        private final Map<ObjectPath, Map<CatalogPartitionSpec, 
CatalogColumnStatistics>> partitionColumnStats;
 
        public GenericInMemoryCatalog(String name) {
+               this(name, DEFAULT_DB);
+       }
+
+       public GenericInMemoryCatalog(String name, String defaultDatabase) {
 
 Review comment:
   I'm not in favor of that for a couple reasons. 1) Currently yaml file is 
misused as some kind of "file-based catalog" where users can define metadata 
like tables, views, etc. The effort of unified catalog API is to correct that 
misuse by moving metadata out and only keep configuration values in yaml. The 
above proposed format in which allows users to define database would lead us 
back to the misuse case. 2)  in-memory catalog is mainly used for 
back-compatibility and when users want to experiment with Flink. We don't 
expect/recommend users to set an in-memory catalog in yaml file besides the 
default one. 
   
   To take a step back, I think we can clearly define that users can only set 
default db for a persistent catalog, and not in-memory catalog, as no db except 
the "build-in" db will be existent upon initialization of in-memory catalog. 
What do you think?

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

Reply via email to