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

Add overflow check when converting large strings to lists columns #15887

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

davidwendt
Copy link
Contributor

Description

Fixes a couple places where strings columns are converted to lists column as binary -- chars are represented as INT8.
Since lists columns only support size_type offsets type, this change will throw an error if the size of the chars exceeds max size_type 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.

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 30, 2024
@davidwendt davidwendt self-assigned this May 30, 2024
@davidwendt davidwendt requested a review from a team as a code owner May 30, 2024 15:16
@davidwendt
Copy link
Contributor Author

Perhaps it would be better to check the strings offsets type instead since the type is the real issue regardless of the chars size?
I welcome any opinions here.

@karthikeyann
Copy link
Contributor

My suggestion is to check the char_size. if a user can't convert large strings, the user may choose to batch it using slices < 2 GB. then offsets type will still remain same but it is possible to perform this operation.
Also, could we move the size check before the column contents are copied?

@davidwendt
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit fc31aa3 into rapidsai:branch-24.08 Jun 4, 2024
70 checks passed
@davidwendt davidwendt deleted the fix-str-to-list branch June 4, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants