thswlsqls opened a new pull request, #17069: URL: https://github.com/apache/iceberg/pull/17069
Closes #17068 ## Summary - `loadView()` built a `ViewOperations` to check existence via `ops.current()`, then discarded it and called `newViewOps(identifier)` again to construct the returned `BaseView`, reloading view metadata from the metastore twice per call. - Reuse the `ops` from the existence check instead of creating a second instance. - Matches `BaseViewBuilder.create`/`replace` in the same file and the parent `BaseMetastoreCatalog.loadTable()`, which already reuse `ops` this way. ## Testing done - Added `TestBaseMetastoreViewCatalogLoadView#loadViewReusesOpsFromExistenceCheck`, asserting `newViewOps` is called once (was twice) per `loadView()`. - `./gradlew :iceberg-core:check` — passed (test + spotlessCheck + checkstyle + errorProne). - `./gradlew :iceberg-core:revapi` — passed (backward compatible, no signature change). -- 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]
