beyond1920 commented on code in PR #10426:
URL: https://github.com/apache/hudi/pull/10426#discussion_r1444512704
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/catalog/HoodieHiveCatalog.java:
##########
@@ -971,6 +952,59 @@ public void alterPartitionColumnStatistics(
throw new HoodieCatalogException("Not supported.");
}
+ public boolean isUpdatePermissible(ObjectPath tablePath, CatalogBaseTable
newCatalogTable, boolean ignoreIfNotExists) throws TableNotExistException {
+ if (!newCatalogTable.getOptions().getOrDefault(CONNECTOR.key(),
"").equalsIgnoreCase("hudi")) {
+ throw new HoodieCatalogException(String.format("The %s is not hoodie
table", tablePath.getObjectName()));
+ }
+ if (newCatalogTable instanceof CatalogView) {
+ throw new HoodieCatalogException("Hoodie catalog does not support to
ALTER VIEW");
+ }
+
+ try {
+ Table hiveTable = getHiveTable(tablePath);
+ if (!sameOptions(hiveTable.getParameters(),
newCatalogTable.getOptions(), FlinkOptions.TABLE_TYPE)
+ || !sameOptions(hiveTable.getParameters(),
newCatalogTable.getOptions(), FlinkOptions.INDEX_TYPE)) {
Review Comment:
Done
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]