* 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. */
| 1535 | * It should be freed with g_free() when no longer needed. |
| 1536 | */ |
| 1537 | gboolean * |
| 1538 | garrow_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 | |
| 1550 | G_DEFINE_TYPE(GArrowNumericArray, garrow_numeric_array, GARROW_TYPE_PRIMITIVE_ARRAY) |
| 1551 |
nothing calls this directly
no test coverage detected