Skip to content

Add partitioning support in parquet writer - #9810

Merged
rapids-bot[bot] merged 38 commits into
NVIDIA:branch-22.02from
devavret:parq-partitioned-write
Dec 14, 2021
Merged

rapids-bot[bot] merged 38 commits into
NVIDIA:branch-22.02from
devavret:parq-partitioned-write

Conversation

@devavret

@devavret devavret commented Dec 1, 2021 •

Copy link
Copy Markdown
Contributor

Contributes to #5059

Adds libcudf support for writing partitioned datasets in parquet writer. With the new API, one can specify a vector of {start_row, num_rows} structs along with a table st slices of the input table gets written to the corresponding sink.
Adds Multi-sink support in sink_info

@devavret
devavret requested a review from vuule December 1, 2021 12:23
@github-actions github-actions Bot added Python Affects Python cuDF API. libcudf Affects libcudf (C++/CUDA) code. labels Dec 1, 2021
Exception raised by writer needs to be same as that raised by pandas.
If user_data is constructed earlier using pyarrow then the exception is
raised early and is different
@devavret devavret added 4 - Needs cuIO Reviewer breaking Breaking change cuIO cuIO issue feature request New feature or request labels Dec 1, 2021
@devavret
devavret marked this pull request as ready for review December 1, 2021 18:35
@devavret
devavret requested review from a team as code owners December 1, 2021 18:35
@codecov

codecov Bot commented Dec 1, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #9810 (c53fea7) into branch-22.02 (967a333) will decrease coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-22.02    #9810      +/-   ##
================================================
- Coverage         10.49%   10.42%   -0.07%     
================================================
  Files               119      119              
  Lines             20305    20479     +174     
================================================
+ Hits               2130     2134       +4     
- Misses            18175    18345     +170     
Impacted Files Coverage Δ
python/dask_cudf/dask_cudf/sorting.py 92.30% <0.00%> (-0.61%) ⬇️
python/cudf/cudf/__init__.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/frame.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/index.py 0.00% <0.00%> (ø)
python/cudf/cudf/io/parquet.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/series.py 0.00% <0.00%> (ø)
python/cudf/cudf/utils/utils.py 0.00% <0.00%> (ø)
python/cudf/cudf/utils/ioutils.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/dataframe.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/multiindex.py 0.00% <0.00%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d23bcb4...c53fea7. Read the comment docs.

@devavret devavret mentioned this pull request Dec 10, 2021
3 of 4 tasks
@devavret
devavret requested a review from vuule December 10, 2021 21:12
@vuule

vuule commented Dec 13, 2021

Copy link
Copy Markdown
Contributor

Please add description to the PR

@vuule vuule left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a set of final nitpicks. Very happy with the PR overall.
Thank you for addressing the feedback to this extent (e.g. source_info update).

Comment thread cpp/src/io/parquet/writer_impl.cu Resolved
Comment thread cpp/src/io/parquet/writer_impl.cu Resolved
Comment thread cpp/src/io/parquet/writer_impl.cu Resolved
Comment thread cpp/src/io/parquet/writer_impl.cu Resolved
Comment thread cpp/src/io/parquet/writer_impl.cu Resolved
Comment thread cpp/src/io/parquet/writer_impl.cu Resolved
Comment thread cpp/src/io/parquet/writer_impl.cu Resolved
Comment thread cpp/include/cudf/io/types.hpp Resolved
Comment thread cpp/include/cudf/io/types.hpp Resolved
Comment thread cpp/include/cudf/io/types.hpp Resolved
@devavret
devavret requested a review from vuule December 13, 2021 12:12

@vuule vuule left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔥

@galipremsagar galipremsagar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, minor comment..

Comment thread python/cudf/cudf/_lib/orc.pyx Resolved
@devavret

Copy link
Copy Markdown
Contributor Author

@gpucibot merge

@rapids-bot
rapids-bot Bot merged commit 41f9956 into NVIDIA:branch-22.02 Dec 14, 2021
* @return this for chaining.
*/
parquet_writer_options_builder& column_chunks_file_path(std::string file_path)
parquet_writer_options_builder& column_chunks_file_paths(std::vector<std::string> file_paths)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This change breaks compilation of benchmarks, which were not updated in this PR: https://github.com/rapidsai/cudf/blob/fc2a32a1576d97a48b0c1c983ef4b31285267e96/cpp/benchmarks/io/parquet/parquet_writer_benchmark.cpp#L88

We should ensure that CI compiles the benchmarks even if they don't run.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have the fix in #9776, just needs a small donation of one code review :P

@revans2

revans2 commented Dec 15, 2021

Copy link
Copy Markdown
Contributor

It also would have been nice to get a heads up that the java build broke

@devavret

Copy link
Copy Markdown
Contributor Author

It also would have been nice to get a heads up that the java build broke

Sorry about that 😞 . I presumed that spark team must've been notified if a PR had a breaking label.

rapids-bot Bot pushed a commit that referenced this pull request Dec 15, 2021
This fixes the java build after #9810 went in.

There is a lot of copy/paste in this first draft, because I just wanted to get something to work. Not sure if it is worth going back to make it common everywhere.

Authors:
  - Robert (Bobby) Evans (https://github.com/revans2)

Approvers:
  - Jason Lowe (https://github.com/jlowe)

URL: #9908
@bdice bdice mentioned this pull request Jan 24, 2022
@vyasr vyasr added 4 - Needs Review Waiting for reviewer to review or respond and removed 4 - Needs cuIO Reviewer labels Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4 - Needs Review Waiting for reviewer to review or respond breaking Breaking change cuIO cuIO issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants