* garrow_binary_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
| 2728 | * Since: 20.0.0 |
| 2729 | */ |
| 2730 | GArrowBinaryViewArray * |
| 2731 | garrow_binary_view_array_new(gint64 length, |
| 2732 | GArrowBuffer *views, |
| 2733 | GList *data_buffers, |
| 2734 | GArrowBuffer *null_bitmap, |
| 2735 | gint64 n_nulls, |
| 2736 | gint64 offset) |
| 2737 | { |
| 2738 | std::vector<std::shared_ptr<arrow::Buffer>> arrow_data_buffers; |
| 2739 | for (GList *node = data_buffers; node; node = g_list_next(node)) { |
| 2740 | arrow_data_buffers.push_back(garrow_buffer_get_raw(GARROW_BUFFER(node->data))); |
| 2741 | } |
| 2742 | auto binary_view_array = |
| 2743 | std::make_shared<arrow::BinaryViewArray>(arrow::binary_view(), |
| 2744 | length, |
| 2745 | garrow_buffer_get_raw(views), |
| 2746 | std::move(arrow_data_buffers), |
| 2747 | garrow_buffer_get_raw(null_bitmap), |
| 2748 | n_nulls, |
| 2749 | offset); |
| 2750 | return GARROW_BINARY_VIEW_ARRAY( |
| 2751 | g_object_new(GARROW_TYPE_BINARY_VIEW_ARRAY, "array", &binary_view_array, nullptr)); |
| 2752 | } |
| 2753 | |
| 2754 | /** |
| 2755 | * garrow_binary_view_array_get_value: |
nothing calls this directly
no test coverage detected