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 bug in all-null list due to join_list_elements special handling #12767

Merged

Conversation

karthikeyann
Copy link
Contributor

Description

All-null list is considered as empty list in join_list_elements. So, nulls of children are replaced by narep before passing to join_list_elements API.
Related #12766

Checklist

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

@karthikeyann karthikeyann added bug Something isn't working 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. 4 - Needs Review Waiting for reviewer to review or respond cuIO cuIO issue 4 - Needs cuIO Reviewer non-breaking Non-breaking change labels Feb 13, 2023
@karthikeyann karthikeyann self-assigned this Feb 13, 2023
@karthikeyann karthikeyann requested a review from a team as a code owner February 13, 2023 20:45
@karthikeyann karthikeyann requested a review from ttnghia February 15, 2023 13:28
}();
// nulls are replaced due to special handling of all-null lists as empty lists
// by join_list_elements
auto child_string = cudf::strings::detail::replace_nulls(
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocker: I think I'd prefer this to be two separate lines. First the IIFE, then call cudf::strings::detail::replace_nulls. It's just pretty long and complicated to read. After 20 lines of code, I forget that we're computing a function argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used this to avoid the temporary. Updated.

@@ -431,7 +433,9 @@ struct column_to_strings_fn {
} else {
return cudf::type_dispatcher(child_view.type(), *this, child_view);
}
}();
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
};
}();

Copy link
Contributor Author

@karthikeyann karthikeyann Feb 16, 2023

Choose a reason for hiding this comment

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

It is not IIFE. It's written this way to avoid the temporary variable. It will help reduce peak memory.

@karthikeyann
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit a00295a into rapidsai:branch-23.04 Feb 16, 2023
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 4 - Needs Review Waiting for reviewer to review or respond bug Something isn't working cuIO cuIO issue libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants