| 1373 | G_END_DECLS |
| 1374 | template <typename T> |
| 1375 | GArrowArray * |
| 1376 | garrow_primitive_array_new(gint64 length, |
| 1377 | GArrowBuffer *data, |
| 1378 | GArrowBuffer *null_bitmap, |
| 1379 | gint64 n_nulls) |
| 1380 | { |
| 1381 | const auto arrow_data = garrow_buffer_get_raw(data); |
| 1382 | const auto arrow_bitmap = garrow_buffer_get_raw(null_bitmap); |
| 1383 | auto arrow_specific_array = |
| 1384 | std::make_shared<typename arrow::TypeTraits<T>::ArrayType>(length, |
| 1385 | arrow_data, |
| 1386 | arrow_bitmap, |
| 1387 | n_nulls); |
| 1388 | auto arrow_array = std::static_pointer_cast<arrow::Array>(arrow_specific_array); |
| 1389 | return garrow_array_new_raw(&arrow_array, |
| 1390 | "array", |
| 1391 | &arrow_array, |
| 1392 | "null-bitmap", |
| 1393 | null_bitmap, |
| 1394 | "buffer1", |
| 1395 | data, |
| 1396 | NULL); |
| 1397 | }; |
| 1398 | |
| 1399 | template <typename T> |
| 1400 | GArrowArray * |
nothing calls this directly
no test coverage detected