-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
LocalFileSystem interprets the prefix passed to ObjectStore::list_file as the path to a directory, and then proceeds to enumerate this directory recursively. S3FileSystem, however, interprets the prefix as a string prefix.
The distinction arises if you consider a file structure like
foo/a.txt
foo/b.txt
If called with a prefix of fo, LocalFileSystem will return an error, whereas S3FileSystem will return both files.
Describe the solution you'd like
I personally would expect something called ObjectStore to behave like an object store, and not a filesystem. In particular I would expect it to behave like a KV store without any notion of directories.
I would therefore suggest:
- Remove FileSystem from the naming of the implementations
- Map object storage semantics to the local filesystem, as opposed to mapping filesystem semantics to all object storages
Describe alternatives you've considered
We could instead call the trait something like FileSystem and give it file system like semantics.
Additional context
I noticed this whilst reviewing #2394 - it seems off to me that we should need to split based on path delimiters given object stores don't have such a concept.
Thoughts @matthewmturner @alamb @timvw ?