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

Function garrow_array_view

c_glib/arrow-glib/basic-array.cpp:1218–1229  ·  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

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