Anurag-S1ngh opened a new pull request, #4512: URL: https://github.com/apache/iceberg-python/pull/4512
# Rationale for this change Closes #4504. `FileIO.delete` could delete a different file than the one named. - `FsspecFileIO.delete` used `fs.rm`, which expands `*`, `?` and `[...]` as glob patterns on some filesystems. It now uses `fs.rm_file`, which deletes the literal path. - `PyArrowFileIO.delete` parsed the location as a URL, so `?query` and `#fragment` were dropped and the shortened path was deleted. It now keeps them as part of the object key. Iceberg file paths are names, not patterns or URLs with fragments. ## Are these changes tested? Yes. Added a test that a local fsspec delete with a `[...]` name leaves sibling files untouched, a test that fsspec passes the full location to `rm_file`, and a test that PyArrow deletes the exact key for paths with `?` and `#`. `tests/io/test_pyarrow.py tests/io/test_fsspec.py -m unit`: 296 passed, 1 skipped. ## Are there any user-facing changes? No API changes. Delete now targets exactly the named file. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
