Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX-#6778: Read parquet files without file extensions using fastparquet #6789

Closed
wants to merge 2 commits into from

Conversation

seydar
Copy link
Contributor

@seydar seydar commented Nov 30, 2023

In supporting fastparquet, modin takes the paths provided, globs them, and filters them to only look at files with the .parq or .parquet extension. This commit adds support so that if the path supplied is explicitly a file, it will be included.

Signed-off by: Ari Brown [email protected]

What do these changes do?

If a a file is passed to modin.pandas.read_parquet(..., engine='fastparquet') but the file does not have ".parq" or ".parquet" in the name, it will be ignored when determining the number of partitions. This change looks at all of the paths passed, and if the path is a file, then it considers it to be a parquet file.

  • first commit message and PR title follow format outlined here

    NOTE: If you edit the PR title to match this format, you need to add another commit (even if it's empty) or amend your last commit for the CI job that checks the PR title to pick up the new PR title.

  • passes flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
  • passes black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
  • signed commit with git commit -s
  • Resolves BUG: Unable to read parquet files using fastparquet #6778
  • tests added and passing
  • [N/A] module layout described at docs/development/architecture.rst is up-to-date

…ing fastparquet

In supporting fastparquet, modin takes the paths provided, globs them,
and filters them to only look at files with the .parq or .parquet
extension. This commit adds support so that if the path supplied is
explicitly a file, it will be included.

Signed-off by: Ari Brown <[email protected]>
…ing fastparquet

In supporting fastparquet, modin takes the paths provided, globs them,
and filters them to only look at files with the .parq or .parquet
extension. This commit adds support so that if the path supplied is
explicitly a file, it will be included.

This commit also fixes the formatting issues for the `black` linter.

Signed-off by: Ari Brown <[email protected]>
@anmyachev
Copy link
Collaborator

anmyachev commented Nov 30, 2023

@seydar awesome PR! Please apply auto linter black to your changes (full command to run: black modin).

UPD: black can be installed using pip install black>=23.1.0.

@seydar seydar closed this Nov 30, 2023
@seydar seydar deleted the fix_6778 branch November 30, 2023 22:10
@seydar
Copy link
Contributor Author

seydar commented Nov 30, 2023

@anmyachev Whoops, sorry about that. I though I ran it, but evidently missed that one.

In rectifying it, not sure if I did it right, but I closed this PR and made a new PR with the corrections all in a single commit: #6790

@anmyachev
Copy link
Collaborator

In rectifying it, not sure if I did it right, but I closed this PR and made a new PR with the corrections all in a single commit: #6790

@seydar don't worry it's ok. However, you have the option to do git push --force into your branch and the changes in the pull request will appear as one commit.

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.

BUG: Unable to read parquet files using fastparquet
2 participants