-
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
Fix bug in all-null list due to join_list_elements special handling #12767
Conversation
}(); | ||
// 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( |
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.
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.
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.
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); | |||
} | |||
}(); | |||
}; |
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.
/merge |
Description
All-null list is considered as empty list in
join_list_elements
. So, nulls of children are replaced bynarep
before passing tojoin_list_elements
API.Related #12766
Checklist