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

Function garrow_array_sort_indices

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

* garrow_array_sort_indices: * @array: A #GArrowArray. * @order: The order for sort. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable) (transfer full): The indices that would sort * an array in the specified order on success, %NULL on error. * * Since: 3.0.0 */

Source from the content-addressed store, hash-verified

5672 * Since: 3.0.0
5673 */
5674GArrowUInt64Array *
5675garrow_array_sort_indices(GArrowArray *array, GArrowSortOrder order, GError **error)
5676{
5677 auto arrow_array = garrow_array_get_raw(array);
5678 auto arrow_array_raw = arrow_array.get();
5679 auto arrow_order = static_cast<arrow::compute::SortOrder>(order);
5680 auto arrow_indices_array = arrow::compute::SortIndices(*arrow_array_raw, arrow_order);
5681 if (garrow::check(error, arrow_indices_array, "[array][sort-indices]")) {
5682 return GARROW_UINT64_ARRAY(garrow_array_new_raw(&(*arrow_indices_array)));
5683 } else {
5684 return NULL;
5685 }
5686}
5687
5688/**
5689 * garrow_array_sort_to_indices:

Callers 1

Calls 5

SortIndicesFunction · 0.85
garrow_array_new_rawFunction · 0.85
garrow_array_get_rawFunction · 0.70
checkFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected