xuefuz commented on a change in pull request #8353: [FLINK-12233][hive] Support 
table related operations in HiveCatalog
URL: https://github.com/apache/flink/pull/8353#discussion_r282321982
 
 

 ##########
 File path: 
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalogBase.java
 ##########
 @@ -89,6 +101,34 @@ private static IMetaStoreClient 
getMetastoreClient(HiveConf hiveConf) {
                }
        }
 
+       // ------ APIs ------
+
+       /**
+        * Validate input base table.
+        *
+        * @param catalogBaseTable the base table to be validated
+        * @throws IllegalArgumentException thrown if the input base table is 
invalid.
+        */
+       protected abstract void validateCatalogBaseTable(CatalogBaseTable 
catalogBaseTable)
 
 Review comment:
   Even though this is not a public API, I feel it should be more formal. 
Specifically, we should probably can let this return true or false for 
validation result, rather than relying on throwing IllegalArgumentException. 
Secondly, validation can be more more complicated than just check the instance 
type. At this level, it shouldn't care what kind of validation the sub classes 
might do.
   
   I think it's acceptable if the base class doesn't care if the sub class does 
validation or how it does it. So it's okay if we remove this and let each 
subclass do its validation when create/alter table. This way might be even 
cleaner.

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