iremcaginyurtturk commented on code in PR #1507:
URL: https://github.com/apache/iceberg-go/pull/1507#discussion_r3639848639
##########
catalog/hive/hive.go:
##########
@@ -776,6 +777,16 @@ func (c *Catalog) ListNamespaces(ctx context.Context,
parent table.Identifier) (
}
// CreateNamespace creates a new namespace in the catalog.
+// defaultNamespaceLocation derives <warehouse>/<db>.db, the metastore's
+// conventional database location, or "" when no warehouse is configured.
+func defaultNamespaceLocation(warehouse, database string) string {
+ if warehouse == "" {
+ return ""
+ }
+
+ return strings.TrimRight(warehouse, "/") + "/" + database + ".db"
Review Comment:
Agreed. Switched to strings.TrimSuffix(warehouse, "/") so it trims a single
trailing slash and preserves the scheme (file:/// → file:///db.db), matching
what hive.go:340 does for the table location.
--
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]