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 has_nonempty_nulls ignoring column offset #13647

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

ttnghia
Copy link
Contributor

@ttnghia ttnghia commented Jun 29, 2023

This fixes has_nonempty_nulls that always access the column offsets without considering the starting offset. As such, it may give wrong answer if the input column is sliced.

Closes #13638.

@ttnghia ttnghia added bug Something isn't working 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. Spark Functionality that helps Spark RAPIDS non-breaking Non-breaking change labels Jun 29, 2023
@ttnghia ttnghia self-assigned this Jun 29, 2023
@ttnghia ttnghia requested a review from a team as a code owner June 29, 2023 18:48
@ttnghia ttnghia requested review from mythrocks and davidwendt June 29, 2023 18:48
Comment on lines +45 to +46
auto const offsets = (type == type_id::STRING) ? (strings_column_view{input}).offsets_begin()
: (lists_column_view{input}).offsets_begin();
Copy link
Contributor Author

@ttnghia ttnghia Jun 29, 2023

Choose a reason for hiding this comment

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

FYI: offsets_begin = offsets().begin<offset_type>() + offset().

@ttnghia
Copy link
Contributor Author

ttnghia commented Jun 29, 2023

/merge

@rapids-bot rapids-bot bot merged commit a17ea9c into rapidsai:branch-23.08 Jun 29, 2023
@ttnghia ttnghia deleted the fix_has_nonempty_nulls branch June 29, 2023 21:39
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 Spark Functionality that helps Spark RAPIDS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] cudf::split on a String column returns a Column with non-empty nulls
4 participants