-
Notifications
You must be signed in to change notification settings - Fork 915
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
Changes from all commits
ac2fcee
8acb3c3
83eaa6a
a27938f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -417,7 +417,9 @@ struct column_to_strings_fn { | |
auto child_view = lists_column_view(column).get_sliced_child(stream_); | ||
auto constexpr child_index = lists_column_view::child_column_index; | ||
auto list_string = [&]() { | ||
auto child_string = [&]() { | ||
// nulls are replaced due to special handling of all-null lists as empty lists | ||
// by join_list_elements | ||
auto child_string_with_null = [&]() { | ||
if (child_view.type().id() == type_id::STRUCT) { | ||
return (*this).template operator()<cudf::struct_view>( | ||
child_view, | ||
|
@@ -431,7 +433,9 @@ struct column_to_strings_fn { | |
} else { | ||
return cudf::type_dispatcher(child_view.type(), *this, child_view); | ||
} | ||
}(); | ||
}; | ||
auto child_string = cudf::strings::detail::replace_nulls( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used this to avoid the temporary. Updated. |
||
child_string_with_null()->view(), narep, stream_, rmm::mr::get_current_device_resource()); | ||
auto const list_child_string = | ||
column_view(column.type(), | ||
column.size(), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.