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

Detect and report errors in Parquet header parsing #14237

Merged
merged 33 commits into from
Oct 20, 2023

Conversation

etseidl
Copy link
Contributor

@etseidl etseidl commented Sep 29, 2023

Description

Fixes #13656. Uses the error reporting introduced in #14167 to report errors in header parsing.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@etseidl etseidl requested a review from a team as a code owner September 29, 2023 16:53
@copy-pr-bot
Copy link

copy-pr-bot bot commented Sep 29, 2023

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Sep 29, 2023
@etseidl
Copy link
Contributor Author

etseidl commented Sep 29, 2023

Note: we could also detect unsupported encodings earlier, but then that would make addressing #14209 a bit harder.

@vuule
Copy link
Contributor

vuule commented Sep 29, 2023

/ok to test

@vuule vuule added cuIO cuIO issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Sep 29, 2023
@etseidl etseidl requested a review from a team as a code owner September 29, 2023 21:14
@github-actions github-actions bot added the Python Affects Python cuDF API. label Sep 29, 2023
cpp/src/io/parquet/page_hdr.cu Outdated Show resolved Hide resolved
cpp/src/io/parquet/reader_impl_preprocess.cu Outdated Show resolved Hide resolved
@etseidl etseidl requested a review from a team as a code owner October 4, 2023 00:28
@github-actions github-actions bot added the CMake CMake build issue label Oct 4, 2023
@vuule
Copy link
Contributor

vuule commented Oct 4, 2023

/ok to test

Copy link
Contributor

@vuule vuule left a comment

Choose a reason for hiding this comment

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

a utility is born!
Looks good, just a few minor suggestions.

cpp/src/io/parquet/error.hpp Outdated Show resolved Hide resolved
cpp/src/io/parquet/error.hpp Outdated Show resolved Hide resolved
cpp/src/io/parquet/error.hpp Outdated Show resolved Hide resolved
Co-authored-by: Vukasin Milovanovic <[email protected]>
@vuule
Copy link
Contributor

vuule commented Oct 4, 2023

/ok to test

@vuule
Copy link
Contributor

vuule commented Oct 5, 2023

/ok to test

Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Thanks for this. I have a few relatively small requests.

cpp/src/io/parquet/error.hpp Outdated Show resolved Hide resolved
int lane_id = threadIdx.x % 32;
int chunk = (blockIdx.x * 4) + (threadIdx.x / 32);
byte_stream_s* const bs = &bs_g[threadIdx.x / 32];
int warp_id = threadIdx.x / 32;
Copy link
Contributor

Choose a reason for hiding this comment

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

While refactoring this, let's move to use cudf::detail::warp_size instead of hardcoding 32.

{
gpuParsePageHeader parse_page_header;
__shared__ byte_stream_s bs_g[4];

int error[4] = {0};
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to be explicit about int vs. int32_t, for the purpose of aligning our conventions? I'd like to use the same type for the error value as the type we use in the parameters of set_error.

@vuule vuule requested a review from bdice October 16, 2023 17:02
@vuule
Copy link
Contributor

vuule commented Oct 16, 2023

/ok to test

Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Great! Just a couple casts needed, I think.

cpp/src/io/parquet/page_hdr.cu Outdated Show resolved Hide resolved
cpp/src/io/parquet/page_hdr.cu Outdated Show resolved Hide resolved
@vuule
Copy link
Contributor

vuule commented Oct 16, 2023

/ok to test

@vuule vuule added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Oct 16, 2023
@vuule
Copy link
Contributor

vuule commented Oct 17, 2023

/ok to test

@vuule
Copy link
Contributor

vuule commented Oct 20, 2023

/ok to test

@vuule
Copy link
Contributor

vuule commented Oct 20, 2023

/merge

@rapids-bot rapids-bot bot merged commit e7c6365 into rapidsai:branch-23.12 Oct 20, 2023
54 checks passed
@etseidl etseidl deleted the detect_header_overrun branch October 20, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge cuIO cuIO issue improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] libcudf fails to recognized malformed dictionary during Parquet read
3 participants