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

Fix slice_strings to return empty strings for stop < start indices #13178

Merged
merged 3 commits into from
Apr 22, 2023

Conversation

davidwendt
Copy link
Contributor

Description

Fixes bug where stop value is less than start value in calls to cudf::strings::slice_strings should result in an empty string. Optimization in #13057 introduced this bug. Additional gtest was added to check for this condition.

Close #13173

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 bug Something isn't working 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. strings strings issues (C++ and Python) non-breaking Non-breaking change labels Apr 20, 2023
@davidwendt davidwendt self-assigned this Apr 20, 2023
Copy link
Member

@jlowe jlowe left a comment

Choose a reason for hiding this comment

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

Verified this fixes the substring integration test failure reported in NVIDIA/spark-rapids#8147

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Apr 20, 2023
@davidwendt davidwendt marked this pull request as ready for review April 20, 2023 21:39
@davidwendt davidwendt requested a review from a team as a code owner April 20, 2023 21:39
Copy link
Contributor

@mythrocks mythrocks left a comment

Choose a reason for hiding this comment

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

LGTM!

@davidwendt
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 097d6f2 into rapidsai:branch-23.06 Apr 22, 2023
@davidwendt davidwendt deleted the bug-slice-stop-zero branch April 22, 2023 00:11
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 bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change strings strings issues (C++ and Python)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] slice_strings changed behavior when stop < start
4 participants