bowenli86 commented on a change in pull request #8449: [FLINK-12235][hive]
Support partition related operations in HiveCatalog
URL: https://github.com/apache/flink/pull/8449#discussion_r284854636
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalogBase.java
##########
@@ -146,6 +159,29 @@ protected abstract void
validateCatalogBaseTable(CatalogBaseTable catalogBaseTab
*/
protected abstract Database createHiveDatabase(String databaseName,
CatalogDatabase catalogDatabase);
+ /* Validates a CatalogPartition.
+ *
+ * @param catalogPartition the CatalogPartition to be validated.
+ * @throws CatalogException thrown if the CatalogPartition is invalid.
+ */
+ protected abstract void validateCatalogPartition(CatalogPartition
catalogPartition) throws CatalogException;
+
+ /**
+ * Creates a Hive Partition from a CatalogPartition.
+ *
+ * @param hiveTable the Hive table to which the partition
belongs.
+ * @param catalogPartition the CatalogPartition from which the Hive
partition will be created.
+ * @param partitionSpec the corresponding CatalogPartitionSpec
+ * @return a Hive Partition
+ */
+ protected abstract Partition createHivePartition(Table hiveTable,
CatalogPartitionSpec partitionSpec,
+
CatalogPartition catalogPartition) throws
PartitionSpecInvalidException;
Review comment:
nit: can we reformat it to be more readable? like:
```
protected abstract Partition createHivePartition(
Table hiveTable,
CatalogPartitionSpec partitionSpec,
CatalogPartition catalogPartition) throws PartitionSpecInvalidException;
```
----------------------------------------------------------------
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