thswlsqls opened a new pull request, #16916:
URL: https://github.com/apache/iceberg/pull/16916

   ## Summary
   
   - When no catalog name is set, `Catalogs.hiveCatalog` passed null to 
`getCatalogProperties`, producing the prefix `iceberg.catalog.null` instead of 
`iceberg.catalog.default_iceberg`.
   - A default catalog configured with a custom `catalog-impl` was then not 
found, so the method reported it as Hive — while `loadCatalog` loads the custom 
catalog from the same config.
   - Fix normalizes a null catalog name to `ICEBERG_DEFAULT_CATALOG_NAME` 
before the lookup, matching sibling `loadCatalog` (`Catalogs.java:238`) and the 
earlier `getCatalogType` call on `ICEBERG_DEFAULT_CATALOG_NAME` in the same 
method.
   
   ## Testing done
   
   - Added `TestCatalogs#testLoadCatalogDefaultWithCustomImpl`: a default 
(unnamed) catalog with a custom `catalog-impl` now makes `hiveCatalog` return 
`false`, consistent with `loadCatalog`. Fails before the fix (`Expecting value 
to be false but was true`), passes after.
   - `./gradlew :iceberg-mr:check` — passed (test + spotlessCheck + checkstyle 
+ errorProne), JDK 21.
   
   ---
   **AI Disclosure**
   - Model: Claude Opus 4.8
   - Platform/Tool: Claude Code
   - Human Oversight: fully reviewed
   - Prompt Summary: Find and fix a contribution candidate in the `:iceberg-mr` 
module; this fixes an internal inconsistency in `Catalogs.hiveCatalog`.
   
   


-- 
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]

Reply via email to