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


##########
paimon-python/pypaimon/common/file_io.py:
##########
@@ -199,7 +202,12 @@ def new_output_stream(self, path: str):
     def get_file_status(self, path: str):
         path_str = self.to_filesystem_path(path)
         file_infos = self.filesystem.get_file_info([path_str])
-        return file_infos[0]
+        file_info = file_infos[0]
+        
+        if file_info.type == pyarrow.fs.FileType.NotFound:
+            raise FileNotFoundError(f"File {path} does not exist")

Review Comment:
   > The error message uses the original path parameter instead of the 
filesystem-transformed path_str. This could be confusing when debugging issues 
with path transformations, especially for S3 or other non-local filesystems 
where the internal path representation differs from the user-provided path. 
Consider including path_str in the error message for better diagnostics.
   
   fixed



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