* 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 */
| 6098 | * Since: 0.17.0 |
| 6099 | */ |
| 6100 | GArrowMapArrayBuilder * |
| 6101 | garrow_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: |
nothing calls this directly
no test coverage detected