geyanggang opened a new pull request, #14663: URL: https://github.com/apache/gravitino/pull/14663
### What changes were proposed in this pull request? - Trino `CatalogConnectorMetadata.dropSchema`: surface the `NonEmptySchemaException` message (falling back to "Schema is not empty" when blank) instead of the fixed "Schema does not empty", keeping the `GRAVITINO_SCHEMA_NOT_EMPTY` code. - Spark `BaseCatalog.dropNamespace`: when `cascade` is true, propagate the original `NonEmptySchemaException` (which carries the server's reason); keep `NonEmptyNamespaceException` for the non-cascade path. ### Why are the changes needed? When a cascade drop is refused for a hard dependency, the connectors report a misleading, fixed message, so users cannot see the blocking dependency. Fixes #14660 ### Does this PR introduce _any_ user-facing change? Yes. A refused `DROP SCHEMA ... CASCADE` now shows the server's reason in Trino, and in Spark propagates that reason instead of a generic "namespace is not empty". The non-cascade Spark behavior is unchanged. ### How was this patch tested? - Trino `TestCatalogConnectorMetadataErrors`: reason preserved, blank fallback. - New Spark `TestBaseCatalogDropNamespace`: cascade keeps the reason, non-cascade still throws `NonEmptyNamespaceException`. - Built `trino-connector-482-483`, `spark-3.5` and `spark-4.0` with `-PskipITs`; spotless clean. -- 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]
