| 2293 | } |
| 2294 | |
| 2295 | G_END_DECLS |
| 2296 | template <typename BINARY_ARRAY_CLASS> |
| 2297 | GArrowArray * |
| 2298 | garrow_base_binary_array_new(gint64 length, |
| 2299 | GArrowBuffer *value_offsets, |
| 2300 | GArrowBuffer *value_data, |
| 2301 | GArrowBuffer *null_bitmap, |
| 2302 | gint64 n_nulls) |
| 2303 | { |
| 2304 | const auto arrow_value_offsets = garrow_buffer_get_raw(value_offsets); |
| 2305 | const auto arrow_value_data = garrow_buffer_get_raw(value_data); |
| 2306 | const auto arrow_null_bitmap = garrow_buffer_get_raw(null_bitmap); |
| 2307 | auto arrow_binary_array = std::make_shared<BINARY_ARRAY_CLASS>(length, |
| 2308 | arrow_value_offsets, |
| 2309 | arrow_value_data, |
| 2310 | arrow_null_bitmap, |
| 2311 | n_nulls); |
| 2312 | auto arrow_array = std::static_pointer_cast<arrow::Array>(arrow_binary_array); |
| 2313 | return garrow_array_new_raw(&arrow_array, |
| 2314 | "array", |
| 2315 | &arrow_array, |
| 2316 | "null-bitmap", |
| 2317 | null_bitmap, |
| 2318 | "buffer1", |
| 2319 | value_offsets, |
| 2320 | "buffer2", |
| 2321 | value_data, |
| 2322 | NULL); |
| 2323 | }; |
| 2324 | |
| 2325 | template <typename BINARY_ARRAY_CLASS> |
| 2326 | GBytes * |
nothing calls this directly
no test coverage detected