MCPcopy Create free account
hub / github.com/apache/arrow / TestArrayUtilitiesAgainstTheseTypes

Function TestArrayUtilitiesAgainstTheseTypes

cpp/src/arrow/array/array_test.cc:432–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432static std::vector<std::shared_ptr<DataType>> TestArrayUtilitiesAgainstTheseTypes() {
433 FieldVector union_fields1({field("a", utf8()), field("b", int32())});
434 FieldVector union_fields2({field("a", null()), field("b", list(large_utf8()))});
435 std::vector<int8_t> union_type_codes{7, 42};
436
437 return {
438 null(),
439 boolean(),
440 int8(),
441 uint16(),
442 int32(),
443 uint64(),
444 float64(),
445 binary(),
446 large_binary(),
447 binary_view(),
448 fixed_size_binary(3),
449 decimal128(16, 4),
450 utf8(),
451 large_utf8(),
452 utf8_view(),
453 list(utf8()),
454 list(int64()), // NOTE: Regression case for ARROW-9071/MakeArrayOfNull
455 list(large_utf8()),
456 list(list(int64())),
457 list(list(large_utf8())),
458 large_list(utf8()),
459 large_list(large_utf8()),
460 large_list(list(large_utf8())),
461 fixed_size_list(utf8(), 3),
462 fixed_size_list(int64(), 4),
463 list_view(utf8()),
464 large_list_view(utf8()),
465 dictionary(int32(), utf8()),
466 struct_({field("a", utf8()), field("b", int32())}),
467 sparse_union(union_fields1, union_type_codes),
468 sparse_union(union_fields2, union_type_codes),
469 dense_union(union_fields1, union_type_codes),
470 dense_union(union_fields2, union_type_codes),
471 smallint(), // extension type
472 list_extension_type(), // nested extension type
473 run_end_encoded(int16(), utf8()),
474 };
475}
476
477TEST_F(TestArray, TestMakeArrayOfNull) {
478 for (int64_t length : {0, 1, 16, 133}) {

Callers 1

TEST_FFunction · 0.85

Calls 15

listFunction · 0.85
fixed_size_binaryFunction · 0.85
large_listFunction · 0.85
fixed_size_listFunction · 0.85
list_viewFunction · 0.85
large_list_viewFunction · 0.85
struct_Function · 0.85
sparse_unionFunction · 0.85
dense_unionFunction · 0.85
smallintFunction · 0.85
list_extension_typeFunction · 0.85
run_end_encodedFunction · 0.85

Tested by

no test coverage detected