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

Function garrow_map_array_builder_new

c_glib/arrow-glib/array-builder.cpp:6100–6119  ·  view source on GitHub ↗

* garrow_map_array_builder_new: * @data_type: #GArrowMapDataType for the map. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable): A newly created #GArrowMapArrayBuilder on success, * %NULL on error. * * Since: 0.17.0 */

Source from the content-addressed store, hash-verified

6098 * Since: 0.17.0
6099 */
6100GArrowMapArrayBuilder *
6101garrow_map_array_builder_new(GArrowMapDataType *data_type, GError **error)
6102{
6103 if (!GARROW_IS_MAP_DATA_TYPE(data_type)) {
6104 g_set_error(error,
6105 GARROW_ERROR,
6106 GARROW_ERROR_INVALID,
6107 "[map-array-builder][new] data type must be map data type");
6108 return NULL;
6109 }
6110
6111 auto arrow_data_type = garrow_data_type_get_raw(GARROW_DATA_TYPE(data_type));
6112 auto builder =
6113 garrow_array_builder_new(arrow_data_type, error, "[map-array-builder][new]");
6114 if (builder) {
6115 return GARROW_MAP_ARRAY_BUILDER(builder);
6116 } else {
6117 return NULL;
6118 }
6119}
6120
6121/**
6122 * garrow_map_array_builder_append_value:

Callers

nothing calls this directly

Calls 2

garrow_data_type_get_rawFunction · 0.85
garrow_array_builder_newFunction · 0.85

Tested by

no test coverage detected