* garrow_struct_array_builder_new: * @data_type: #GArrowStructDataType for the struct. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: A newly created #GArrowStructArrayBuilder. */
| 5913 | * Returns: A newly created #GArrowStructArrayBuilder. |
| 5914 | */ |
| 5915 | GArrowStructArrayBuilder * |
| 5916 | garrow_struct_array_builder_new(GArrowStructDataType *data_type, GError **error) |
| 5917 | { |
| 5918 | if (!GARROW_IS_STRUCT_DATA_TYPE(data_type)) { |
| 5919 | g_set_error(error, |
| 5920 | GARROW_ERROR, |
| 5921 | GARROW_ERROR_INVALID, |
| 5922 | "[struct-array-builder][new] data type must be struct data type"); |
| 5923 | return NULL; |
| 5924 | } |
| 5925 | |
| 5926 | auto arrow_data_type = garrow_data_type_get_raw(GARROW_DATA_TYPE(data_type)); |
| 5927 | auto builder = |
| 5928 | garrow_array_builder_new(arrow_data_type, error, "[struct-array-builder][new]"); |
| 5929 | return GARROW_STRUCT_ARRAY_BUILDER(builder); |
| 5930 | } |
| 5931 | |
| 5932 | /** |
| 5933 | * garrow_struct_array_builder_append: |
nothing calls this directly
no test coverage detected