Fix required_extension behavior in read_parquet#8351
Merged
Conversation
…ith no _metadata file
Member
jsignell
reviewed
Nov 5, 2021
martindurant
reviewed
Nov 5, 2021
| if _metadata_exists and ignore_metadata_file: | ||
| fns.remove("_metadata") | ||
| _metadata_exists = False | ||
| if require_extension: |
Member
There was a problem hiding this comment.
To be clear: this and/or L410 is where the single-file case would have been filtered, but now we only do filtering when the path is a directory and there is no _metadata .
If I understood correctly, I am fully behind this change.
jsignell
approved these changes
Nov 5, 2021
Member
jsignell
left a comment
There was a problem hiding this comment.
This looks nice! Thanks for the speedy turn around. I just have one comment about making the error a bit more informative.
Co-authored-by: Julia Signell <jsignell@gmail.com>
jrbourbeau
reviewed
Nov 5, 2021
Member
jrbourbeau
left a comment
There was a problem hiding this comment.
Thanks for the quick fix @rjzamora! I'll hold off on releasing until this is merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR changes the behavior of
read_parquet(path, ..., required_extension=)to only apply whenpathis a directory without an active_metadatafile. That is, we should not be filtering out "unsupported extensions" when thepathis a single file, and specific list of files, or when we are using a_metadatafile to tell us what files are valid.read_parquetfails on main (not on 2021.10.0) #8349pre-commit run --all-files