From 9fe27a78fab77e9446de5c7d8370b7b895fe5968 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Thu, 14 Oct 2021 15:35:45 -0400 Subject: [PATCH] Fix memcheck error in gtest SegmentedGatherTest/GatherSliced --- cpp/tests/copying/segmented_gather_list_tests.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cpp/tests/copying/segmented_gather_list_tests.cpp b/cpp/tests/copying/segmented_gather_list_tests.cpp index 528986e2a8d..514969dbeba 100644 --- a/cpp/tests/copying/segmented_gather_list_tests.cpp +++ b/cpp/tests/copying/segmented_gather_list_tests.cpp @@ -373,7 +373,8 @@ TYPED_TEST(SegmentedGatherTest, GatherSliced) auto const split_a = cudf::split(a, {3}); { - auto const gather_map = lists_column_view{LCW{{1, 2}, {0, 2}, {0, 1}}}; + auto const list = LCW{{1, 2}, {0, 2}, {0, 1}}; + auto const gather_map = lists_column_view{list}; auto const result = segmented_gather(lists_column_view{split_a[0]}, gather_map); auto const expected = LCW{ {{2, 2}, {3, 3}}, @@ -384,9 +385,9 @@ TYPED_TEST(SegmentedGatherTest, GatherSliced) } { - auto const gather_map = - lists_column_view{LCW{{0, 1}, LCW{}, LCW{}, {0, 1}, LCW{}}}; - auto const result = segmented_gather(lists_column_view{split_a[1]}, gather_map); + auto const list = LCW{{0, 1}, LCW{}, LCW{}, {0, 1}, LCW{}}; + auto const gather_map = lists_column_view{list}; + auto const result = segmented_gather(lists_column_view{split_a[1]}, gather_map); auto const expected = LCW{{{10, 10, 10}, {11, 11}}, LCW{}, LCW{}, {{50, 50, 50, 50}, {6, 13}}, LCW{}}; CUDF_TEST_EXPECT_COLUMNS_EQUAL(expected, result->view());