* garrow_string_view_array_new: * @length: The number of elements. * @views: The view buffer. * @data_buffers: (element-type GArrowBuffer): The data buffers. * @null_bitmap: (nullable): The bitmap that shows null elements. The * N-th element is null when the N-th bit is 0, not null otherwise. * If the array has no null elements, the bitmap must be %NULL and * @n_nulls is 0. * @n_null
| 2797 | * Since: 20.0.0 |
| 2798 | */ |
| 2799 | GArrowStringViewArray * |
| 2800 | garrow_string_view_array_new(gint64 length, |
| 2801 | GArrowBuffer *views, |
| 2802 | GList *data_buffers, |
| 2803 | GArrowBuffer *null_bitmap, |
| 2804 | gint64 n_nulls, |
| 2805 | gint64 offset) |
| 2806 | { |
| 2807 | std::vector<std::shared_ptr<arrow::Buffer>> arrow_data_buffers; |
| 2808 | for (GList *node = data_buffers; node; node = g_list_next(node)) { |
| 2809 | arrow_data_buffers.push_back(garrow_buffer_get_raw(GARROW_BUFFER(node->data))); |
| 2810 | } |
| 2811 | auto arrow_string_view_array = |
| 2812 | std::make_shared<arrow::StringViewArray>(arrow::utf8_view(), |
| 2813 | length, |
| 2814 | garrow_buffer_get_raw(views), |
| 2815 | std::move(arrow_data_buffers), |
| 2816 | garrow_buffer_get_raw(null_bitmap), |
| 2817 | n_nulls, |
| 2818 | offset); |
| 2819 | return GARROW_STRING_VIEW_ARRAY(g_object_new(GARROW_TYPE_STRING_VIEW_ARRAY, |
| 2820 | "array", |
| 2821 | &arrow_string_view_array, |
| 2822 | nullptr)); |
| 2823 | } |
| 2824 | |
| 2825 | /** |
| 2826 | * garrow_string_view_array_get_value: |
nothing calls this directly
no test coverage detected