XiaoHongbo-Hope commented on code in PR #7001:
URL: https://github.com/apache/paimon/pull/7001#discussion_r2687178077
##########
paimon-python/pypaimon/common/file_io.py:
##########
@@ -329,8 +353,13 @@ def copy_file(self, source_path: str, target_path: str,
overwrite: bool = False)
if not overwrite and self.exists(target_path):
raise FileExistsError(f"Target file {target_path} already exists
and overwrite=False")
Review Comment:
> The copy_file method checks exists(target_path) which can now raise
OSError (e.g., permission errors) instead of returning False. This means that
when overwrite=False and there's a permission error checking the target path,
it will raise OSError instead of the expected FileExistsError. Consider
catching OSError from exists() and re-raising as a more appropriate exception,
or document this behavior change.
Same with java.
--
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]