Skip to content

[WIP] Improve engine-option handling in read_parquet - #8765

Closed
rjzamora wants to merge 15 commits into
dask:mainfrom
rjzamora:engine-options
Closed

rjzamora wants to merge 15 commits into
dask:mainfrom
rjzamora:engine-options

Conversation

@rjzamora

@rjzamora rjzamora commented Mar 1, 2022

Copy link
Copy Markdown
Member

Adds clear dataset_options= and read_options= to read_parquet API, and exposes distinct pyarrow.dataset.dataste and fastparquet.ParquetFile arguments to the user.

Note that the current implementation also leverages a new EngineOptions class (for now).

TODO: Add writeup

Comment on lines -1517 to +1499
full_path = fs.sep.join([p for p in [data_path, filename] if p != ""])
full_path = "/".join([p for p in [data_path, filename] if p != ""])

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@martindurant - One goal of this PR is to make it possible for the user to specify most (if not all) of the arguments needed to initialize a pyarrow.dataset or fastparquet.ParquetFile "dataset" object. For the pyarrow case, this can result in us passing around a pyarrow-based fs object. We don't need to allow the user to pass in the filesystem option, but this feature now seems reasonably simple to support. The only sticky bit is that we would want to move away from using fs.sep throughout the code base. The pyarrow filesystem doesn't have this property, because it uses "/" in all cases (please correct me if I'm wrong @jorisvandenbossche). Is this also true for fsspec? Can we just move to "/" throughout?

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.

Yes, you can use "/" everywhere when you have any fsspec instance. The only time that might now work, is if you open() a path directly, and that path is windows-style. If we are making fsspec instances, that will never happen.

@rjzamora

rjzamora commented Jun 4, 2024

Copy link
Copy Markdown
Member Author

Closing as stale.

@rjzamora rjzamora closed this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants