Skip to content

Fix fsspec usage in create_metadata_file - #7295

Merged
martindurant merged 2 commits into
dask:mainfrom
rjzamora:fix-create_metadata_file
Mar 8, 2021
Merged

martindurant merged 2 commits into
dask:mainfrom
rjzamora:fix-create_metadata_file

Conversation

@rjzamora

@rjzamora rjzamora commented Mar 1, 2021

Copy link
Copy Markdown
Member

For read_parquet, ArrowEngine uses a create_metadata_file utility to construct a global metadata object when a "_metadata" file is not available. When reading from a remote file system, like s3, the list of paths being passed to this utility will not contain s3 prefix information (this is the cause of the bug discussed in nvt#539).

This PR adds an optional fs argument to create_metadata_file. This avoids the need to infer the file system from a list of paths when the file system is already known (and the necessary information has already been stripped).

Base automatically changed from master to main March 8, 2021 20:20
@rjzamora

rjzamora commented Mar 8, 2021

Copy link
Copy Markdown
Member Author

@martindurant - This is a simple fix, but it would be great if you had time for a quick look.

@martindurant

Copy link
Copy Markdown
Member

Before I have a look, you might also be interested in https://github.com/intake/filesystem_spec/issues/538, an idea to have a utility function to "rehydrate" paths into full URLs for a given FS.

@martindurant martindurant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks totally fine

@martindurant
martindurant merged commit de0e6e8 into dask:main Mar 8, 2021
@rjzamora
rjzamora deleted the fix-create_metadata_file branch March 8, 2021 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants