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

Function garrow_array_take_chunked_array

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

* garrow_array_take_chunked_array: * @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 #GArrowChunkedArray taken from * an array of values at indices in chunked array or %NULL on error. * * Since: 0.16.0 */

Source from the content-addressed store, hash-verified

5390 * Since: 0.16.0
5391 */
5392GArrowChunkedArray *
5393garrow_array_take_chunked_array(GArrowArray *array,
5394 GArrowChunkedArray *indices,
5395 GArrowTakeOptions *options,
5396 GError **error)
5397{
5398 auto arrow_array = garrow_array_get_raw(array);
5399 auto arrow_indices = garrow_chunked_array_get_raw(indices);
5400 return garrow_take(
5401 arrow::Datum(arrow_array),
5402 arrow::Datum(arrow_indices),
5403 options,
5404 [](arrow::Datum arrow_datum) {
5405 auto arrow_taken_chunked_array = arrow_datum.chunked_array();
5406 return garrow_chunked_array_new_raw(&arrow_taken_chunked_array);
5407 },
5408 error,
5409 "[array][take][chunked-array]");
5410}
5411
5412/**
5413 * garrow_table_take:

Callers

nothing calls this directly

Calls 6

garrow_takeFunction · 0.85
chunked_arrayMethod · 0.80
garrow_array_get_rawFunction · 0.70
DatumFunction · 0.50

Tested by

no test coverage detected