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

Function garrow_array_unique

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

* garrow_array_unique: * @array: A #GArrowArray. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable) (transfer full): * A newly created unique elements array on success, %NULL on error. * * Since: 0.8.0 */

Source from the content-addressed store, hash-verified

4962 * Since: 0.8.0
4963 */
4964GArrowArray *
4965garrow_array_unique(GArrowArray *array, GError **error)
4966{
4967 auto arrow_array = garrow_array_get_raw(array);
4968 auto arrow_unique_array = arrow::compute::Unique(arrow_array);
4969 if (garrow::check(error, arrow_unique_array, [&]() {
4970 std::stringstream message;
4971 message << "[array][unique] <";
4972 message << arrow_array->type()->ToString();
4973 message << ">";
4974 return message.str();
4975 })) {
4976 return garrow_array_new_raw(&(*arrow_unique_array));
4977 } else {
4978 return NULL;
4979 }
4980}
4981
4982/**
4983 * garrow_array_dictionary_encode:

Callers

nothing calls this directly

Calls 6

garrow_array_new_rawFunction · 0.85
strMethod · 0.80
garrow_array_get_rawFunction · 0.70
checkFunction · 0.70
ToStringMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected