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

Function garrow_make_struct_options_add_field

c_glib/arrow-glib/compute.cpp:10874–10889  ·  view source on GitHub ↗

* garrow_make_struct_options_add_field: * @options: A #GArrowMakeStructOptions. * @name: The name of the field to add. * @nullability: Whether the field is nullable. * @metadata: (nullable) (element-type utf8 utf8): A #GHashTable for the field's * metadata, or %NULL. * * Adds a field to the struct options with the specified name, nullability, * and optional metadata. * * Since: 23.0.0

Source from the content-addressed store, hash-verified

10872 * Since: 23.0.0
10873 */
10874void
10875garrow_make_struct_options_add_field(GArrowMakeStructOptions *options,
10876 const char *name,
10877 gboolean nullability,
10878 GHashTable *metadata)
10879{
10880 auto arrow_options = garrow_make_struct_options_get_raw(options);
10881 arrow_options->field_names.emplace_back(name);
10882 arrow_options->field_nullability.push_back(nullability != FALSE);
10883 if (metadata) {
10884 arrow_options->field_metadata.push_back(
10885 garrow_internal_hash_table_to_metadata(metadata));
10886 } else {
10887 arrow_options->field_metadata.push_back(nullptr);
10888 }
10889}
10890
10891G_END_DECLS
10892

Callers

nothing calls this directly

Calls 4

emplace_backMethod · 0.80
push_backMethod · 0.80

Tested by

no test coverage detected