aokolnychyi edited a comment 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` breaks this logic and even setting the overwrite 
flag does not help. At least, in `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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to