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:10821–10836  ·  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

10819 * Since: 23.0.0
10820 */
10821void
10822garrow_make_struct_options_add_field(GArrowMakeStructOptions *options,
10823 const char *name,
10824 gboolean nullability,
10825 GHashTable *metadata)
10826{
10827 auto arrow_options = garrow_make_struct_options_get_raw(options);
10828 arrow_options->field_names.emplace_back(name);
10829 arrow_options->field_nullability.push_back(nullability != FALSE);
10830 if (metadata) {
10831 arrow_options->field_metadata.push_back(
10832 garrow_internal_hash_table_to_metadata(metadata));
10833 } else {
10834 arrow_options->field_metadata.push_back(nullptr);
10835 }
10836}
10837
10838G_END_DECLS
10839

Callers

nothing calls this directly

Calls 4

emplace_backMethod · 0.80
push_backMethod · 0.80

Tested by

no test coverage detected