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

Function garrow_array_view

c_glib/arrow-glib/basic-array.cpp:1217–1228  ·  view source on GitHub ↗

* garrow_array_view: * @array: A #GArrowArray. * @return_type: A #GArrowDataType of the returned view. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable) (transfer full): A zero-copy view of this array * with the given type. This method checks if the `return_type` are * layout-compatible. * * Since: 0.15.0 */

Source from the content-addressed store, hash-verified

1215 * Since: 0.15.0
1216 */
1217GArrowArray *
1218garrow_array_view(GArrowArray *array, GArrowDataType *return_type, GError **error)
1219{
1220 auto arrow_array_raw = garrow_array_get_raw(array);
1221 auto arrow_return_type = garrow_data_type_get_raw(return_type);
1222 auto arrow_array = arrow_array_raw->View(arrow_return_type);
1223 if (garrow::check(error, arrow_array, "[array][view]")) {
1224 return garrow_array_new_raw(&(*arrow_array));
1225 } else {
1226 return NULL;
1227 }
1228}
1229
1230/**
1231 * garrow_array_diff_unified:

Callers

nothing calls this directly

Calls 5

garrow_data_type_get_rawFunction · 0.85
garrow_array_new_rawFunction · 0.85
garrow_array_get_rawFunction · 0.70
checkFunction · 0.70
ViewMethod · 0.45

Tested by

no test coverage detected