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

Function garrow_dictionary_array_get_indices

c_glib/arrow-glib/composite-array.cpp:1979–1993  ·  view source on GitHub ↗

* garrow_dictionary_array_get_indices: * @array: A #GArrowDictionaryArray. * * Returns: (transfer full): The indices of values in dictionary. * * Since: 0.8.0 */

Source from the content-addressed store, hash-verified

1977 * Since: 0.8.0
1978 */
1979GArrowArray *
1980garrow_dictionary_array_get_indices(GArrowDictionaryArray *array)
1981{
1982 auto priv = GARROW_DICTIONARY_ARRAY_GET_PRIVATE(array);
1983 if (priv->indices) {
1984 g_object_ref(priv->indices);
1985 return priv->indices;
1986 }
1987
1988 auto arrow_array = garrow_array_get_raw(GARROW_ARRAY(array));
1989 auto arrow_dictionary_array =
1990 std::static_pointer_cast<arrow::DictionaryArray>(arrow_array);
1991 auto arrow_indices = arrow_dictionary_array->indices();
1992 return garrow_array_new_raw(&arrow_indices);
1993}
1994
1995/**
1996 * garrow_dictionary_array_get_dictionary:

Callers

nothing calls this directly

Calls 3

garrow_array_new_rawFunction · 0.85
indicesMethod · 0.80
garrow_array_get_rawFunction · 0.70

Tested by

no test coverage detected