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

Function garrow_base_binary_array_new

c_glib/arrow-glib/basic-array.cpp:2295–2323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2293}
2294
2295G_END_DECLS
2296template <typename BINARY_ARRAY_CLASS>
2297GArrowArray *
2298garrow_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
2325template <typename BINARY_ARRAY_CLASS>
2326GBytes *

Callers

nothing calls this directly

Calls 2

garrow_buffer_get_rawFunction · 0.85
garrow_array_new_rawFunction · 0.85

Tested by

no test coverage detected