XiaoHongbo-Hope commented on code in PR #6604:
URL: https://github.com/apache/paimon/pull/6604#discussion_r2541975574


##########
paimon-python/pypaimon/catalog/filesystem_catalog.py:
##########
@@ -108,18 +106,13 @@ def get_table_schema(self, identifier: Identifier):
             raise TableNotExistException(identifier)
         return table_schema
 
-    def get_database_path(self, name) -> Path:
-        return self._trim_schema(self.warehouse) / f"{name}{Catalog.DB_SUFFIX}"
+    def get_database_path(self, name) -> str:
+        warehouse = self.warehouse.rstrip('/')
+        return f"{warehouse}/{name}{Catalog.DB_SUFFIX}"

Review Comment:
   > > how about use os.path.join to construct the path? then you don’t need to 
use rstrip to remove trailing slashes from the warehouse path
   > 
   > Thanks for your kind suggestion. I tried use os.path but found that 
`os.path.join(self.warehouse, "db.db")` produces `oss://bucket/path\db.db` on 
Windows instead of `oss://bucket/path/db.db`. So I choose str finally
   
   



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

Reply via email to