aokolnychyi commented on issue #1398:
URL: https://github.com/apache/iceberg/issues/1398#issuecomment-682815249


   Here is the snippet from `create` in `S3AfileSystem`:
   
   ```
       try {
         // get the status or throw an FNFE
         status = getFileStatus(path);
   
         // if the thread reaches here, there is something at the path
         if (status.isDirectory()) {
           // path references a directory: automatic error
           throw new FileAlreadyExistsException(path + " is a directory");
         }
         if (!overwrite) {
           // path references a file and overwrite is disabled
           throw new FileAlreadyExistsException(path + " already exists");
         }
         LOG.debug("Overwriting file {}", path);
       } catch (FileNotFoundException e) {
         // this means the file is not found
   
       }
   ```
   
   Looks like `getFileStatus` is what breaks this logic and even setting the 
overwrite flag does not help. At least, in the case of `S3AFileSystem`.


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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to