* 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 */
| 364 | * Since: 0.10.0 |
| 365 | */ |
| 366 | GArrowSchema * |
| 367 | garrow_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: |
nothing calls this directly
no test coverage detected