* garrow_table_take: * @table: A #GArrowTable. * @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 #GArrowTable taken from * an array of values at indices in input array or %NULL on error. * * Since: 0.16.0 */
| 5467 | * Since: 0.16.0 |
| 5468 | */ |
| 5469 | GArrowTable * |
| 5470 | garrow_table_take(GArrowTable *table, |
| 5471 | GArrowArray *indices, |
| 5472 | GArrowTakeOptions *options, |
| 5473 | GError **error) |
| 5474 | { |
| 5475 | auto arrow_table = garrow_table_get_raw(table); |
| 5476 | auto arrow_indices = garrow_array_get_raw(indices); |
| 5477 | return garrow_take( |
| 5478 | arrow::Datum(arrow_table), |
| 5479 | arrow::Datum(arrow_indices), |
| 5480 | options, |
| 5481 | [](arrow::Datum arrow_datum) { |
| 5482 | auto arrow_taken_table = arrow_datum.table(); |
| 5483 | return garrow_table_new_raw(&arrow_taken_table); |
| 5484 | }, |
| 5485 | error, |
| 5486 | "[table][take]"); |
| 5487 | } |
| 5488 | |
| 5489 | /** |
| 5490 | * garrow_table_take_chunked_array: |
nothing calls this directly
no test coverage detected