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

Function garrow_table_sort_indices

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

* garrow_table_sort_indices: * @table: A #GArrowTable. * @options: The options to be used. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable) (transfer full): The indices that would sort * a table with the specified options on success, %NULL on error. * * Since: 3.0.0 */

Source from the content-addressed store, hash-verified

5816 * Since: 3.0.0
5817 */
5818GArrowUInt64Array *
5819garrow_table_sort_indices(GArrowTable *table, GArrowSortOptions *options, GError **error)
5820{
5821 auto arrow_table = garrow_table_get_raw(table);
5822 auto arrow_table_raw = arrow_table.get();
5823 auto arrow_options = garrow_sort_options_get_raw(options);
5824 auto arrow_indices_array =
5825 arrow::compute::SortIndices(::arrow::Datum(*arrow_table_raw), *arrow_options);
5826 if (garrow::check(error, arrow_indices_array, "[table][sort-indices]")) {
5827 return GARROW_UINT64_ARRAY(garrow_array_new_raw(&(*arrow_indices_array)));
5828 } else {
5829 return NULL;
5830 }
5831}
5832
5833/**
5834 * garrow_table_filter:

Callers

nothing calls this directly

Calls 7

garrow_table_get_rawFunction · 0.85
SortIndicesFunction · 0.85
garrow_array_new_rawFunction · 0.85
checkFunction · 0.70
DatumFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected