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

Function garrow_schema_export

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

* garrow_schema_export: * @schema: A #GArrowSchema. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (transfer full) (nullable): An exported #GArrowSchema 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

178 * Since: 6.0.0
179 */
180gpointer
181garrow_schema_export(GArrowSchema *schema, GError **error)
182{
183 const auto arrow_schema = garrow_schema_get_raw(schema);
184 auto c_abi_schema = g_new(ArrowSchema, 1);
185 auto status = arrow::ExportSchema(*arrow_schema, c_abi_schema);
186 if (garrow::check(error, status, "[schema][export]")) {
187 return c_abi_schema;
188 } else {
189 g_free(c_abi_schema);
190 return NULL;
191 }
192}
193
194/**
195 * garrow_schema_equal:

Callers

nothing calls this directly

Calls 3

garrow_schema_get_rawFunction · 0.85
checkFunction · 0.70
ExportSchemaFunction · 0.50

Tested by

no test coverage detected