thswlsqls opened a new pull request, #16885: URL: https://github.com/apache/iceberg/pull/16885
<!-- No issue: minor bug fix / parity, issue not required (PR-only) --> ## Summary - `BigQueryMetastoreCatalog.dropTable` always called `ops.current()` before checking `purge`. - The first `ops.current()` triggers `doRefresh()` -> `client.load()` (a BigQuery `tables.get` call) plus a metadata file read. - For a plain drop (`purge=false`) that load is wasted, since `lastMetadata` is only used when purging data. - Load the metadata only when `purge` is true, tolerating a `NotFoundException` by continuing the drop without purge. - This matches `GlueCatalog.dropTable` and `HiveCatalog.dropTable`, which already guard the load behind `purge`. ## Testing done - Added `TestBigQueryTableOperations#dropTableWithoutPurgeDoesNotLoadMetadata` asserting `verify(client, never()).load(...)` for a plain drop. - Added `TestBigQueryTableOperations#dropTableWithPurgeLoadsMetadata` asserting the metadata is still loaded when `purge=true`. - `./gradlew :iceberg-bigquery:check` — passed, 125 tests (0 failures, 23 pre-existing `@Disabled` skips); `TestBigQueryTableOperations` now has 10 tests. - REVAPI not applicable: `iceberg-bigquery` is not a REVAPI-published module. -- 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]
