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

 ##########
 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.
+        */
+       public abstract void validateCatalogBaseTable(CatalogBaseTable 
catalogBaseTable)
+               throws IllegalArgumentException;
+
+       /**
+        * Create a CatalogBaseTable from a Hive table.
+        *
+        * @param hiveTable a Hive table
+        * @return a CatalogBaseTable
+        */
+       public abstract CatalogBaseTable createCatalogTable(Table hiveTable);
+
+       /**
+        * Create a Hive table from a CatalogBaseTable.
+        *
+        * @param tablePath path of the table
+        * @param table a CatalogBaseTable
+        * @return a Hive table
+        */
+       public abstract Table createHiveTable(ObjectPath tablePath, 
CatalogBaseTable table);
 
 Review comment:
   I feel "create" is better because it has more complexity than just simply 
convert one object to another and keep naming convention consistent. Also feels 
a bit weird to "convert" two things into one.

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