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

Function TestArrayUtilitiesAgainstTheseTypes

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

Source from the content-addressed store, hash-verified

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