Skip to content

Commit

Permalink
Apply has_nested_nulls() to binary search
Browse files Browse the repository at this point in the history
  • Loading branch information
ttnghia committed May 18, 2021
1 parent 13dbcfc commit ed12dde
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions cpp/src/search/search.cu
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@

namespace cudf {
namespace {
bool check_null_recursively(table_view const& input)
{
return std::any_of(input.begin(), input.end(), [](auto const& col) {
return col.has_nulls() ||
std::any_of(col.child_begin(), col.child_end(), [](auto const& child_col) {
return check_null_recursively(table_view{{child_col}});
});
});
}

template <typename DataIterator,
typename ValuesIterator,
typename OutputIterator,
Expand Down Expand Up @@ -111,7 +101,7 @@ std::unique_ptr<column> search_ordered(table_view const& t,
auto const matched = dictionary::detail::match_dictionaries({t, values}, stream);

// Prepare to flatten the structs column
auto const has_null_elements = check_null_recursively(t) or check_null_recursively(values);
auto const has_null_elements = has_nested_nulls(t) or has_nested_nulls(values);
auto const flatten_nullability = has_null_elements
? structs::detail::column_nullability::FORCE
: structs::detail::column_nullability::MATCH_INCOMING;
Expand Down

0 comments on commit ed12dde

Please sign in to comment.