Skip to content

Nessie: Return false for table and view drop type mismatches - #18912

Open
binarybrain-009 wants to merge 3 commits into
apache:mainfrom
binarybrain-009:nessie-drop-table-view-review
Open

binarybrain-009 wants to merge 3 commits into
apache:mainfrom
binarybrain-009:nessie-drop-table-view-review

Conversation

@binarybrain-009

@binarybrain-009 binarybrain-009 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

NessieCatalog.dropTable throws when the identifier belongs to an Iceberg view, and dropView throws when it belongs to an Iceberg table. Return false for either type mismatch before attempting deletion, matching the catalog contracts. Re-enable the shared ViewCatalogTests cases introduced by #18691 by removing Nessie's temporary disabled overrides.

Test plan: Run the inherited mismatch tests against both Nessie API versions. They verify that dropping a table at a view identifier (with either purge setting), or a view at a table identifier, returns false and preserves the existing object's UUID. The full Nessie build, tests, formatting and checkstyle checks pass.


AI Disclosure

  • Model: GPT-6
  • Platform/Tool: Codex
  • Human Oversight: partially reviewed (the author confirmed review before the November 19 rebase; the rebase and November 20 test cleanup have not yet been personally reviewed)
  • Prompt Summary: Fix both Nessie drop type mismatches, rebase onto main, and address review feedback by removing duplicate tests in favor of the inherited catalog tests; the fix and review follow-ups are generated.

binarybrain-009 added a commit to binarybrain-009/iceberg that referenced this pull request Nov 12, 2026
Move both purge cases into ViewCatalogTests. Hive, JDBC, in-memory and REST pass; temporarily disable the inherited Nessie case pending the separate fix in apache#18912.

Generated-by: Codex
@pvary

pvary commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

human review please

@binarybrain-009

Copy link
Copy Markdown
Contributor Author

@pvary I've personally reviewed the fix and regression test, and updated the human-review disclosure. This is ready for another look. Thanks!

@binarybrain-009 binarybrain-009 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed byhuman

@binarybrain-009 binarybrain-009 changed the title Nessie: Return false when dropTable targets a view Nessie: Return false for table and view drop type mismatches Nov 19, 2026
@binarybrain-009

Copy link
Copy Markdown
Contributor Author

@pvary Applied your suggestion in 439a6f4: missing content or either type mismatch now returns false before deletion. Added a regression for dropView at a table identifier that loads the surviving table and checks its UUID. It failed on both Nessie API versions before the change; the full Nessie build and tests now pass, including both mismatch directions. Could you take another look? These latest follow-ups were generated with Codex and are marked as awaiting my personal review in the disclosure.

@binarybrain-009

Copy link
Copy Markdown
Contributor Author

Addrexsed all the review comments and reviewed as a human

@pvary

pvary commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Pls rebase @binarybrain-009

binarybrain-009 and others added 2 commits November 19, 2026 11:49
A view identifier does not identify a table. Preserve the view and return false for either purge setting instead of throwing a type-mismatch exception.

Generated-by: Codex
@binarybrain-009
binarybrain-009 force-pushed the nessie-drop-table-view-review branch from 439a6f4 to 30bf122 Compare November 19, 2026 19:51
@pvary

pvary commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Please drop the extra tests, and update the PR description.
Thanks,
Peter

Remove duplicate Nessie tests now that the inherited ViewCatalogTests cover both mismatch directions.

Generated-by: Codex
@binarybrain-009

Copy link
Copy Markdown
Contributor Author

Addressed the comments and reviewed as a human

This branch has not been deployed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants