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

Function garrow_array_take

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

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

Source from the content-addressed store, hash-verified

5358 * Since: 0.14.0
5359 */
5360GArrowArray *
5361garrow_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:

Callers

nothing calls this directly

Calls 5

garrow_takeFunction · 0.85
garrow_array_new_rawFunction · 0.85
make_arrayMethod · 0.80
garrow_array_get_rawFunction · 0.70
DatumFunction · 0.50

Tested by

no test coverage detected