Skip to content

Conversation

@davidwendt
Copy link
Contributor

Description

Removes unneeded type check on the starts and stops column parameters in the cudf::strings::slice_strings API.
Both types are checked for valid index-types (integers) but the starts/stops types themselves do not need to match.
Also, added a gtest to show this is possible and supported now.

Closes #20435

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 self-assigned this Oct 30, 2025
@davidwendt davidwendt added bug Something isn't working 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels Oct 30, 2025
@copy-pr-bot
Copy link

copy-pr-bot bot commented Oct 30, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@davidwendt davidwendt changed the title Remove unneeded type check in strings::slice_strings Remove unneeded type check in cudf::strings::slice_strings Oct 30, 2025
@davidwendt
Copy link
Contributor Author

/ok to test

cudf::data_type_error);
CUDF_EXPECTS(is_fixed_width(starts_column.type()),
"Positions values must be fixed width type.",
cudf::data_type_error);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The indexalator-factory function below already checks these are valid index types.

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Oct 30, 2025
@davidwendt davidwendt marked this pull request as ready for review October 31, 2025 19:12
@davidwendt davidwendt requested a review from a team as a code owner October 31, 2025 19:12
@davidwendt davidwendt requested review from vyasr and wence- October 31, 2025 19:12
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Series.str.slice_from() fails when starts and stops have different integer dtypes

2 participants