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

Function garrow_boolean_array_get_values

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

* garrow_boolean_array_get_values: * @array: A #GArrowBooleanArray. * @length: (out): The number of values. * * Returns: (array length=length) (transfer full): * The raw boolean values. * * It should be freed with g_free() when no longer needed. */

Source from the content-addressed store, hash-verified

1535 * It should be freed with g_free() when no longer needed.
1536 */
1537gboolean *
1538garrow_boolean_array_get_values(GArrowBooleanArray *array, gint64 *length)
1539{
1540 auto arrow_array = garrow_array_get_raw(GARROW_ARRAY(array));
1541 auto arrow_boolean_array = std::static_pointer_cast<arrow::BooleanArray>(arrow_array);
1542 *length = arrow_boolean_array->length();
1543 auto values = static_cast<gboolean *>(g_new(gboolean, *length));
1544 for (gint64 i = 0; i < *length; ++i) {
1545 values[i] = arrow_boolean_array->Value(i);
1546 }
1547 return values;
1548}
1549
1550G_DEFINE_TYPE(GArrowNumericArray, garrow_numeric_array, GARROW_TYPE_PRIMITIVE_ARRAY)
1551

Callers

nothing calls this directly

Calls 3

garrow_array_get_rawFunction · 0.70
lengthMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected