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

Function garrow_table_take

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

* garrow_table_take: * @table: A #GArrowTable. * @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 #GArrowTable 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

5467 * Since: 0.16.0
5468 */
5469GArrowTable *
5470garrow_table_take(GArrowTable *table,
5471 GArrowArray *indices,
5472 GArrowTakeOptions *options,
5473 GError **error)
5474{
5475 auto arrow_table = garrow_table_get_raw(table);
5476 auto arrow_indices = garrow_array_get_raw(indices);
5477 return garrow_take(
5478 arrow::Datum(arrow_table),
5479 arrow::Datum(arrow_indices),
5480 options,
5481 [](arrow::Datum arrow_datum) {
5482 auto arrow_taken_table = arrow_datum.table();
5483 return garrow_table_new_raw(&arrow_taken_table);
5484 },
5485 error,
5486 "[table][take]");
5487}
5488
5489/**
5490 * garrow_table_take_chunked_array:

Callers

nothing calls this directly

Calls 4

garrow_table_get_rawFunction · 0.85
garrow_takeFunction · 0.85
garrow_array_get_rawFunction · 0.70
DatumFunction · 0.50

Tested by

no test coverage detected