iremcaginyurtturk opened a new pull request, #1507: URL: https://github.com/apache/iceberg-go/pull/1507
## Problem `CreateNamespace` (`catalog/hive/hive.go`) sets the Hive database `LocationUri` only from an explicit `location` / `Location` property. When none is provided — the common case (e.g. a client calls `CreateNamespace` with empty properties) — and the metastore has no default warehouse dir configured, the metastore is handed an empty location and rejects it: ``` MetaException: java.lang.IllegalArgumentException: Can not create a Path from an empty string ``` The catalog already carries the `warehouse` option, but `CreateNamespace` never uses it for the namespace location. (pyiceberg's Hive catalog derives the database location from the warehouse.) ## Fix When no explicit location is given, derive `<warehouse>/<db>.db` — the metastore's conventional database location — from the catalog's `warehouse`. When no warehouse is configured the location stays empty, preserving the previous behavior (no regression for setups that rely on the metastore's own default warehouse dir). ## Tests - `TestDefaultNamespaceLocation` — derivation, trailing-slash handling, and the empty-warehouse (no-op) case. - `TestHiveCreateNamespaceDerivesLocationFromWarehouse` — `CreateNamespace` with no `location` prop sends `<warehouse>/<db>.db` to the metastore. - The existing `TestHiveCreateNamespace` continues to assert an explicit `location` wins. -- 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]
