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

Function garrow_field_export

c_glib/arrow-glib/field.cpp:200–212  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

198 * Since: 6.0.0
199 */
200gpointer
201garrow_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:

Callers

nothing calls this directly

Calls 3

garrow_field_get_rawFunction · 0.85
checkFunction · 0.70
ExportFieldFunction · 0.50

Tested by

no test coverage detected