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

Function garrow_schema_remove_field

c_glib/arrow-glib/schema.cpp:366–376  ·  view source on GitHub ↗

* garrow_schema_remove_field: * @schema: A #GArrowSchema. * @i: The index of the field to be removed. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable) (transfer full): The newly allocated * #GArrowSchema that doesn't have the field or %NULL on error. * * Since: 0.10.0 */

Source from the content-addressed store, hash-verified

364 * Since: 0.10.0
365 */
366GArrowSchema *
367garrow_schema_remove_field(GArrowSchema *schema, guint i, GError **error)
368{
369 const auto arrow_schema = garrow_schema_get_raw(schema);
370 auto maybe_new_schema = arrow_schema->RemoveField(i);
371 if (garrow::check(error, maybe_new_schema, "[schema][remove-field]")) {
372 return garrow_schema_new_raw(&(*maybe_new_schema));
373 } else {
374 return NULL;
375 }
376}
377
378/**
379 * garrow_schema_replace_field:

Callers

nothing calls this directly

Calls 3

garrow_schema_get_rawFunction · 0.85
RemoveFieldMethod · 0.80
checkFunction · 0.70

Tested by

no test coverage detected