shaoyu-li commented on code in PR #13058:
URL: https://github.com/apache/gravitino/pull/13058#discussion_r4008552018
##########
catalogs/catalog-lakehouse-generic/src/main/java/org/apache/gravitino/catalog/lakehouse/generic/GenericCatalogOperations.java:
##########
@@ -192,9 +223,14 @@ public boolean dropSchema(NameIdentifier ident, boolean
cascade) throws NonEmpty
"Schema %s is not empty, cannot drop it without cascade", ident);
}
- // Drop all tables under the schema first if cascade is true.
+ // Drop all tables under the schema first if cascade is true. This goes
through the same path
+ // as the catalog level dropTable, so that the location of each table is
unprovisioned and its
+ // cached format invalidated. The schema is resolved once for the whole
cascade rather than
+ // once per table: every table here has the same parent, and the provider
may not ask for it at
+ // all.
+ Schema cascadedSchema = loadSchema(ident);
Review Comment:
Moved inside the guard. `testDroppingAnEmptySchemaDoesNotResolveIt` verifies
the schema entity is
never read on that path -- `ManagedSchemaOperations.dropSchema` is a single
`delete`, so the read
was the catalog's alone.
--
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]