* garrow_array_take: * @array: A #GArrowArray. * @indices: The indices of values to take. * @options: (nullable): A #GArrowTakeOptions. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable) (transfer full): The #GArrowArray taken from * an array of values at indices in input array or %NULL on error. * * Since: 0.14.0 */
| 5403 | * Since: 0.14.0 |
| 5404 | */ |
| 5405 | GArrowArray * |
| 5406 | garrow_array_take(GArrowArray *array, |
| 5407 | GArrowArray *indices, |
| 5408 | GArrowTakeOptions *options, |
| 5409 | GError **error) |
| 5410 | { |
| 5411 | auto arrow_array = garrow_array_get_raw(array); |
| 5412 | auto arrow_indices = garrow_array_get_raw(indices); |
| 5413 | return garrow_take( |
| 5414 | arrow::Datum(arrow_array), |
| 5415 | arrow::Datum(arrow_indices), |
| 5416 | options, |
| 5417 | [](arrow::Datum arrow_datum) { |
| 5418 | auto arrow_taken_array = arrow_datum.make_array(); |
| 5419 | return garrow_array_new_raw(&arrow_taken_array); |
| 5420 | }, |
| 5421 | error, |
| 5422 | "[array][take][array]"); |
| 5423 | } |
| 5424 | |
| 5425 | /** |
| 5426 | * garrow_array_take_chunked_array: |
nothing calls this directly
no test coverage detected