Xuanwo commented on issue #488: URL: https://github.com/apache/iceberg-rust/issues/488#issuecomment-2254577316
My reason for not including a `default_table_root_location` (or `default_warehouse_location`) at the catalog implementation level is that it might confuse our users about the actual location they are using. Pyiceberg has a `_get_default_warehouse_location`: https://github.com/apache/iceberg-python/blob/be5c42649914e71e8366c22558f8234ce062b145/pyiceberg/catalog/__init__.py#L885-L895 ```py def _get_default_warehouse_location(self, database_name: str, table_name: str) -> str: database_properties = self.load_namespace_properties(database_name) if database_location := database_properties.get(LOCATION): database_location = database_location.rstrip("/") return f"{database_location}/{table_name}" if warehouse_path := self.properties.get(WAREHOUSE_LOCATION): warehouse_path = warehouse_path.rstrip("/") return f"{warehouse_path}/{database_name}.db/{table_name}" raise ValueError("No default path is set, please specify a location when creating a table") ``` I believe it makes more sense for us to share the implementation of the default warehouse location logic. - load database location if `database_properties` has `LOCATION`, and use `{database_location}/{table_name}` - Otherwise, try `WAREHOUSE_LOCATION` and use `{warehouse_path}/{database_name}.db/{table_name}` - And finally returns error. Maybe we can align with this behavior? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org