| 206 | |
| 207 | template <typename T = ListViewType, typename offset_type = typename T::offset_type> |
| 208 | void SetListView(ArrayData* array, int64_t i, offset_type offset, offset_type size) { |
| 209 | ASSERT_TRUE(is_list_view(array->type->id())); |
| 210 | ASSERT_EQ(array->type->id(), T::type_id); |
| 211 | ASSERT_LT(i, array->length); |
| 212 | auto* validity = array->GetMutableValues<uint8_t>(0); |
| 213 | if (validity) { |
| 214 | bit_util::SetBit(validity, array->offset + i); |
| 215 | } |
| 216 | auto* offsets = array->GetMutableValues<offset_type>(1); |
| 217 | auto* sizes = array->GetMutableValues<offset_type>(2); |
| 218 | offsets[i] = offset; |
| 219 | sizes[i] = size; |
| 220 | } |
| 221 | |
| 222 | TEST(TestVectorNested, ListParentIndices) { |
| 223 | const auto types = { |
no test coverage detected