feat(api): Support specifying file system for more APIs #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Currently, most APIs require specifying the file system through the
Options::FILE_SYSTEMconfiguration. Even when using a single file system (which should be the primary use case, as cross-file-system tables are quite rare), the implementation still usesResolvingFileSystemas a forwarding layer. This introduces overhead on every file system access: parsing the path to extract the scheme, acquiring a read lock to obtain the actual underlying file system, and forwarding operations. Creating file systems via Options and forwarding through ResolvingFileSystem introduces unnecessary file system instances and computational overhead.This change adds methods or parameters to directly specify file system instances for most APIs that require file system operations. This allows external systems to reuse existing file system instances and bypass the forwarding layer, addressing the issues mentioned above.
Tests
Modified existing unit tests to cover the API changes
API and Format
Yes - API Enhancement (Backward Compatible)
Changes to APIs in
include/:WithFileSystem()methods to builder classesfile_systemparameters (withnullptrdefault values) to function signaturesDocumentation
None