| 430 | } |
| 431 | |
| 432 | static 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 | |
| 477 | TEST_F(TestArray, TestMakeArrayOfNull) { |
| 478 | for (int64_t length : {0, 1, 16, 133}) { |
no test coverage detected