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

Function garrow_array_concatenate

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

* garrow_array_concatenate: * @array: A #GArrowArray. * @other_arrays: (element-type GArrowArray): A #GArrowArray to be * concatenated. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable) (transfer full): The concatenated array. * * Since: 4.0.0 */

Source from the content-addressed store, hash-verified

1268 * Since: 4.0.0
1269 */
1270GArrowArray *
1271garrow_array_concatenate(GArrowArray *array, GList *other_arrays, GError **error)
1272{
1273 if (!other_arrays) {
1274 g_object_ref(array);
1275 return array;
1276 }
1277 arrow::ArrayVector arrow_arrays;
1278 arrow_arrays.push_back(garrow_array_get_raw(array));
1279 for (auto node = other_arrays; node; node = node->next) {
1280 auto other_array = GARROW_ARRAY(node->data);
1281 arrow_arrays.push_back(garrow_array_get_raw(other_array));
1282 }
1283 auto arrow_concatenated_array = arrow::Concatenate(arrow_arrays);
1284 if (garrow::check(error, arrow_concatenated_array, "[array][concatenate]")) {
1285 return garrow_array_new_raw(&(*arrow_concatenated_array));
1286 } else {
1287 return NULL;
1288 }
1289}
1290
1291/**
1292 * garrow_array_validate:

Callers

nothing calls this directly

Calls 5

ConcatenateFunction · 0.85
garrow_array_new_rawFunction · 0.85
push_backMethod · 0.80
garrow_array_get_rawFunction · 0.70
checkFunction · 0.70

Tested by

no test coverage detected