MCPcopy Create free account
hub / github.com/apache/arrow / garrow_record_batch_take

Function garrow_record_batch_take

c_glib/arrow-glib/compute.cpp:5597–5615  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

5595 * Since: 0.16.0
5596 */
5597GArrowRecordBatch *
5598garrow_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:

Callers

nothing calls this directly

Calls 4

garrow_takeFunction · 0.85
garrow_array_get_rawFunction · 0.70
DatumFunction · 0.50

Tested by

no test coverage detected