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

Prevent overflow with skip_rows in ORC and Parquet readers #13063

Merged
merged 37 commits into from
Apr 13, 2023

Conversation

vuule
Copy link
Contributor

@vuule vuule commented Apr 4, 2023

Description

Use int64_t for skip_rows since source or combined sources can have more than two billion rows, and we should be able to read a range of rows even in that case.
Store num_rows as std::optional, instead of using special value (-1).
Reuse code with error-prone logic between ORC and Parquet.
Added unit tests for the tricky code above.
Converted inout select_stripes parameters to input params + return values.

Checklist

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

@vuule vuule added bug Something isn't working cuIO cuIO issue labels Apr 4, 2023
@vuule vuule self-assigned this Apr 4, 2023
@github-actions github-actions bot added CMake CMake build issue Python Affects Python cuDF API. libcudf Affects libcudf (C++/CUDA) code. labels Apr 4, 2023
@vuule vuule added non-breaking Non-breaking change and removed libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. CMake CMake build issue labels Apr 4, 2023
@github-actions github-actions bot added CMake CMake build issue Python Affects Python cuDF API. libcudf Affects libcudf (C++/CUDA) code. labels Apr 5, 2023
@vuule vuule marked this pull request as ready for review April 5, 2023 05:42
@vuule vuule requested a review from PointKernel April 8, 2023 04:02
Copy link
Member

@PointKernel PointKernel left a comment

Choose a reason for hiding this comment

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

LGTM

cpp/include/cudf/io/orc.hpp Show resolved Hide resolved
cpp/include/cudf/io/orc.hpp Outdated Show resolved Hide resolved
cpp/include/cudf/io/parquet.hpp Show resolved Hide resolved
cpp/src/io/orc/aggregate_orc_metadata.cpp Outdated Show resolved Hide resolved
cpp/src/io/utilities/row_selection.cpp Outdated Show resolved Hide resolved
cpp/src/io/parquet/reader_impl_helpers.cpp Show resolved Hide resolved
cpp/src/io/parquet/reader_impl_helpers.cpp Show resolved Hide resolved
cpp/src/io/orc/reader_impl.cu Outdated Show resolved Hide resolved
python/cudf/cudf/_lib/orc.pyx Show resolved Hide resolved
cpp/tests/io/row_selection_test.cpp Outdated Show resolved Hide resolved
@vuule vuule requested a review from vyasr April 11, 2023 19:31
@vuule vuule added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Apr 12, 2023
@vuule
Copy link
Contributor Author

vuule commented Apr 13, 2023

/merge

@rapids-bot rapids-bot bot merged commit f77403e into rapidsai:branch-23.06 Apr 13, 2023
@vuule vuule deleted the bug-skip_num_rows-strict branch August 10, 2023 03:29
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 bug Something isn't working CMake CMake build issue cuIO cuIO issue libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants