diff --git a/cpp/tests/interop/arrow_utils.hpp b/cpp/tests/interop/arrow_utils.hpp index 70a9fe64d70..e785845394a 100644 --- a/cpp/tests/interop/arrow_utils.hpp +++ b/cpp/tests/interop/arrow_utils.hpp @@ -212,9 +212,8 @@ std::shared_ptr get_arrow_list_array(std::vector data, "Failed to append values to buffer builder"); CUDF_EXPECTS(buff_builder.Finish(&offset_buffer).ok(), "Failed to allocate buffer"); - auto nullable = std::accumulate(list_validity.begin(), list_validity.end(), 0) > 0; return std::make_shared( - arrow::list(arrow::field("", data_array->type(), nullable)), + arrow::list(arrow::field("element", data_array->type(), data_array->null_count() > 0)), offsets.size() - 1, offset_buffer, data_array, diff --git a/cpp/tests/interop/from_arrow_test.cpp b/cpp/tests/interop/from_arrow_test.cpp index 18efae75cb1..62e38cbfd45 100644 --- a/cpp/tests/interop/from_arrow_test.cpp +++ b/cpp/tests/interop/from_arrow_test.cpp @@ -279,7 +279,10 @@ TEST_F(FromArrowTest, StructColumn) auto list_arr = get_arrow_list_array({1, 2, 3, 4, 5, 6, 7, 8, 9}, {0, 2, 4, 5, 6, 7, 9}); std::vector offset{0, 3, 4, 6}; auto nested_list_arr = std::make_shared( - arrow::list(list(arrow::int64())), offset.size() - 1, arrow::Buffer::Wrap(offset), list_arr); + arrow::list(list(arrow::field("element", arrow::int64(), false))), + offset.size() - 1, + arrow::Buffer::Wrap(offset), + list_arr); std::vector> child_arrays2({str2_array, int2_array}); auto fields2 = std::vector>{ diff --git a/cpp/tests/interop/to_arrow_test.cpp b/cpp/tests/interop/to_arrow_test.cpp index 86295d8efb1..faa07ba3311 100644 --- a/cpp/tests/interop/to_arrow_test.cpp +++ b/cpp/tests/interop/to_arrow_test.cpp @@ -261,14 +261,14 @@ TEST_F(ToArrowTest, NestedList) std::vector offset{0, 0, 2}; auto mask_buffer = arrow::internal::BytesToBits({0, 1}).ValueOrDie(); auto nested_list_arr = std::make_shared( - arrow::list(arrow::field("a", arrow::list(arrow::int64()), false)), + arrow::list(arrow::field("element", arrow::list(arrow::int64()), false)), offset.size() - 1, arrow::Buffer::Wrap(offset), list_arr, mask_buffer); std::vector> schema_vector( - {arrow::field("a", nested_list_arr->type())}); + {arrow::field("a", nested_list_arr->type(), false)}); auto schema = std::make_shared(schema_vector); auto expected_arrow_table = arrow::Table::Make(schema, {nested_list_arr});