* 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 */
| 5358 | * Since: 0.14.0 |
| 5359 | */ |
| 5360 | GArrowArray * |
| 5361 | garrow_array_take(GArrowArray *array, |
| 5362 | GArrowArray *indices, |
| 5363 | GArrowTakeOptions *options, |
| 5364 | GError **error) |
| 5365 | { |
| 5366 | auto arrow_array = garrow_array_get_raw(array); |
| 5367 | auto arrow_indices = garrow_array_get_raw(indices); |
| 5368 | return garrow_take( |
| 5369 | arrow::Datum(arrow_array), |
| 5370 | arrow::Datum(arrow_indices), |
| 5371 | options, |
| 5372 | [](arrow::Datum arrow_datum) { |
| 5373 | auto arrow_taken_array = arrow_datum.make_array(); |
| 5374 | return garrow_array_new_raw(&arrow_taken_array); |
| 5375 | }, |
| 5376 | error, |
| 5377 | "[array][take][array]"); |
| 5378 | } |
| 5379 | |
| 5380 | /** |
| 5381 | * garrow_array_take_chunked_array: |
nothing calls this directly
no test coverage detected