You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org> on 2025/11/14 02:18:05 UTC
[PR] [python] fixes URI scheme miss issue in blob-as-descriptor mode [paimon]
XiaoHongbo-Hope opened a new pull request, #6604:
URL: https://github.com/apache/paimon/pull/6604
### Purpose
fixes URI scheme miss issue in blob-as-descriptor mode
### Tests
- `test_blob_write_read_end_to_end_with_descriptor`
- Sample script `oss_blob_as_descriptor.py`: Demonstrates OSS blob-as-descriptor functionality with scheme preservation
--
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-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] use str to replace pathlib.Path to avoid scheme missing in pypaimon [paimon]
Posted by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org>.
XiaoHongbo-Hope commented on code in PR #6604:
URL: https://github.com/apache/paimon/pull/6604#discussion_r2541973622
##########
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 finnally
--
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-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] use str to replace pathlib.Path to avoid scheme missing in pypaimon [paimon]
Posted by "lucasfang (via GitHub)" <gi...@apache.org>.
lucasfang commented on code in PR #6604:
URL: https://github.com/apache/paimon/pull/6604#discussion_r2541292674
##########
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
--
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-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] use str to replace pathlib.Path to avoid scheme missing in pypaimon [paimon]
Posted by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org>.
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 concat 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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] use str to replace pathlib.Path to avoid scheme missing in pypaimon [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #6604:
URL: https://github.com/apache/paimon/pull/6604
--
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-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] use str to replace pathlib.Path to avoid scheme missing in pypaimon [paimon]
Posted by "discivigour (via GitHub)" <gi...@apache.org>.
discivigour commented on PR #6604:
URL: https://github.com/apache/paimon/pull/6604#issuecomment-3555666800
+1
--
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-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] use str to replace pathlib.Path to avoid scheme missing in pypaimon [paimon]
Posted by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] use str to replace pathlib.Path to avoid scheme missing in pypaimon [paimon]
Posted by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org>.
XiaoHongbo-Hope commented on code in PR #6604:
URL: https://github.com/apache/paimon/pull/6604#discussion_r2541973622
##########
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 finnally
--
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-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] use str to replace pathlib.Path to avoid scheme missing in pypaimon [paimon]
Posted by "lucasfang (via GitHub)" <gi...@apache.org>.
lucasfang commented on PR #6604:
URL: https://github.com/apache/paimon/pull/6604#issuecomment-3555502050
+1
--
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-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] use str to replace pathlib.Path to avoid scheme missing in pypaimon [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #6604:
URL: https://github.com/apache/paimon/pull/6604#issuecomment-3556301211
+1
--
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-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] Use urlpath.URL to replace pathlib.Path to avoid scheme missing in pypaimon [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #6604:
URL: https://github.com/apache/paimon/pull/6604#issuecomment-3544852071
Maybe we can just use str.
--
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-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org