* garrow_field_export: * @field: A #GArrowField. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (transfer full) (nullable): An exported #GArrowField as * `struct ArrowStruct *` on success, %NULL on error. * * It should be freed with the `ArrowSchema::release` callback then * g_free() when no longer needed. * * Since: 6.0.0 */
| 198 | * Since: 6.0.0 |
| 199 | */ |
| 200 | gpointer |
| 201 | garrow_field_export(GArrowField *field, GError **error) |
| 202 | { |
| 203 | const auto arrow_field = garrow_field_get_raw(field); |
| 204 | auto c_abi_schema = g_new(ArrowSchema, 1); |
| 205 | auto status = arrow::ExportField(*arrow_field, c_abi_schema); |
| 206 | if (garrow::check(error, status, "[field][export]")) { |
| 207 | return c_abi_schema; |
| 208 | } else { |
| 209 | g_free(c_abi_schema); |
| 210 | return NULL; |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | /** |
| 215 | * garrow_field_get_name: |
nothing calls this directly
no test coverage detected