binarybrain-009 opened a new pull request, #18691: URL: https://github.com/apache/iceberg/pull/18691
`HiveCatalog.dropTable(view, false)` drops an Iceberg view and returns `true`, because HMS `drop_table` does not distinguish tables from views; with `purge=true` the same call throws `NoSuchTableException`. This returns `false` in both cases when the identifier is an Iceberg view, matching the `Catalog.dropTable` contract and the in-memory, JDBC and REST catalogs. The guard reuses `viewExists`, as `registerTable` and `renameTable` do, so `dropTable` now makes one extra HMS `getTable` call. Non-Iceberg Hive views and tables are still dropped as before. This refreshes the stale #17279 by @thswlsqls. Closes #17278 Test plan: a new `TestHiveViewCatalog` test, parameterized over `purge`, creates an Iceberg view and asserts `dropTable` returns `false` and the view still exists; without the fix it fails for both values. `:iceberg-hive-metastore:test`, checkstyle and spotless pass. --- **AI Disclosure** - Model: Claude Opus 5.5 - Platform/Tool: Claude Code - Human Oversight: fully reviewed - Prompt Summary: Fix apache/iceberg#17278 (HiveCatalog.dropTable silently drops an Iceberg view); the fix and its tests are generated. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
