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

Function garrow_primitive_array_new

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

Source from the content-addressed store, hash-verified

1373G_END_DECLS
1374template <typename T>
1375GArrowArray *
1376garrow_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
1399template <typename T>
1400GArrowArray *

Callers

nothing calls this directly

Calls 3

garrow_buffer_get_rawFunction · 0.85
garrow_array_new_rawFunction · 0.85
garrow_data_type_get_rawFunction · 0.85

Tested by

no test coverage detected