| 140 | } |
| 141 | |
| 142 | TEST(TestVectorNested, ListFlattenFixedSizeList) { |
| 143 | for (auto ty : {fixed_size_list(int16(), 2), fixed_size_list(uint32(), 2)}) { |
| 144 | const auto& out_ty = checked_cast<const FixedSizeListType&>(*ty).value_type(); |
| 145 | { |
| 146 | auto input = ArrayFromJSON(ty, "[[0, null], null, [2, 3], [0, 42]]"); |
| 147 | auto expected = ArrayFromJSON(out_ty, "[0, null, 2, 3, 0, 42]"); |
| 148 | CheckVectorUnary("list_flatten", input, expected); |
| 149 | } |
| 150 | |
| 151 | { |
| 152 | // Test a chunked array |
| 153 | auto input = ChunkedArrayFromJSON(ty, {"[[0, null], null]", "[[2, 3], [0, 42]]"}); |
| 154 | auto expected = ChunkedArrayFromJSON(out_ty, {"[0, null]", "[2, 3, 0, 42]"}); |
| 155 | CheckVectorUnary("list_flatten", input, expected); |
| 156 | |
| 157 | input = ChunkedArrayFromJSON(ty, {}); |
| 158 | expected = ChunkedArrayFromJSON(out_ty, {}); |
| 159 | CheckVectorUnary("list_flatten", input, expected); |
| 160 | } |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | TEST(TestVectorNested, ListFlattenFixedSizeListNulls) { |
| 165 | const auto ty = fixed_size_list(int32(), 1); |
nothing calls this directly
no test coverage detected