| 6798 | } |
| 6799 | |
| 6800 | G_END_DECLS |
| 6801 | template <typename BUILDER> |
| 6802 | GArrowArrayBuilder * |
| 6803 | garrow_union_array_builder_new(GArrowUnionDataType *data_type, |
| 6804 | GType builder_gtype, |
| 6805 | const gchar *context, |
| 6806 | GError **error) |
| 6807 | { |
| 6808 | if (data_type) { |
| 6809 | auto arrow_data_type = garrow_data_type_get_raw(GARROW_DATA_TYPE(data_type)); |
| 6810 | return garrow_array_builder_new(arrow_data_type, error, context); |
| 6811 | } else { |
| 6812 | auto memory_pool = arrow::default_memory_pool(); |
| 6813 | auto arrow_builder = std::static_pointer_cast<arrow::ArrayBuilder>( |
| 6814 | std::make_shared<BUILDER>(memory_pool)); |
| 6815 | return garrow_array_builder_new_raw(&arrow_builder, builder_gtype); |
| 6816 | } |
| 6817 | } |
| 6818 | G_BEGIN_DECLS |
| 6819 | |
| 6820 | G_DEFINE_TYPE(GArrowDenseUnionArrayBuilder, |
nothing calls this directly
no test coverage detected