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

Function garrow_array_take

c_glib/arrow-glib/compute.cpp:5405–5423  ·  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

5403 * Since: 0.14.0
5404 */
5405GArrowArray *
5406garrow_array_take(GArrowArray *array,
5407 GArrowArray *indices,
5408 GArrowTakeOptions *options,
5409 GError **error)
5410{
5411 auto arrow_array = garrow_array_get_raw(array);
5412 auto arrow_indices = garrow_array_get_raw(indices);
5413 return garrow_take(
5414 arrow::Datum(arrow_array),
5415 arrow::Datum(arrow_indices),
5416 options,
5417 [](arrow::Datum arrow_datum) {
5418 auto arrow_taken_array = arrow_datum.make_array();
5419 return garrow_array_new_raw(&arrow_taken_array);
5420 },
5421 error,
5422 "[array][take][array]");
5423}
5424
5425/**
5426 * 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