geyanggang opened a new issue, #14660: URL: https://github.com/apache/gravitino/issues/14660
### Version main branch ### Describe what's wrong When `DROP SCHEMA ... CASCADE` is refused by the Gravitino server because of a hard dependency, the Trino and Spark connectors hide the real reason: - Trino `CatalogConnectorMetadata.dropSchema` catches `NonEmptySchemaException` and throws a `TrinoException` with the fixed text "Schema does not empty", discarding the server's message. - Spark `BaseCatalog.dropNamespace` catches `NonEmptySchemaException` and always throws `NonEmptyNamespaceException`, even when the user already requested `cascade`. The user is told the namespace is non-empty and to retry with cascade, which they already did, and the real reason is lost. ### Error message and/or stacktrace `Schema does not empty` (Trino) and `NonEmptyNamespaceException` (Spark), with no detail about the blocking dependency. ### How to reproduce Using the main branch, drop a schema with `cascade = true` whose drop is blocked by a dependency the engine cannot cascade (for example a cross-schema reference in a JDBC backend) through Trino or Spark. The error does not name the blocker. ### Additional context The non-cascade Spark path should still throw `NonEmptyNamespaceException` (Spark's expected signal to retry with cascade); only the cascade path and the Trino message need to keep the server's reason. -- 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]
