anilkumgopalap commented on code in PR #14862:
URL: https://github.com/apache/gravitino/pull/14862#discussion_r4567538317
##########
catalogs/catalog-lakehouse-generic/src/main/java/org/apache/gravitino/catalog/lakehouse/generic/GenericCatalogOperations.java:
##########
@@ -464,11 +548,29 @@ private boolean dropOrPurgeTable(NameIdentifier ident,
boolean purge, Schema sch
ident,
context.tableProperties().get(Table.PROPERTY_LOCATION),
tableLocationProvider.name());
+ if (tablesWithRetainedData != null) {
+ tablesWithRetainedData.add(ident);
+ }
}
return dropped;
}
+ private void unprovisionSchemaLocation(
+ TableLocationProvider provider, SchemaLocationContext context) {
+ try {
+ ((SupportsSchemaLocations) provider).unprovisionSchemaLocation(context);
+ } catch (Exception e) {
Review Comment:
Done. A failed unprovision now fails the drop request and the schema stays
(see the previous comment). Added tests for both a plain and a cascade drop.
--
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]