Skip to content

Add directory-partitioning, filtering, and divisions support to ORC API - #8004

Closed
rjzamora wants to merge 62 commits into
dask:mainfrom
rjzamora:orc-partition-on
Closed

rjzamora wants to merge 62 commits into
dask:mainfrom
rjzamora:orc-partition-on

Conversation

@rjzamora

@rjzamora rjzamora commented Aug 5, 2021 •

Copy link
Copy Markdown
Member

This PR is a follow-up to #7756. The new changes are focused on directory partitioning (partition_on support in to_orc, and partition-column handling/filtering in read_orc).

@rjzamora rjzamora changed the title Add directory-partitioning support to ORC API Add directory-partitioning, filtering, and divisions support to ORC API Aug 12, 2021
paths,
directory_partitions,
directory_partition_keys,
) = collect_partitions(paths, root_dir, fs)

@jorisvandenbossche jorisvandenbossche Aug 23, 2021 •

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.

@rjzamora would you be interested in letting pyarrow handle this part of the logic? (as it can do for pyarrow-dataset engine for parquet)

I know this is not yet possible with the released pyarrow, but I could collaborate on it to ensure we have ORC support in the dataset APIs in the next pyarrow release (scheduled half october, and we can already test it with the nightly releases before that).
That's of course not a short-term solution, and I don't know how time sensitive this PR is (so no problem if you want to see this feature earlier), but it would avoid writing a lot of custom code in this PR that could become obsolete if pyarrow.datasets supported it.

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.

I just wanted to open an issue for it on the Arrow side, but I see you already did! -> https://issues.apache.org/jira/browse/ARROW-13572

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.

would you be interested in letting pyarrow handle this part of the logic?

I would be very interested in this :)

I know this is not yet possible with the released pyarrow, but I could collaborate on it to ensure we have ORC support in the dataset APIs in the next pyarrow release (scheduled half october, and we can already test it with the nightly releases before that).

As much as I don't "want" to, I may need to try to merge code (like collect_partitions), even though I fully expect it to become obsolete very quickly. I'd much rather rely on the pyarrow.dataset API here, but there is somewhat of an urgent need to get hive-partitioned ORC support out with the October cudf release (and using the October pyarrow release may be cutting things a bit close). With that said, I do think it makes a lot of sense for us to start collaborating on the pyarrow.dataset-version of this code asap, and to make sure the place-holder collect_partitions-like logic is designed in such a way that pyarrow.dataset can be "dropped in" for pa.version > 5.0.0 (or whatever the appropriate version cutoff may be).

@rjzamora
rjzamora marked this pull request as ready for review August 23, 2021 21:14
@rjzamora

Copy link
Copy Markdown
Member Author

@dask/io @jrbourbeau - I am hoping to start by getting some logistical feedback here.

As discussed in this PR, it seems that ORC support in pyarrow.dataset is looking promising for the October pyarrow release. Therefore, much of the partitioning and filtering logic introduced in this PR will (hopefully) be replaced by simpler pyarrow fragment handling. With that said, there is a short-term need for partitioning and filtering in dask-cudf.

My question: Is there any short-term interest in having partitioning/filtering support in ORC, or can we just hold off until after the next pyarrow release? If dask-dataframe users are fine with a delay (which I expect is the case), I will close this PR for now, and just move (most of) these changes into dask-cudf. Once the pyarrow changes are ready, this PR can be dramatically simplified anyway.

@rjzamora

Copy link
Copy Markdown
Member Author

Closing in favor of the plan to wait on pyarrow.dataset support for ORC (https://issues.apache.org/jira/browse/ARROW-13572)

@jorisvandenbossche

Copy link
Copy Markdown
Member

@rjzamora as a heads up: basic support for reading ORC files in the dataset API has landed in Arrow master (and will be available tomorrow in nightly packages), in case you already want to start trying it out in advance of the pyarrow 6.0 release (which would be good to ensure it's in a good enough state for this use case)

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