* garrow_record_batch_take: * @record_batch: A #GArrowRecordBatch. * @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 #GArrowChunkedArray taken from * an array of values at indices in input array or %NULL on error. * * Since: 0.16.0 */
| 5595 | * Since: 0.16.0 |
| 5596 | */ |
| 5597 | GArrowRecordBatch * |
| 5598 | garrow_record_batch_take(GArrowRecordBatch *record_batch, |
| 5599 | GArrowArray *indices, |
| 5600 | GArrowTakeOptions *options, |
| 5601 | GError **error) |
| 5602 | { |
| 5603 | auto arrow_record_batch = garrow_record_batch_get_raw(record_batch); |
| 5604 | auto arrow_indices = garrow_array_get_raw(indices); |
| 5605 | return garrow_take( |
| 5606 | arrow::Datum(arrow_record_batch), |
| 5607 | arrow::Datum(arrow_indices), |
| 5608 | options, |
| 5609 | [](arrow::Datum arrow_datum) { |
| 5610 | auto arrow_taken_record_batch = arrow_datum.record_batch(); |
| 5611 | return garrow_record_batch_new_raw(&arrow_taken_record_batch); |
| 5612 | }, |
| 5613 | error, |
| 5614 | "[record-batch][take]"); |
| 5615 | } |
| 5616 | |
| 5617 | /** |
| 5618 | * garrow_array_filter: |
nothing calls this directly
no test coverage detected