You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (boolean_mask.is_empty()) { returncudf::make_empty_column(lhs.type()); }
Is one of those places.
This happens before any type dispatch so if you passed in an empty mask instead of getting an empty column back you get an exception.
I also noticed that the type check is only for a single level type id. So it verifies that both are list or struct columns, but it does not verify that the child types are the same all the way down. This means if we fix the main issue with this bug we will end up with another issue where we might get an empty column that matches the lhs, but if lhs does not match rhs it will not be an exception.
Steps/Code to reproduce bug
diff --git a/cpp/tests/copying/copy_if_else_nested_tests.cpp b/cpp/tests/copying/copy_if_else_nested_tests.cpp
index 9ac34a3044..ea9c6462a9 100644
--- a/cpp/tests/copying/copy_if_else_nested_tests.cpp+++ b/cpp/tests/copying/copy_if_else_nested_tests.cpp@@ -135,6 +135,29 @@ TYPED_TEST(TypedCopyIfElseNestedTest, Lists)
CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(result_column->view(), expected_output->view());
}
+TYPED_TEST(TypedCopyIfElseNestedTest, ListsEmptyMask)+{+ using T = TypeParam;++ using namespace cudf;+ using namespace cudf::test;++ using lcw = lists_column_wrapper<T, int32_t>;++ auto lhs = lcw{}.release();+ auto rhs = lcw{}.release();++ auto selector_column = fixed_width_column_wrapper<bool, int32_t>{}.release();++ auto result_column = copy_if_else(lhs->view(), rhs->view(), selector_column->view());++ auto expected_output = lcw{}.release();++ CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(result_column->view(), expected_output->view());+}+++
TYPED_TEST(TypedCopyIfElseNestedTest, ListsWithNulls)
{
using T = TypeParam;
The text was updated successfully, but these errors were encountered:
So, this is not a hard fix, but it's also not simple because we're dealing with both columns and scalars here. If it were just columns we could call empty_like() and that would probably be it. But we have no scalar -> column empty_like(). I can add this, but it feels a little late to be doing it (13 hours to code freeze).
Describe the bug
Because of the bug fixed by #8314 I decided to take a look at everywhere that
make_empty_column
is used without an explicit type id.cudf/cpp/src/copying/copy.cu
Line 292 in de579a5
Is one of those places.
This happens before any type dispatch so if you passed in an empty mask instead of getting an empty column back you get an exception.
I also noticed that the type check is only for a single level type id. So it verifies that both are list or struct columns, but it does not verify that the child types are the same all the way down. This means if we fix the main issue with this bug we will end up with another issue where we might get an empty column that matches the lhs, but if lhs does not match rhs it will not be an exception.
Steps/Code to reproduce bug
The text was updated successfully, but these errors were encountered: