Skip to content

[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
branch-1.3from
cherry-pick-b748d734-to-branch-1.3
Open

github-actions[bot] wants to merge 2 commits into
branch-1.3from
cherry-pick-b748d734-to-branch-1.3

Conversation

@github-actions

Copy link
Copy Markdown

Cherry-pick Information:

  • Original commit: b748d73
  • Target branch: branch-1.3
  • Status: ✅ Clean cherry-pick (no conflicts)

### 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.
@github-actions github-actions Bot added the cherry-pick Automatically opened cherry-pick PR label Oct 21, 2026
@github-actions
github-actions Bot requested a review from jerryshao October 21, 2026 16:48
@jerryshao

Copy link
Copy Markdown
Contributor

Hi @yuqi1129, the cherry-pick of #14051 to branch-1.3 fails CI: TestJdbcDatabaseDrop > testDropRespectsNonEmptySchemaContract(boolean, boolean) > [1] true, false fails in :catalogs:catalog-jdbc-common:test (build (17) log). Could you please take a look and fix it for branch-1.3? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick Automatically opened cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants