fix: fix deletion when using file-object-store://#5760
fix: fix deletion when using file-object-store://#5760westonpace merged 8 commits intolance-format:mainfrom
Conversation
When using file-object-store://, we currently do not delete directories that are empty. This is because the other object stores (such as s3) don't need this. This PR fixes this to explicitly delete the empty directories whe using file-object-store://.
westonpace
left a comment
There was a problem hiding this comment.
I guess I'm not sure what I'd expect as a user. Should it behave exactly as LocalObjectStore (in which case this PR is diverging from expectations) or just behave how we want it to?
I don't feel strongly enough to worry either way barring more input from any users so go for it.
The big issue with the current behavior is that it breaks lancedb when using If you want to use |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
When using `file-object-store://`, we currently do not delete
directories that are empty. This is because the other object stores
(such as s3) don't need this. This PR fixes this to explicitly delete
the empty directories when using `file-object-store://`.
This fixes a bug where tables appear to be undeletable when using
`file-object-store://`
```
>>> db = lancedb.connect("file-object-store:///tmp/foo")
>>> table = db.create_table("my_table", schema=schema)
>>> db.table_names()
['my_table']
>>> db.drop_table("my_table")
>>> db.table_names()
['my_table']
```
When using `file-object-store://`, we currently do not delete
directories that are empty. This is because the other object stores
(such as s3) don't need this. This PR fixes this to explicitly delete
the empty directories when using `file-object-store://`.
This fixes a bug where tables appear to be undeletable when using
`file-object-store://`
```
>>> db = lancedb.connect("file-object-store:///tmp/foo")
>>> table = db.create_table("my_table", schema=schema)
>>> db.table_names()
['my_table']
>>> db.drop_table("my_table")
>>> db.table_names()
['my_table']
```
When using
file-object-store://, we currently do not delete directories that are empty. This is because the other object stores (such as s3) don't need this. This PR fixes this to explicitly delete the empty directories when usingfile-object-store://.This fixes a bug where tables appear to be undeletable when using
file-object-store://