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

Function SetListView

cpp/src/arrow/compute/kernels/vector_nested_test.cc:208–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206
207template <typename T = ListViewType, typename offset_type = typename T::offset_type>
208void 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
222TEST(TestVectorNested, ListParentIndices) {
223 const auto types = {

Callers 1

TESTFunction · 0.85

Calls 3

SetBitFunction · 0.85
is_list_viewFunction · 0.50
idMethod · 0.45

Tested by

no test coverage detected