From 5dd19f081b13456e4619e92bc1cf75e9558f365f Mon Sep 17 00:00:00 2001 From: David Wendt Date: Mon, 17 Aug 2026 14:33:51 -0400 Subject: [PATCH] Change lists offsets from size_type to int32 in benchmarks and gtests --- cpp/benchmarks/lists/copying/scatter_lists.cu | 26 ++---- cpp/tests/copying/concatenate_tests.cpp | 8 +- cpp/tests/copying/get_value_tests.cpp | 13 ++- cpp/tests/copying/scatter_list_tests.cpp | 86 +++++++++---------- cpp/tests/groupby/collect_list_tests.cpp | 26 ++---- cpp/tests/hashing/murmurhash3_x86_32_test.cpp | 8 +- cpp/tests/io/cudftable_test.cpp | 19 ++-- cpp/tests/io/json/json_test.cpp | 36 ++++---- cpp/tests/io/parquet_chunked_reader_test.cu | 4 +- cpp/tests/io/parquet_chunked_writer_test.cpp | 13 ++- cpp/tests/io/parquet_reader_dict_test.cpp | 3 +- cpp/tests/io/parquet_reader_test.cpp | 16 ++-- cpp/tests/io/parquet_v2_test.cpp | 2 +- cpp/tests/lists/contains_tests.cpp | 6 +- cpp/tests/reductions/list_rank_test.cpp | 10 +-- cpp/tests/reshape/byte_cast_tests.cpp | 12 +-- cpp/tests/rolling/collect_ops_test.cpp | 29 +++---- cpp/tests/sort/top_k_tests.cpp | 2 +- cpp/tests/structs/structs_column_tests.cpp | 16 ++-- cpp/tests/transform/row_bit_count_test.cu | 6 +- cpp/tests/utilities/column_utilities.cu | 26 +++--- .../lists_column_wrapper_tests.cpp | 32 +++---- 22 files changed, 182 insertions(+), 217 deletions(-) diff --git a/cpp/benchmarks/lists/copying/scatter_lists.cu b/cpp/benchmarks/lists/copying/scatter_lists.cu index f4785887679e..ab440acbf51c 100644 --- a/cpp/benchmarks/lists/copying/scatter_lists.cu +++ b/cpp/benchmarks/lists/copying/scatter_lists.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -50,27 +50,19 @@ static void bench_scatter_lists(nvbench::state& state, nvbench::type_listmutable_view().begin(), target_base_col->mutable_view().end()); - auto source_offsets = - make_fixed_width_column(cudf::data_type{cudf::type_to_id()}, - num_rows + 1, - cudf::mask_state::UNALLOCATED, - stream, - mr); - auto target_offsets = - make_fixed_width_column(cudf::data_type{cudf::type_to_id()}, - num_rows + 1, - cudf::mask_state::UNALLOCATED, - stream, - mr); + auto source_offsets = make_fixed_width_column( + cudf::data_type{cudf::type_id::INT32}, num_rows + 1, cudf::mask_state::UNALLOCATED, stream, mr); + auto target_offsets = make_fixed_width_column( + cudf::data_type{cudf::type_id::INT32}, num_rows + 1, cudf::mask_state::UNALLOCATED, stream, mr); thrust::sequence(rmm::exec_policy_nosync(stream), - source_offsets->mutable_view().begin(), - source_offsets->mutable_view().end(), + source_offsets->mutable_view().begin(), + source_offsets->mutable_view().end(), 0, num_elements_per_row); thrust::sequence(rmm::exec_policy_nosync(stream), - target_offsets->mutable_view().begin(), - target_offsets->mutable_view().end(), + target_offsets->mutable_view().begin(), + target_offsets->mutable_view().end(), 0, num_elements_per_row); diff --git a/cpp/tests/copying/concatenate_tests.cpp b/cpp/tests/copying/concatenate_tests.cpp index 2ad9f0f62f3f..e23bf57c3216 100644 --- a/cpp/tests/copying/concatenate_tests.cpp +++ b/cpp/tests/copying/concatenate_tests.cpp @@ -381,7 +381,7 @@ TEST_F(OverflowTest, OverflowTest) constexpr auto size = static_cast(static_cast(1024) * 1024 * 1024); // try and concatenate 6 string columns of with 1 billion chars in each - auto offsets = cudf::test::fixed_width_column_wrapper{0, size}; + auto offsets = cudf::test::fixed_width_column_wrapper{0, size}; auto many_chars = rmm::device_uvector(size, cudf::get_default_stream()); auto col = cudf::make_strings_column( 1, offsets.release(), many_chars.release(), 0, rmm::device_buffer{}); @@ -422,7 +422,7 @@ TEST_F(OverflowTest, OverflowTest) cudf::make_structs_column(inner_size, std::move(children), 0, rmm::device_buffer{}); // list - auto offsets = cudf::test::fixed_width_column_wrapper{0, inner_size}; + auto offsets = cudf::test::fixed_width_column_wrapper{0, inner_size}; auto col = cudf::make_lists_column(1, offsets.release(), std::move(struct_col), 0, rmm::device_buffer{}); @@ -439,7 +439,7 @@ TEST_F(OverflowTest, OverflowTest) constexpr cudf::size_type size = 3; // list - auto offsets = cudf::test::fixed_width_column_wrapper{0, 0, 0, inner_size}; + auto offsets = cudf::test::fixed_width_column_wrapper{0, 0, 0, inner_size}; auto many_chars = cudf::make_fixed_width_column(cudf::data_type{cudf::type_id::INT8}, inner_size); auto list_col = @@ -645,7 +645,7 @@ TEST_F(OverflowTest, Presliced) constexpr cudf::size_type list_size = inner_size / num_rows; // list - auto offsets = cudf::test::fixed_width_column_wrapper{ + auto offsets = cudf::test::fixed_width_column_wrapper{ 0, list_size, (list_size * 2) - 1, list_size * 3, inner_size}; auto many_chars = cudf::make_fixed_width_column(cudf::data_type{cudf::type_id::INT8}, inner_size); diff --git a/cpp/tests/copying/get_value_tests.cpp b/cpp/tests/copying/get_value_tests.cpp index db117e6a4d54..f2e9107ca452 100644 --- a/cpp/tests/copying/get_value_tests.cpp +++ b/cpp/tests/copying/get_value_tests.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -883,12 +883,11 @@ TEST_F(StructGetValueTest, multi_level_nested) // col fields LCW l3({LCW{1, 1, 1}, LCW{2, 2}, LCW{3}}, validity_mask_t{false, true, true}.begin()); cudf::test::structs_column_wrapper l2{l3}; - auto l1 = - cudf::make_lists_column(1, - cudf::test::fixed_width_column_wrapper{0, 3}.release(), - l2.release(), - 0, - cudf::create_null_mask(1, cudf::mask_state::UNALLOCATED)); + auto l1 = cudf::make_lists_column(1, + cudf::test::fixed_width_column_wrapper{0, 3}.release(), + l2.release(), + 0, + cudf::create_null_mask(1, cudf::mask_state::UNALLOCATED)); std::vector> l0_fields; l0_fields.emplace_back(std::move(l1)); cudf::test::structs_column_wrapper l0(std::move(l0_fields)); diff --git a/cpp/tests/copying/scatter_list_tests.cpp b/cpp/tests/copying/scatter_list_tests.cpp index 354aca593ad9..083e5fecf680 100644 --- a/cpp/tests/copying/scatter_list_tests.cpp +++ b/cpp/tests/copying/scatter_list_tests.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -84,12 +84,12 @@ TYPED_TEST(TypedScatterListsTest, EmptyListsOfFixedWidth) }; // One null list row, and one row with nulls. - auto src_list_column = cudf::make_lists_column( - 3, - cudf::test::fixed_width_column_wrapper{0, 4, 7, 7}.release(), - src_child.release(), - 0, - {}); + auto src_list_column = + cudf::make_lists_column(3, + cudf::test::fixed_width_column_wrapper{0, 4, 7, 7}.release(), + src_child.release(), + 0, + {}); auto target_list_column = cudf::test::lists_column_wrapper{ {0, 0}, {1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}}; @@ -104,7 +104,7 @@ TYPED_TEST(TypedScatterListsTest, EmptyListsOfFixedWidth) {8, 8, 8, 1, 1, 9, 9, 9, 9, 3, 3, 4, 4, 6, 6}}; auto expected_lists_column = cudf::make_lists_column( 7, - cudf::test::fixed_width_column_wrapper{0, 3, 5, 9, 11, 13, 13, 15}.release(), + cudf::test::fixed_width_column_wrapper{0, 3, 5, 9, 11, 13, 13, 15}.release(), expected_child_ints.release(), 0, {}); @@ -120,12 +120,12 @@ TYPED_TEST(TypedScatterListsTest, EmptyListsOfNullableFixedWidth) {1, 1, 1, 0, 1, 1, 1}}; // One null list row, and one row with nulls. - auto src_list_column = cudf::make_lists_column( - 3, - cudf::test::fixed_width_column_wrapper{0, 4, 7, 7}.release(), - src_child.release(), - 0, - {}); + auto src_list_column = + cudf::make_lists_column(3, + cudf::test::fixed_width_column_wrapper{0, 4, 7, 7}.release(), + src_child.release(), + 0, + {}); auto target_list_column = cudf::test::lists_column_wrapper{ {0, 0}, {1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}}; @@ -140,7 +140,7 @@ TYPED_TEST(TypedScatterListsTest, EmptyListsOfNullableFixedWidth) {8, 8, 8, 1, 1, 9, 9, 9, 9, 3, 3, 4, 4, 6, 6}, {1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1}}; auto expected_lists_column = cudf::make_lists_column( 7, - cudf::test::fixed_width_column_wrapper{0, 3, 5, 9, 11, 13, 13, 15}.release(), + cudf::test::fixed_width_column_wrapper{0, 3, 5, 9, 11, 13, 13, 15}.release(), expected_child_ints.release(), 0, {}); @@ -159,12 +159,12 @@ TYPED_TEST(TypedScatterListsTest, NullableListsOfNullableFixedWidth) auto [null_mask, null_count] = cudf::test::detail::make_null_mask(src_list_validity, src_list_validity + 3); // One null list row, and one row with nulls. - auto src_list_column = cudf::make_lists_column( - 3, - cudf::test::fixed_width_column_wrapper{0, 4, 7, 7}.release(), - src_child.release(), - null_count, - std::move(null_mask)); + auto src_list_column = + cudf::make_lists_column(3, + cudf::test::fixed_width_column_wrapper{0, 4, 7, 7}.release(), + src_child.release(), + null_count, + std::move(null_mask)); auto target_list_column = cudf::test::lists_column_wrapper{ {0, 0}, {1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}}; @@ -183,7 +183,7 @@ TYPED_TEST(TypedScatterListsTest, NullableListsOfNullableFixedWidth) cudf::test::detail::make_null_mask(expected_validity, expected_validity + 7); auto expected_lists_column = cudf::make_lists_column( 7, - cudf::test::fixed_width_column_wrapper{0, 3, 5, 9, 11, 13, 13, 15}.release(), + cudf::test::fixed_width_column_wrapper{0, 3, 5, 9, 11, 13, 13, 15}.release(), expected_child_ints.release(), null_count, std::move(null_mask)); @@ -223,12 +223,12 @@ TEST_F(ScatterListsTest, ListsOfNullableStrings) cudf::test::strings_column_wrapper{{"all", "the", "leaves", "", "brown", "", "dreaming"}, {true, true, true, false, true, false, true}}; - auto src_list_column = cudf::make_lists_column( - 2, - cudf::test::fixed_width_column_wrapper{0, 5, 7}.release(), - src_strings_column.release(), - 0, - {}); + auto src_list_column = + cudf::make_lists_column(2, + cudf::test::fixed_width_column_wrapper{0, 5, 7}.release(), + src_strings_column.release(), + 0, + {}); auto target_list_column = cudf::test::lists_column_wrapper{{"zero"}, {"one", "one"}, @@ -263,7 +263,7 @@ TEST_F(ScatterListsTest, ListsOfNullableStrings) auto expected_lists = cudf::make_lists_column( 6, - cudf::test::fixed_width_column_wrapper{0, 2, 4, 9, 11, 13, 15}.release(), + cudf::test::fixed_width_column_wrapper{0, 2, 4, 9, 11, 13, 15}.release(), expected_strings.release(), 0, {}); @@ -277,12 +277,12 @@ TEST_F(ScatterListsTest, EmptyListsOfNullableStrings) cudf::test::strings_column_wrapper{{"all", "the", "leaves", "", "brown", "", "dreaming"}, {true, true, true, false, true, false, true}}; - auto src_list_column = cudf::make_lists_column( - 3, - cudf::test::fixed_width_column_wrapper{0, 5, 5, 7}.release(), - src_strings_column.release(), - 0, - {}); + auto src_list_column = + cudf::make_lists_column(3, + cudf::test::fixed_width_column_wrapper{0, 5, 5, 7}.release(), + src_strings_column.release(), + 0, + {}); auto target_list_column = cudf::test::lists_column_wrapper{{"zero"}, {"one", "one"}, @@ -315,7 +315,7 @@ TEST_F(ScatterListsTest, EmptyListsOfNullableStrings) auto expected_lists = cudf::make_lists_column( 6, - cudf::test::fixed_width_column_wrapper{0, 2, 4, 9, 11, 11, 13}.release(), + cudf::test::fixed_width_column_wrapper{0, 2, 4, 9, 11, 11, 13}.release(), expected_strings.release(), 0, {}); @@ -331,12 +331,12 @@ TEST_F(ScatterListsTest, NullableListsOfNullableStrings) auto src_validity = cudf::test::iterators::null_at(1); auto [null_mask, null_count] = cudf::test::detail::make_null_mask(src_validity, src_validity + 3); - auto src_list_column = cudf::make_lists_column( - 3, - cudf::test::fixed_width_column_wrapper{0, 5, 5, 7}.release(), - src_strings_column.release(), - null_count, - std::move(null_mask)); + auto src_list_column = + cudf::make_lists_column(3, + cudf::test::fixed_width_column_wrapper{0, 5, 5, 7}.release(), + src_strings_column.release(), + null_count, + std::move(null_mask)); auto target_list_column = cudf::test::lists_column_wrapper{{"zero"}, {"one", "one"}, @@ -372,7 +372,7 @@ TEST_F(ScatterListsTest, NullableListsOfNullableStrings) cudf::test::detail::make_null_mask(expected_validity, expected_validity + 6); auto expected_lists = cudf::make_lists_column( 6, - cudf::test::fixed_width_column_wrapper{0, 2, 4, 9, 11, 11, 13}.release(), + cudf::test::fixed_width_column_wrapper{0, 2, 4, 9, 11, 11, 13}.release(), expected_strings.release(), null_count, std::move(null_mask)); diff --git a/cpp/tests/groupby/collect_list_tests.cpp b/cpp/tests/groupby/collect_list_tests.cpp index b416b22b6a86..601ed4e9736a 100644 --- a/cpp/tests/groupby/collect_list_tests.cpp +++ b/cpp/tests/groupby/collect_list_tests.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -162,30 +162,18 @@ TYPED_TEST(groupby_collect_list_test, CollectOnEmptyInputListsOfStructs) auto struct_child = LCW{}; auto struct_column = cudf::test::structs_column_wrapper{{struct_child}}; - auto values = - cudf::make_lists_column(0, - cudf::make_empty_column(cudf::type_to_id()), - struct_column.release(), - 0, - {}); + auto values = cudf::make_lists_column( + 0, cudf::make_empty_column(cudf::type_id::INT32), struct_column.release(), 0, {}); cudf::test::fixed_width_column_wrapper expect_keys{}; auto expect_struct_child = LCW{}; auto expect_struct_column = cudf::test::structs_column_wrapper{{expect_struct_child}}; - auto expect_child = - cudf::make_lists_column(0, - cudf::make_empty_column(cudf::type_to_id()), - expect_struct_column.release(), - 0, - {}); - auto expect_values = - cudf::make_lists_column(0, - cudf::make_empty_column(cudf::type_to_id()), - std::move(expect_child), - 0, - {}); + auto expect_child = cudf::make_lists_column( + 0, cudf::make_empty_column(cudf::type_id::INT32), expect_struct_column.release(), 0, {}); + auto expect_values = cudf::make_lists_column( + 0, cudf::make_empty_column(cudf::type_id::INT32), std::move(expect_child), 0, {}); auto agg = cudf::make_collect_list_aggregation(); test_single_agg(keys, values->view(), expect_keys, expect_values->view(), std::move(agg)); diff --git a/cpp/tests/hashing/murmurhash3_x86_32_test.cpp b/cpp/tests/hashing/murmurhash3_x86_32_test.cpp index bb0b5cc41efa..6ce28ee7f4b0 100644 --- a/cpp/tests/hashing/murmurhash3_x86_32_test.cpp +++ b/cpp/tests/hashing/murmurhash3_x86_32_test.cpp @@ -252,7 +252,7 @@ TEST_F(MurmurHashTest, ListOfStruct) true, true}}; - auto offsets = cudf::test::fixed_width_column_wrapper{ + auto offsets = cudf::test::fixed_width_column_wrapper{ 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 8, 10, 12, 14, 15, 16, 17, 18}; auto list_nullmask = std::vector{true, @@ -343,8 +343,8 @@ TEST_F(MurmurHashTest, ListOfEmptyStruct) cudf::test::detail::make_null_mask(struct_validity.begin(), struct_validity.end()); auto struct_col = cudf::make_structs_column(14, {}, null_count, std::move(null_mask)); - auto offsets = cudf::test::fixed_width_column_wrapper{ - 0, 0, 0, 0, 0, 2, 4, 6, 7, 8, 9, 10, 12, 14}; + auto offsets = + cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 0, 2, 4, 6, 7, 8, 9, 10, 12, 14}; auto list_nullmask = std::vector{ true, true, false, false, true, true, true, true, true, true, true, true, true}; std::tie(null_mask, null_count) = @@ -381,7 +381,7 @@ TEST_F(MurmurHashTest, EmptyDeepList) // Internal empty list auto list1 = cudf::test::lists_column_wrapper{}; - auto offsets = cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 0}; + auto offsets = cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 0}; auto list_nullmask = std::vector{true, true, false, false}; auto [null_mask, null_count] = cudf::test::detail::make_null_mask(list_nullmask.begin(), list_nullmask.end()); diff --git a/cpp/tests/io/cudftable_test.cpp b/cpp/tests/io/cudftable_test.cpp index 63859cb99d30..0847f0a90398 100644 --- a/cpp/tests/io/cudftable_test.cpp +++ b/cpp/tests/io/cudftable_test.cpp @@ -398,13 +398,12 @@ TEST_F(CudftableTest, Lists) cudf::test::lists_column_wrapper child_list{{1, 2}, {3, 4}, {5, 6, 7}, {8}, {}, {9, 10}}; auto lists_of_lists_offsets = - cudf::test::fixed_width_column_wrapper{0, 2, 4, 6, 6}.release(); + cudf::test::fixed_width_column_wrapper{0, 2, 4, 6, 6}.release(); auto lists_of_lists_col = cudf::make_lists_column( 4, std::move(lists_of_lists_offsets), child_list.release(), 0, rmm::device_buffer{}); cudf::test::strings_column_wrapper strings_child{"hello", "world", "foo", "bar", "baz", "test"}; - auto strings_offsets = - cudf::test::fixed_width_column_wrapper{0, 2, 5, 5, 6}.release(); + auto strings_offsets = cudf::test::fixed_width_column_wrapper{0, 2, 5, 5, 6}.release(); auto lists_of_strings_col = cudf::make_lists_column( 4, std::move(strings_offsets), strings_child.release(), 0, rmm::device_buffer{}); @@ -416,7 +415,7 @@ TEST_F(CudftableTest, Lists) cudf::timestamp_ms{500ms}, cudf::timestamp_ms{600ms}}; auto timestamps_offsets = - cudf::test::fixed_width_column_wrapper{0, 2, 3, 3, 6}.release(); + cudf::test::fixed_width_column_wrapper{0, 2, 3, 3, 6}.release(); auto lists_of_timestamps_col = cudf::make_lists_column( 4, std::move(timestamps_offsets), timestamps_child.release(), 0, rmm::device_buffer{}); @@ -426,15 +425,13 @@ TEST_F(CudftableTest, Lists) cudf::duration_ns{3000ns}, cudf::duration_ns{4000ns}, cudf::duration_ns{5000ns}}; - auto durations_offsets = - cudf::test::fixed_width_column_wrapper{0, 2, 3, 3, 5}.release(); + auto durations_offsets = cudf::test::fixed_width_column_wrapper{0, 2, 3, 3, 5}.release(); auto lists_of_durations_col = cudf::make_lists_column( 4, std::move(durations_offsets), durations_child.release(), 0, rmm::device_buffer{}); cudf::test::fixed_point_column_wrapper decimal32_child{ {12345, -67890, 99999, 0}, {true, true, true, true}, scale_type{2}}; - auto decimal32_offsets = - cudf::test::fixed_width_column_wrapper{0, 2, 3, 3, 4}.release(); + auto decimal32_offsets = cudf::test::fixed_width_column_wrapper{0, 2, 3, 3, 4}.release(); auto lists_of_decimals_col = cudf::make_lists_column( 4, std::move(decimal32_offsets), decimal32_child.release(), 0, rmm::device_buffer{}); @@ -442,7 +439,7 @@ TEST_F(CudftableTest, Lists) cudf::test::strings_column_wrapper struct_col2{"a", "b", "c", "d", "e", "f"}; cudf::test::structs_column_wrapper struct_col{{struct_col1, struct_col2}}; auto lists_of_structs_offsets = - cudf::test::fixed_width_column_wrapper{0, 1, 3, 4, 6}.release(); + cudf::test::fixed_width_column_wrapper{0, 1, 3, 4, 6}.release(); auto lists_of_structs_col = cudf::make_lists_column( 4, std::move(lists_of_structs_offsets), struct_col.release(), 0, rmm::device_buffer{}); @@ -488,11 +485,11 @@ TEST_F(CudftableTest, DeepNestingLists) { cudf::test::lists_column_wrapper level3_list{{1, 2}, {3, 4}, {5}, {6, 7, 8}}; - auto level2_offsets = cudf::test::fixed_width_column_wrapper{0, 2, 4}.release(); + auto level2_offsets = cudf::test::fixed_width_column_wrapper{0, 2, 4}.release(); auto level2_list = cudf::make_lists_column( 2, std::move(level2_offsets), level3_list.release(), 0, rmm::device_buffer{}); - auto level1_offsets = cudf::test::fixed_width_column_wrapper{0, 2}.release(); + auto level1_offsets = cudf::test::fixed_width_column_wrapper{0, 2}.release(); auto level1_list = cudf::make_lists_column( 1, std::move(level1_offsets), std::move(level2_list), 0, rmm::device_buffer{}); diff --git a/cpp/tests/io/json/json_test.cpp b/cpp/tests/io/json/json_test.cpp index 161dca4f1669..ef1ddfc13dee 100644 --- a/cpp/tests/io/json/json_test.cpp +++ b/cpp/tests/io/json/json_test.cpp @@ -3360,12 +3360,12 @@ TEST_F(JsonReaderTest, JsonNestedDtypeFilterWithOrder) auto empty_string_col = cudf::test::strings_column_wrapper{}; cudf::test::structs_column_wrapper expected_structs{{}, cudf::test::iterators::all_nulls()}; // make all null column of list of struct of string - auto wrapped = make_lists_column( - 4, - cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 0}.release(), - expected_structs.release(), - 4, - cudf::create_null_mask(4, cudf::mask_state::ALL_NULL)); + auto wrapped = + make_lists_column(4, + cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 0}.release(), + expected_structs.release(), + 4, + cudf::create_null_mask(4, cudf::mask_state::ALL_NULL)); CUDF_TEST_EXPECT_COLUMNS_EQUAL(result.tbl->get_column(2), *wrapped); } } @@ -3420,11 +3420,12 @@ TEST_F(JsonReaderTest, JsonNestedDtypeFilterWithOrder) auto const valids = std::vector{1, 0}; auto [null_mask, null_count] = cudf::test::detail::make_null_mask(valids.begin(), valids.end()); - return cudf::make_lists_column(2, - size_type_wrapper{0, 1, 1}.release(), - int64_wrapper{1}.release(), - null_count, - std::move(null_mask)); + return cudf::make_lists_column( + 2, + cudf::test::fixed_width_column_wrapper{0, 1, 1}.release(), + int64_wrapper{1}.release(), + null_count, + std::move(null_mask)); }(); auto const expected1 = [&] { @@ -3435,11 +3436,12 @@ TEST_F(JsonReaderTest, JsonNestedDtypeFilterWithOrder) auto const valids = std::vector{0, 0}; auto [null_mask, null_count] = cudf::test::detail::make_null_mask(valids.begin(), valids.end()); - return cudf::make_lists_column(2, - size_type_wrapper{0, 0, 0}.release(), - get_structs().release(), - null_count, - std::move(null_mask)); + return cudf::make_lists_column( + 2, + cudf::test::fixed_width_column_wrapper{0, 0, 0}.release(), + get_structs().release(), + null_count, + std::move(null_mask)); }(); CUDF_TEST_EXPECT_COLUMNS_EQUAL(*expected0, result.tbl->get_column(0).view()); @@ -3504,7 +3506,7 @@ TEST_F(JsonReaderTest, NullifyMixedList) cudf::test::detail::make_null_mask(list_nulls.cbegin(), list_nulls.cend()); auto const expected = cudf::make_lists_column( 7, - cudf::test::fixed_width_column_wrapper{0, 0, 1, 1, 1, 1, 3, 3}.release(), + cudf::test::fixed_width_column_wrapper{0, 0, 1, 1, 1, 1, 3, 3}.release(), get_structs(), null_count, std::move(null_mask)); diff --git a/cpp/tests/io/parquet_chunked_reader_test.cu b/cpp/tests/io/parquet_chunked_reader_test.cu index 4e259ab719d1..7be56f31d6c7 100644 --- a/cpp/tests/io/parquet_chunked_reader_test.cu +++ b/cpp/tests/io/parquet_chunked_reader_test.cu @@ -2319,8 +2319,8 @@ TEST_F(ParquetReaderTest, BooleanList) auto bools_col = cudf::test::fixed_width_column_wrapper(bools_iter, bools_iter + num_rows, valids); auto offsets_iter = cuda::counting_iterator{0}; - auto offsets_col = cudf::test::fixed_width_column_wrapper( - offsets_iter, offsets_iter + num_rows + 1); + auto offsets_col = + cudf::test::fixed_width_column_wrapper(offsets_iter, offsets_iter + num_rows + 1); auto [null_mask, null_count] = cudf::test::detail::make_null_mask(list_valids, list_valids + num_rows); auto _col1 = cudf::make_lists_column( diff --git a/cpp/tests/io/parquet_chunked_writer_test.cpp b/cpp/tests/io/parquet_chunked_writer_test.cpp index 4e80be614b7c..68b3317672f3 100644 --- a/cpp/tests/io/parquet_chunked_writer_test.cpp +++ b/cpp/tests/io/parquet_chunked_writer_test.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -209,7 +209,7 @@ TEST_F(ParquetChunkedWriterTest, ListOfStruct) auto struct_2_1 = cudf::test::structs_column_wrapper{{is_human_1, struct_1_1}}; auto list_offsets_column_1 = - cudf::test::fixed_width_column_wrapper{0, 2, 3, 3}.release(); + cudf::test::fixed_width_column_wrapper{0, 2, 3, 3}.release(); auto num_list_rows_1 = list_offsets_column_1->size() - 1; auto list_col_1 = cudf::make_lists_column( @@ -227,7 +227,7 @@ TEST_F(ParquetChunkedWriterTest, ListOfStruct) auto struct_2_2 = cudf::test::structs_column_wrapper{{is_human_2, struct_1_2}}; auto list_offsets_column_2 = - cudf::test::fixed_width_column_wrapper{0, 1, 2, 3}.release(); + cudf::test::fixed_width_column_wrapper{0, 1, 2, 3}.release(); auto num_list_rows_2 = list_offsets_column_2->size() - 1; auto list_col_2 = cudf::make_lists_column( @@ -287,7 +287,7 @@ TEST_F(ParquetChunkedWriterTest, ListOfStructOfStructOfListOfList) auto struct_2_1 = cudf::test::structs_column_wrapper{{is_human_1, struct_1_1}}; auto list_offsets_column_1 = - cudf::test::fixed_width_column_wrapper{0, 2, 3, 4}.release(); + cudf::test::fixed_width_column_wrapper{0, 2, 3, 4}.release(); auto num_list_rows_1 = list_offsets_column_1->size() - 1; auto list_col_1 = cudf::make_lists_column( @@ -312,9 +312,8 @@ TEST_F(ParquetChunkedWriterTest, ListOfStructOfStructOfListOfList) auto is_human_2 = cudf::test::fixed_width_column_wrapper{{false, false}, {true, false}}; auto struct_2_2 = cudf::test::structs_column_wrapper{{is_human_2, struct_1_2}}; - auto list_offsets_column_2 = - cudf::test::fixed_width_column_wrapper{0, 1, 2}.release(); - auto num_list_rows_2 = list_offsets_column_2->size() - 1; + auto list_offsets_column_2 = cudf::test::fixed_width_column_wrapper{0, 1, 2}.release(); + auto num_list_rows_2 = list_offsets_column_2->size() - 1; auto list_col_2 = cudf::make_lists_column( num_list_rows_2, std::move(list_offsets_column_2), struct_2_2.release(), 0, {}); diff --git a/cpp/tests/io/parquet_reader_dict_test.cpp b/cpp/tests/io/parquet_reader_dict_test.cpp index 80e2cf6dcf56..2e5f3ae5d11f 100644 --- a/cpp/tests/io/parquet_reader_dict_test.cpp +++ b/cpp/tests/io/parquet_reader_dict_test.cpp @@ -93,8 +93,7 @@ std::unique_ptr make_low_cardinality_lists_of_strings() auto child = cudf::test::strings_column_wrapper(child_strings.begin(), child_strings.end()); auto offsets_col = - cudf::test::fixed_width_column_wrapper(offsets.begin(), offsets.end()) - .release(); + cudf::test::fixed_width_column_wrapper(offsets.begin(), offsets.end()).release(); return cudf::make_lists_column( num_rows, std::move(offsets_col), child.release(), 0, rmm::device_buffer{}); diff --git a/cpp/tests/io/parquet_reader_test.cpp b/cpp/tests/io/parquet_reader_test.cpp index 08e48dd213eb..0e122323f44d 100644 --- a/cpp/tests/io/parquet_reader_test.cpp +++ b/cpp/tests/io/parquet_reader_test.cpp @@ -2822,7 +2822,7 @@ TEST_F(ParquetReaderTest, RepeatedNoAnnotations) auto struct_col = cudf::test::structs_column_wrapper{{child0, child1}}; auto list_offsets_column = - cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 1, 2, 5}.release(); + cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 1, 2, 5}.release(); auto num_list_rows = list_offsets_column->size() - 1; auto mask = cudf::create_null_mask(6, cudf::mask_state::ALL_VALID); @@ -2936,10 +2936,9 @@ TEST_F(ParquetReaderTest, RepeatedNoAnnotationsSingleFieldNested) EXPECT_EQ(inner_child.child(0).type().id(), cudf::type_id::INT32); column_wrapper inner_someid{3, 6, 9}; - auto inner_struct = cudf::test::structs_column_wrapper{{inner_someid}}; - auto inner_list_offsets = - cudf::test::fixed_width_column_wrapper{0, 1, 2, 3}.release(); - auto inner_list = cudf::make_lists_column( + auto inner_struct = cudf::test::structs_column_wrapper{{inner_someid}}; + auto inner_list_offsets = cudf::test::fixed_width_column_wrapper{0, 1, 2, 3}.release(); + auto inner_list = cudf::make_lists_column( 3, std::move(inner_list_offsets), inner_struct.release(), 0, rmm::device_buffer{}); column_wrapper outer_id{1, 4, 7}; @@ -2948,9 +2947,8 @@ TEST_F(ParquetReaderTest, RepeatedNoAnnotationsSingleFieldNested) outer_struct_children.push_back(std::move(inner_list)); auto outer_struct_col = cudf::test::structs_column_wrapper{{std::move(outer_struct_children)}}; - auto outer_list_offsets = - cudf::test::fixed_width_column_wrapper{0, 1, 2, 3}.release(); - auto outer_list_col = cudf::make_lists_column( + auto outer_list_offsets = cudf::test::fixed_width_column_wrapper{0, 1, 2, 3}.release(); + auto outer_list_col = cudf::make_lists_column( 3, std::move(outer_list_offsets), outer_struct_col.release(), 0, rmm::device_buffer{}); // Testing for equivalence here because we only care about the outermost validity buffers. @@ -3188,7 +3186,7 @@ TEST_F(ParquetReaderTest, DeltaByteArrayMapSkipRows) auto vals_col = cudf::test::strings_column_wrapper(vals.begin(), vals.end()); auto struct_col = cudf::test::structs_column_wrapper({keys_col, vals_col}).release(); auto offsets_col = - cudf::test::fixed_width_column_wrapper(offsets.begin(), offsets.end()); + cudf::test::fixed_width_column_wrapper(offsets.begin(), offsets.end()); auto const map_col = cudf::make_lists_column( num_rows, offsets_col.release(), std::move(struct_col), 0, rmm::device_buffer{}); auto const expected = cudf::table_view({map_col->view()}); diff --git a/cpp/tests/io/parquet_v2_test.cpp b/cpp/tests/io/parquet_v2_test.cpp index 1cc4209af991..1035dcf272d3 100644 --- a/cpp/tests/io/parquet_v2_test.cpp +++ b/cpp/tests/io/parquet_v2_test.cpp @@ -586,7 +586,7 @@ TEST_P(ParquetV2Test, ListOfStruct) .release(); auto list_offsets_column = - cudf::test::fixed_width_column_wrapper{0, 2, 5, 5, 6}.release(); + cudf::test::fixed_width_column_wrapper{0, 2, 5, 5, 6}.release(); auto num_list_rows = list_offsets_column->size() - 1; auto list_col = cudf::make_lists_column( diff --git a/cpp/tests/lists/contains_tests.cpp b/cpp/tests/lists/contains_tests.cpp index e83da89df49b..856b0e0dd6af 100644 --- a/cpp/tests/lists/contains_tests.cpp +++ b/cpp/tests/lists/contains_tests.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * */ @@ -372,7 +372,7 @@ TEST_F(ContainsTest, BoolScalarWithNullsInLists) cudf::test::detail::make_null_mask(input_null_mask_iter, input_null_mask_iter + 8); auto search_space = cudf::make_lists_column( 8, - cudf::test::fixed_width_column_wrapper{0, 1, 3, 7, 7, 7, 10, 11, 15}.release(), + cudf::test::fixed_width_column_wrapper{0, 1, 3, 7, 7, 7, 10, 11, 15}.release(), numerals.release(), null_count, std::move(null_mask)); @@ -772,7 +772,7 @@ TEST_F(ContainsTest, StringKeyVectorWithNullsInListsAndInSearchKeys) cudf::test::detail::make_null_mask(input_null_mask_iter, input_null_mask_iter + 8); auto search_space = cudf::make_lists_column( 8, - cudf::test::fixed_width_column_wrapper{0, 1, 3, 7, 7, 7, 10, 11, 15}.release(), + cudf::test::fixed_width_column_wrapper{0, 1, 3, 7, 7, 7, 10, 11, 15}.release(), strings.release(), null_count, std::move(null_mask)); diff --git a/cpp/tests/reductions/list_rank_test.cpp b/cpp/tests/reductions/list_rank_test.cpp index 0fcb85082ea9..732cad257e68 100644 --- a/cpp/tests/reductions/list_rank_test.cpp +++ b/cpp/tests/reductions/list_rank_test.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -159,7 +159,7 @@ TEST_F(ListRankScanTest, ListOfStruct) true, true}}; - auto offsets = cudf::test::fixed_width_column_wrapper{ + auto offsets = cudf::test::fixed_width_column_wrapper{ 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 8, 10, 12, 14, 15, 16, 17, 18}; auto list_nullmask = std::vector{true, @@ -235,8 +235,8 @@ TEST_F(ListRankScanTest, ListOfEmptyStruct) cudf::test::detail::make_null_mask(struct_validity.begin(), struct_validity.end()); auto struct_col = cudf::make_structs_column(14, {}, null_count, std::move(null_mask)); - auto offsets = cudf::test::fixed_width_column_wrapper{ - 0, 0, 0, 0, 0, 2, 4, 6, 7, 8, 9, 10, 12, 14}; + auto offsets = + cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 0, 2, 4, 6, 7, 8, 9, 10, 12, 14}; auto list_nullmask = std::vector{ true, true, false, false, true, true, true, true, true, true, true, true, true}; std::tie(null_mask, null_count) = @@ -265,7 +265,7 @@ TEST_F(ListRankScanTest, EmptyDeepList) // Internal empty list auto list1 = cudf::test::lists_column_wrapper{}; - auto offsets = cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 0}; + auto offsets = cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 0}; auto list_nullmask = std::vector{true, true, false, false}; auto [null_mask, null_count] = cudf::test::detail::make_null_mask(list_nullmask.begin(), list_nullmask.end()); diff --git a/cpp/tests/reshape/byte_cast_tests.cpp b/cpp/tests/reshape/byte_cast_tests.cpp index cbf6874ea52f..850d2ac8c969 100644 --- a/cpp/tests/reshape/byte_cast_tests.cpp +++ b/cpp/tests/reshape/byte_cast_tests.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -48,7 +48,7 @@ TEST_F(ByteCastTest, int16ValuesWithNulls) auto [null_mask, null_count] = cudf::test::detail::make_null_mask(odd_validity, odd_validity + 5); auto int16_expected = cudf::make_lists_column( 5, - cudf::test::fixed_width_column_wrapper{0, 0, 2, 2, 4, 4}.release(), + cudf::test::fixed_width_column_wrapper{0, 0, 2, 2, 4, 4}.release(), int16_data.release(), null_count, std::move(null_mask)); @@ -95,7 +95,7 @@ TEST_F(ByteCastTest, int32ValuesWithNulls) auto int32_expected = cudf::make_lists_column( 5, - cudf::test::fixed_width_column_wrapper{0, 4, 4, 8, 8, 12}.release(), + cudf::test::fixed_width_column_wrapper{0, 4, 4, 8, 8, 12}.release(), int32_data.release(), null_count, std::move(null_mask)); @@ -148,7 +148,7 @@ TEST_F(ByteCastTest, int64ValuesWithNulls) auto [null_mask, null_count] = cudf::test::detail::make_null_mask(odd_validity, odd_validity + 5); auto int64_expected = cudf::make_lists_column( 5, - cudf::test::fixed_width_column_wrapper{0, 0, 8, 8, 16, 16}.release(), + cudf::test::fixed_width_column_wrapper{0, 0, 8, 8, 16, 16}.release(), int64_data.release(), null_count, std::move(null_mask)); @@ -209,7 +209,7 @@ TEST_F(ByteCastTest, fp32ValuesWithNulls) cudf::test::detail::make_null_mask(even_validity, even_validity + 5); auto fp32_expected = cudf::make_lists_column( 5, - cudf::test::fixed_width_column_wrapper{0, 4, 4, 8, 8, 12}.release(), + cudf::test::fixed_width_column_wrapper{0, 4, 4, 8, 8, 12}.release(), fp32_data.release(), null_count, std::move(null_mask)); @@ -279,7 +279,7 @@ TEST_F(ByteCastTest, fp64ValuesWithNulls) auto [null_mask, null_count] = cudf::test::detail::make_null_mask(odd_validity, odd_validity + 5); auto fp64_expected = cudf::make_lists_column( 5, - cudf::test::fixed_width_column_wrapper{0, 0, 8, 8, 16, 16}.release(), + cudf::test::fixed_width_column_wrapper{0, 0, 8, 8, 16, 16}.release(), fp64_data.release(), null_count, std::move(null_mask)); diff --git a/cpp/tests/rolling/collect_ops_test.cpp b/cpp/tests/rolling/collect_ops_test.cpp index 224edcd28647..ca1f1ba827c8 100644 --- a/cpp/tests/rolling/collect_ops_test.cpp +++ b/cpp/tests/rolling/collect_ops_test.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -251,7 +251,7 @@ TYPED_TEST(TypedCollectListTest, RollingWindowWithNullInputsHonoursMinPeriods) expected_result_child_values.end(), expected_result_child_validity.begin()); auto expected_offsets = - cudf::test::fixed_width_column_wrapper{0, 0, 3, 6, 9, 12, 12}.release(); + cudf::test::fixed_width_column_wrapper{0, 0, 3, 6, 9, 12, 12}.release(); auto expected_num_rows = expected_offsets->size() - 1; auto null_mask_iter = cudf::detail::make_counting_transform_iterator( cudf::size_type{0}, @@ -286,7 +286,7 @@ TYPED_TEST(TypedCollectListTest, RollingWindowWithNullInputsHonoursMinPeriods) auto expected_result_child = cudf::test::fixed_width_column_wrapper( expected_result_child_values.begin(), expected_result_child_values.end()); auto expected_offsets = - cudf::test::fixed_width_column_wrapper{0, 0, 2, 4, 6, 8, 8}.release(); + cudf::test::fixed_width_column_wrapper{0, 0, 2, 4, 6, 8, 8}.release(); auto expected_num_rows = expected_offsets->size() - 1; auto null_mask_iter = cudf::detail::make_counting_transform_iterator( cudf::size_type{0}, @@ -325,7 +325,7 @@ TYPED_TEST(TypedCollectListTest, RollingWindowWithNullInputsHonoursMinPeriods) expected_result_child_validity.begin()); auto expected_offsets = - cudf::test::fixed_width_column_wrapper{0, 0, 4, 8, 12, 12, 12}.release(); + cudf::test::fixed_width_column_wrapper{0, 0, 4, 8, 12, 12, 12}.release(); auto expected_num_rows = expected_offsets->size() - 1; auto null_mask_iter = cudf::detail::make_counting_transform_iterator( cudf::size_type{0}, [](auto i) { return i > 0 && i < 4; }); @@ -360,7 +360,7 @@ TYPED_TEST(TypedCollectListTest, RollingWindowWithNullInputsHonoursMinPeriods) expected_result_child_values.begin(), expected_result_child_values.end()); auto expected_offsets = - cudf::test::fixed_width_column_wrapper{0, 0, 3, 5, 8, 8, 8}.release(); + cudf::test::fixed_width_column_wrapper{0, 0, 3, 5, 8, 8, 8}.release(); auto expected_num_rows = expected_offsets->size() - 1; auto null_mask_iter = cudf::detail::make_counting_transform_iterator( cudf::size_type{0}, [](auto i) { return i > 0 && i < 4; }); @@ -467,7 +467,7 @@ TEST_F(CollectListTest, RollingWindowHonoursMinPeriodsWithDecimal) expected_result_child_values.end(), numeric::scale_type{0}}; auto expected_offsets = - cudf::test::fixed_width_column_wrapper{0, 0, 3, 6, 9, 12, 12}.release(); + cudf::test::fixed_width_column_wrapper{0, 0, 3, 6, 9, 12, 12}.release(); auto expected_num_rows = expected_offsets->size() - 1; auto null_mask_iter = cudf::detail::make_counting_transform_iterator( cudf::size_type{0}, @@ -513,7 +513,7 @@ TEST_F(CollectListTest, RollingWindowHonoursMinPeriodsWithDecimal) expected_result_child_values.end(), numeric::scale_type{0}}; auto expected_offsets = - cudf::test::fixed_width_column_wrapper{0, 0, 4, 8, 12, 12, 12}.release(); + cudf::test::fixed_width_column_wrapper{0, 0, 4, 8, 12, 12, 12}.release(); auto expected_num_rows = expected_offsets->size() - 1; auto null_mask_iter = cudf::detail::make_counting_transform_iterator( cudf::size_type{0}, [](auto i) { return i > 0 && i < 4; }); @@ -932,8 +932,7 @@ TYPED_TEST(TypedCollectListTest, BasicGroupedTimeRangeRollingWindowOnStructs) auto expected_structs_column = cudf::make_structs_column(32, std::move(expected_struct_members), 0, {}); auto expected_offsets_column = - cudf::test::fixed_width_column_wrapper{0, 4, 8, 13, 18, 23, 24, 26, 29, 32} - .release(); + cudf::test::fixed_width_column_wrapper{0, 4, 8, 13, 18, 23, 24, 26, 29, 32}.release(); auto expected_result = cudf::make_lists_column( 9, std::move(expected_offsets_column), std::move(expected_structs_column), 0, {}); @@ -1250,8 +1249,7 @@ TYPED_TEST(TypedCollectListTest, GroupedTimeRangeRollingWindowOnStructsWithMinPe auto expected_structs_column = cudf::make_structs_column(23, std::move(expected_struct_members), 0, {}); auto expected_offsets_column = - cudf::test::fixed_width_column_wrapper{0, 4, 8, 13, 18, 23, 23, 23, 23, 23} - .release(); + cudf::test::fixed_width_column_wrapper{0, 4, 8, 13, 18, 23, 23, 23, 23, 23}.release(); auto expected_validity_iter = cudf::test::iterators::nulls_at({5, 6, 7, 8}); auto [null_mask, null_count] = cudf::test::detail::make_null_mask(expected_validity_iter, expected_validity_iter + 9); @@ -1592,7 +1590,7 @@ TEST_F(CollectSetTest, RollingWindowHonoursMinPeriodsWithDecimal) expected_result_child_values.end(), numeric::scale_type{0}}; auto expected_offsets = - cudf::test::fixed_width_column_wrapper{0, 0, 2, 5, 8, 10, 10}.release(); + cudf::test::fixed_width_column_wrapper{0, 0, 2, 5, 8, 10, 10}.release(); auto expected_num_rows = expected_offsets->size() - 1; auto null_mask_iter = cudf::detail::make_counting_transform_iterator( cudf::size_type{0}, @@ -1638,7 +1636,7 @@ TEST_F(CollectSetTest, RollingWindowHonoursMinPeriodsWithDecimal) expected_result_child_values.end(), numeric::scale_type{0}}; auto expected_offsets = - cudf::test::fixed_width_column_wrapper{0, 0, 3, 7, 10, 10, 10}.release(); + cudf::test::fixed_width_column_wrapper{0, 0, 3, 7, 10, 10, 10}.release(); auto expected_num_rows = expected_offsets->size() - 1; auto null_mask_iter = cudf::detail::make_counting_transform_iterator( cudf::size_type{0}, [](auto i) { return i > 0 && i < 4; }); @@ -2234,7 +2232,7 @@ TEST_F(CollectSetTest, StructTypeRollingWindow) "a", "b", "a", "b", "c", "b", "c", "d", "c", "d", "e", "d", "e"}; return cudf::make_lists_column( 5, - cudf::test::fixed_width_column_wrapper{0, 2, 5, 8, 11, 13}.release(), + cudf::test::fixed_width_column_wrapper{0, 2, 5, 8, 11, 13}.release(), cudf::test::structs_column_wrapper{{child1, child2}}.release(), 0, {}); @@ -2261,8 +2259,7 @@ TEST_F(CollectSetTest, ListTypeRollingWindow) 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 4, 5, 6, 7, 8, 9, 6, 7, 8, 9, 10, 7, 8, 9, 10}; auto inner_offsets = cudf::test::fixed_width_column_wrapper{ 0, 3, 5, 8, 10, 11, 13, 14, 17, 18, 21, 22, 25, 26}; - auto outer_offsets = - cudf::test::fixed_width_column_wrapper{0, 2, 5, 8, 11, 13}; + auto outer_offsets = cudf::test::fixed_width_column_wrapper{0, 2, 5, 8, 11, 13}; auto inner_list = cudf::make_lists_column(13, inner_offsets.release(), data.release(), 0, {}); diff --git a/cpp/tests/sort/top_k_tests.cpp b/cpp/tests/sort/top_k_tests.cpp index d761c6e30125..821eb363f33e 100644 --- a/cpp/tests/sort/top_k_tests.cpp +++ b/cpp/tests/sort/top_k_tests.cpp @@ -384,7 +384,7 @@ TEST_F(TopK, SegmentedUncoveredNull) // a nested lists_column_wrapper drops the leaf mask, so assemble the list column directly. auto expected_values = cudf::test::fixed_width_column_wrapper( {50, 40, 25, 15}, cudf::test::iterators::no_nulls()); - auto expected_offsets = cudf::test::fixed_width_column_wrapper({0, 2, 4}); + auto expected_offsets = cudf::test::fixed_width_column_wrapper({0, 2, 4}); auto expected = cudf::make_lists_column(2, expected_offsets.release(), expected_values.release(), 0, {}); auto result = cudf::segmented_top_k(input, offsets, 2); diff --git a/cpp/tests/structs/structs_column_tests.cpp b/cpp/tests/structs/structs_column_tests.cpp index 884e35f13665..563ddb11ff44 100644 --- a/cpp/tests/structs/structs_column_tests.cpp +++ b/cpp/tests/structs/structs_column_tests.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -395,7 +395,7 @@ TYPED_TEST(TypedStructColumnWrapperTest, TestListsOfStructs) auto expected_unchanged_struct_col = cudf::column(*struct_col); auto list_offsets_column = - cudf::test::fixed_width_column_wrapper{0, 2, 3, 5, 6}.release(); + cudf::test::fixed_width_column_wrapper{0, 2, 3, 5, 6}.release(); auto num_list_rows = list_offsets_column->size() - 1; auto list_col = cudf::make_lists_column( @@ -426,7 +426,7 @@ TYPED_TEST(TypedStructColumnWrapperTest, ListOfStructOfList) detail::make_null_mask(list_of_struct_of_list_validity, list_of_struct_of_list_validity + 5); auto list_of_struct_of_list = cudf::make_lists_column(5, - fixed_width_column_wrapper{0, 2, 4, 6, 8, 10}.release(), + fixed_width_column_wrapper{0, 2, 4, 6, 8, 10}.release(), std::move(struct_of_lists_col), null_count, std::move(null_mask)); @@ -446,7 +446,7 @@ TYPED_TEST(TypedStructColumnWrapperTest, ListOfStructOfList) detail::make_null_mask(list_of_struct_of_list_validity, list_of_struct_of_list_validity + 5); auto expected_level3_list = cudf::make_lists_column(5, - fixed_width_column_wrapper{0, 0, 2, 4, 4, 6}.release(), + fixed_width_column_wrapper{0, 0, 2, 4, 4, 6}.release(), std::move(expected_level2_struct), null_count, std::move(null_mask)); @@ -473,7 +473,7 @@ TYPED_TEST(TypedStructColumnWrapperTest, StructOfListOfStruct) auto lists_col = cudf::make_lists_column(5, - fixed_width_column_wrapper{0, 2, 4, 6, 8, 10}.release(), + fixed_width_column_wrapper{0, 2, 4, 6, 8, 10}.release(), std::move(structs_col), null_count, std::move(null_mask)); @@ -495,7 +495,7 @@ TYPED_TEST(TypedStructColumnWrapperTest, StructOfListOfStruct) auto expected_lists_col = cudf::make_lists_column(5, - fixed_width_column_wrapper{0, 2, 4, 6, 8, 10}.release(), + fixed_width_column_wrapper{0, 2, 4, 6, 8, 10}.release(), std::move(expected_structs_col), null_count, std::move(null_mask)); @@ -532,7 +532,7 @@ TYPED_TEST(TypedStructColumnWrapperTest, EmptyColumnsOfStructs) EXPECT_TRUE(struct_column->null_count() == 0); auto empty_list_of_structs = cudf::make_lists_column( - 0, fixed_width_column_wrapper{0}.release(), std::move(struct_column), 0, {}); + 0, fixed_width_column_wrapper{0}.release(), std::move(struct_column), 0, {}); EXPECT_TRUE(empty_list_of_structs->size() == 0); EXPECT_TRUE(empty_list_of_structs->null_count() == 0); @@ -550,7 +550,7 @@ TYPED_TEST(TypedStructColumnWrapperTest, EmptyColumnsOfStructs) // fixed_width_column_wrapper{1,2,3,4,5}.release(); // // auto list_offsets = - // fixed_width_column_wrapper{0}.release(); + // fixed_width_column_wrapper{0}.release(); // // auto empty_list_column = // cudf::make_lists_column( diff --git a/cpp/tests/transform/row_bit_count_test.cu b/cpp/tests/transform/row_bit_count_test.cu index 6c79b5131c10..20e329808f0e 100644 --- a/cpp/tests/transform/row_bit_count_test.cu +++ b/cpp/tests/transform/row_bit_count_test.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -553,7 +553,7 @@ TEST_F(RowBitCount, EmptyChildColumnInListOfStrings) // Test with a list column with 4 empty list rows. // Note: Since there are no strings in any of the lists, // the lists column's child can be empty. - auto offsets = cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 0}; + auto offsets = cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 0}; auto lists_col = cudf::make_lists_column( 4, offsets.release(), cudf::make_empty_column(cudf::data_type{cudf::type_id::STRING}), 0, {}); @@ -572,7 +572,7 @@ TEST_F(RowBitCount, EmptyChildColumnInListOfLists) return cudf::empty_like(exemplar); }; - auto offsets = cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 0}; + auto offsets = cudf::test::fixed_width_column_wrapper{0, 0, 0, 0, 0}; auto lists_col = cudf::make_lists_column(4, offsets.release(), empty_child_lists_column(), 0, {}); CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT( diff --git a/cpp/tests/utilities/column_utilities.cu b/cpp/tests/utilities/column_utilities.cu index 862ac9372c04..2e32c493c90e 100644 --- a/cpp/tests/utilities/column_utilities.cu +++ b/cpp/tests/utilities/column_utilities.cu @@ -118,7 +118,7 @@ std::unique_ptr generate_child_row_indices(lists_column_view const& c, 0, cuda::proclaim_return_type([row_indices = row_indices.begin(), validity = c.null_mask(), - offsets = c.offsets().begin(), + offsets = c.offsets().begin(), offset = c.offset()] __device__(int index) { // both null mask and offsets data are not pre-sliced. so we need to add the column offset to // every incoming index. @@ -166,11 +166,11 @@ std::unique_ptr generate_child_row_indices(lists_column_view const& c, auto output_row_iter = cudf::detail::make_counting_transform_iterator( 0, cuda::proclaim_return_type( - [row_indices = row_indices.begin(), - offsets = c.offsets().begin(), - offset = c.offset(), - first_offset = cudf::detail::get_value( - c.offsets(), c.offset(), stream)] __device__(int index) { + [row_indices = row_indices.begin(), + offsets = c.offsets().begin(), + offset = c.offset(), + first_offset = + cudf::detail::get_value(c.offsets(), c.offset(), stream)] __device__(int index) { auto const true_index = row_indices[index] + offset; return offsets[true_index] - first_offset; })); @@ -625,10 +625,9 @@ struct column_comparator_impl { // compare offsets, taking slicing into account // left side - size_type lhs_shift = - cudf::detail::get_value(lhs_l.offsets(), lhs_l.offset(), stream); - auto lhs_offsets = thrust::make_transform_iterator( - lhs_l.offsets().begin() + lhs_l.offset(), + size_type lhs_shift = cudf::detail::get_value(lhs_l.offsets(), lhs_l.offset(), stream); + auto lhs_offsets = thrust::make_transform_iterator( + lhs_l.offsets().begin() + lhs_l.offset(), cuda::proclaim_return_type( [lhs_shift] __device__(size_type offset) { return offset - lhs_shift; })); auto lhs_valids = thrust::make_transform_iterator( @@ -639,10 +638,9 @@ struct column_comparator_impl { })); // right side - size_type rhs_shift = - cudf::detail::get_value(rhs_l.offsets(), rhs_l.offset(), stream); - auto rhs_offsets = thrust::make_transform_iterator( - rhs_l.offsets().begin() + rhs_l.offset(), + size_type rhs_shift = cudf::detail::get_value(rhs_l.offsets(), rhs_l.offset(), stream); + auto rhs_offsets = thrust::make_transform_iterator( + rhs_l.offsets().begin() + rhs_l.offset(), cuda::proclaim_return_type( [rhs_shift] __device__(size_type offset) { return offset - rhs_shift; })); auto rhs_valids = thrust::make_transform_iterator( diff --git a/cpp/tests/utilities_tests/lists_column_wrapper_tests.cpp b/cpp/tests/utilities_tests/lists_column_wrapper_tests.cpp index ae83a6104ac0..50ef1f37b965 100644 --- a/cpp/tests/utilities_tests/lists_column_wrapper_tests.cpp +++ b/cpp/tests/utilities_tests/lists_column_wrapper_tests.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -1341,9 +1341,8 @@ TYPED_TEST(ListColumnWrapperTestTyped, ListsOfStructs) EXPECT_EQ(struct_column->size(), num_struct_rows); EXPECT_TRUE(!struct_column->nullable()); - auto lists_column_offsets = - cudf::test::fixed_width_column_wrapper{0, 2, 4, 8}.release(); - auto num_lists = lists_column_offsets->size() - 1; + auto lists_column_offsets = cudf::test::fixed_width_column_wrapper{0, 2, 4, 8}.release(); + auto num_lists = lists_column_offsets->size() - 1; auto lists_column = make_lists_column(num_lists, std::move(lists_column_offsets), std::move(struct_column), 0, {}); @@ -1371,10 +1370,9 @@ TYPED_TEST(ListColumnWrapperTestTyped, ListsOfStructsWithValidity) EXPECT_EQ(struct_column->size(), num_struct_rows); EXPECT_TRUE(!struct_column->nullable()); - auto lists_column_offsets = - cudf::test::fixed_width_column_wrapper{0, 2, 4, 8}.release(); - auto list_null_mask = {1, 1, 0}; - auto num_lists = lists_column_offsets->size() - 1; + auto lists_column_offsets = cudf::test::fixed_width_column_wrapper{0, 2, 4, 8}.release(); + auto list_null_mask = {1, 1, 0}; + auto num_lists = lists_column_offsets->size() - 1; auto [null_mask, null_count] = cudf::test::detail::make_null_mask(list_null_mask.begin(), list_null_mask.end()); auto lists_column = [&] { @@ -1409,14 +1407,13 @@ TYPED_TEST(ListColumnWrapperTestTyped, ListsOfListsOfStructs) EXPECT_EQ(struct_column->size(), num_struct_rows); EXPECT_TRUE(!struct_column->nullable()); - auto lists_column_offsets = - cudf::test::fixed_width_column_wrapper{0, 2, 4, 8}.release(); - auto num_lists = lists_column_offsets->size() - 1; + auto lists_column_offsets = cudf::test::fixed_width_column_wrapper{0, 2, 4, 8}.release(); + auto num_lists = lists_column_offsets->size() - 1; auto lists_column = make_lists_column(num_lists, std::move(lists_column_offsets), std::move(struct_column), 0, {}); auto lists_of_lists_column_offsets = - cudf::test::fixed_width_column_wrapper{0, 2, 3}.release(); + cudf::test::fixed_width_column_wrapper{0, 2, 3}.release(); auto num_lists_of_lists = lists_of_lists_column_offsets->size() - 1; auto lists_of_lists_of_structs_column = make_lists_column( num_lists_of_lists, std::move(lists_of_lists_column_offsets), std::move(lists_column), 0, {}); @@ -1447,10 +1444,9 @@ TYPED_TEST(ListColumnWrapperTestTyped, ListsOfListsOfStructsWithValidity) EXPECT_EQ(struct_column->size(), num_struct_rows); EXPECT_TRUE(!struct_column->nullable()); - auto lists_column_offsets = - cudf::test::fixed_width_column_wrapper{0, 2, 4, 8}.release(); - auto num_lists = lists_column_offsets->size() - 1; - auto list_null_mask = {1, 1, 0}; + auto lists_column_offsets = cudf::test::fixed_width_column_wrapper{0, 2, 4, 8}.release(); + auto num_lists = lists_column_offsets->size() - 1; + auto list_null_mask = {1, 1, 0}; auto [null_mask, null_count] = cudf::test::detail::make_null_mask(list_null_mask.begin(), list_null_mask.end()); auto lists_column = [&] { @@ -1463,7 +1459,7 @@ TYPED_TEST(ListColumnWrapperTestTyped, ListsOfListsOfStructsWithValidity) }(); auto lists_of_lists_column_offsets = - cudf::test::fixed_width_column_wrapper{0, 2, 3}.release(); + cudf::test::fixed_width_column_wrapper{0, 2, 3}.release(); auto num_lists_of_lists = lists_of_lists_column_offsets->size() - 1; auto list_of_lists_null_mask = {1, 0}; @@ -1523,7 +1519,7 @@ TYPED_TEST(ListColumnWrapperTestTyped, LargeListsOfStructsWithValidity) auto num_list_rows = num_struct_rows / 50; auto list_offset_iterator = cudf::detail::make_counting_transform_iterator(0, [](auto i) { return i * 50; }); - auto list_offset_column = cudf::test::fixed_width_column_wrapper( + auto list_offset_column = cudf::test::fixed_width_column_wrapper( list_offset_iterator, list_offset_iterator + num_list_rows + 1) .release(); auto lists_column = make_lists_column(