Repository navigation
[Cherry-pick to branch-1.3] [#14050] fix(jdbc): report non-empty schema drops consistently (#14051) - #14082
Open
github-actions[bot] wants to merge 2 commits into
Open
[Cherry-pick to branch-1.3] [#14050] fix(jdbc): report non-empty schema drops consistently (#14051)#14082github-actions[bot] wants to merge 2 commits into
github-actions[bot] wants to merge 2 commits into
Conversation
### What changes were proposed in this pull request? Throw `NonEmptySchemaException` when a non-cascading schema drop finds tables in JDBC common, Doris, StarRocks and ClickHouse. MySQL and OceanBase inherit the shared JDBC fix. Keep the existing SQL and cascade behavior. ### Why are the changes needed? The schema drop contract and REST error handler expect `NonEmptySchemaException`. Throwing generic state/argument exceptions currently produces HTTP 500 or 400 for a normal non-empty-schema rejection. Fix: #14050 ### Does this PR introduce _any_ user-facing change? Affected catalog clients receive `NonEmptySchemaException` and REST clients receive HTTP 409 when dropping a non-empty schema without cascade, instead of generic errors. No API signatures or configuration changes. ### How was this patch tested? - Four pre-fix non-empty-drop regression cases failed with the incorrect exception types. - After the fix: all 438 non-Docker tests in JDBC common, Doris, StarRocks and ClickHouse passed, plus all 11 `TestSchemaOperations` REST tests (449 total). - New coverage checks rejection before DROP, successful empty-schema drops, cascade behavior, JDBC resource closure, and the HTTP 409 response/error type. - Module Spotless checks and `git diff --check` passed. - Live database/Docker integration tests were not run locally.
Contributor
|
Hi @yuqi1129, the cherry-pick of #14051 to branch-1.3 fails CI: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick Information:
branch-1.3