sparrow 0.3.0
Loading...
Searching...
No Matches
list_array.hpp
Go to the documentation of this file.
1// Copyright 2024 Man Group Operations Limited
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <string> // for std::stoull
18#include <type_traits>
19
20#include "sparrow/array_api.hpp"
34
35namespace sparrow
36{
37 template <class DERIVED>
39
40 template <bool BIG>
41 class list_array_impl;
42
43 template <bool BIG>
45
48
51
53
57 template <class T>
58 constexpr bool is_list_array_v = std::same_as<T, list_array>;
59
63 template <class T>
64 constexpr bool is_big_list_array_v = std::same_as<T, big_list_array>;
65
69 template <class T>
70 constexpr bool is_list_view_array_v = std::same_as<T, list_view_array>;
71
75 template <class T>
76 constexpr bool is_big_list_view_array_v = std::same_as<T, big_list_view_array>;
77
81 template <class T>
82 constexpr bool is_fixed_sized_list_array_v = std::same_as<T, fixed_sized_list_array>;
83
84 namespace detail
85 {
86 template <class T>
87 struct get_data_type_from_array;
88
89 template <>
91 {
92 [[nodiscard]] static constexpr sparrow::data_type get()
93 {
95 }
96 };
97
98 template <>
100 {
101 [[nodiscard]] static constexpr sparrow::data_type get()
102 {
104 }
105 };
106
107 template <>
109 {
110 [[nodiscard]] static constexpr sparrow::data_type get()
111 {
113 }
114 };
115
116 template <>
118 {
119 [[nodiscard]] static constexpr sparrow::data_type get()
120 {
122 }
123 };
124
125 template <>
127 {
128 [[nodiscard]] static constexpr sparrow::data_type get()
129 {
131 }
132 };
133 }
134
135 template <bool BIG>
148
149 template <bool BIG>
162
163 template <>
176
177 // using list_array = list_array_crtp_base<false>;
178 // using big_list_array = list_array_crtp_base<true>;
179
180 // this is the base class for
181 // - list-array
182 // - big-list-array
183 // - list-view-array
184 // - big-list-view-array
185 // - fixed-size-list-array
186 template <class DERIVED>
188 {
189 public:
190
194 using value_iterator = typename inner_types::value_iterator;
195 using const_value_iterator = typename inner_types::const_value_iterator;
197
199 // using bitmap_reference = typename base_type::bitmap_reference;
201
202 // using bitmap_range = typename base_type::bitmap_range;
204
208
210 // using reference = nullable<inner_reference, bitmap_reference>;
213
214 [[nodiscard]] const array_wrapper* raw_flat_array() const;
216
217 protected:
218
220
223
226
227 private:
228
229 using list_size_type = inner_types::list_size_type;
230
231 [[nodiscard]] value_iterator value_begin();
232 [[nodiscard]] value_iterator value_end();
233 [[nodiscard]] const_value_iterator value_cbegin() const;
234 [[nodiscard]] const_value_iterator value_cend() const;
235
236 [[nodiscard]] inner_reference value(size_type i);
237 [[nodiscard]] inner_const_reference value(size_type i) const;
238
239 [[nodiscard]] cloning_ptr<array_wrapper> make_flat_array();
240
241 // data members
243
244 // friend classes
245 friend class array_crtp_base<DERIVED>;
246
247 // needs access to this->value(i)
248 friend class detail::layout_value_functor<DERIVED, inner_value_type>;
249 friend class detail::layout_value_functor<const DERIVED, inner_value_type>;
250 };
251
252 template <bool BIG>
253 class list_array_impl final : public list_array_crtp_base<list_array_impl<BIG>>
254 {
255 public:
256
260 using list_size_type = inner_types::list_size_type;
262 using offset_type = std::conditional_t<BIG, const std::int64_t, const std::int32_t>;
264
266
269
272
273 template <class... ARGS>
275 explicit list_array_impl(ARGS&&... args)
276 : self_type(create_proxy(std::forward<ARGS>(args)...))
277 {
278 }
279
280 template <std::ranges::range SIZES_RANGE>
281 [[nodiscard]] static auto offset_from_sizes(SIZES_RANGE&& sizes) -> offset_buffer_type;
282
283 private:
284
285 template <validity_bitmap_input VB = validity_bitmap>
286 [[nodiscard]] static arrow_proxy create_proxy(
287 array&& flat_values,
288 offset_buffer_type&& list_offsets,
289 VB&& validity_input = validity_bitmap{},
290 std::optional<std::string_view> name = std::nullopt,
291 std::optional<std::string_view> metadata = std::nullopt
292 );
293
294 static constexpr std::size_t OFFSET_BUFFER_INDEX = 1;
295 [[nodiscard]] std::pair<offset_type, offset_type> offset_range(size_type i) const;
296
297 [[nodiscard]] offset_type* make_list_offsets();
298
299 offset_type* p_list_offsets;
300
301 // friend classes
302 friend class array_crtp_base<self_type>;
303 friend class list_array_crtp_base<self_type>;
304 };
305
306 template <bool BIG>
307 class list_view_array_impl final : public list_array_crtp_base<list_view_array_impl<BIG>>
308 {
309 public:
310
314 using list_size_type = inner_types::list_size_type;
316 using offset_type = std::conditional_t<BIG, const std::int64_t, const std::int32_t>;
319
321
324
327
328 template <class... ARGS>
330 list_view_array_impl(ARGS&&... args)
331 : self_type(create_proxy(std::forward<ARGS>(args)...))
332 {
333 }
334
335 private:
336
337 template <validity_bitmap_input VB = validity_bitmap>
338 [[nodiscard]] static arrow_proxy create_proxy(
339 array&& flat_values,
340 offset_buffer_type&& list_offsets,
341 size_buffer_type&& list_sizes,
342 VB&& validity_input = validity_bitmap{},
343 std::optional<std::string_view> name = std::nullopt,
344 std::optional<std::string_view> metadata = std::nullopt
345 );
346
347 static constexpr std::size_t OFFSET_BUFFER_INDEX = 1;
348 static constexpr std::size_t SIZES_BUFFER_INDEX = 2;
349 [[nodiscard]] std::pair<offset_type, offset_type> offset_range(size_type i) const;
350
351 [[nodiscard]] offset_type* make_list_offsets();
352 [[nodiscard]] offset_type* make_list_sizes();
353
354 offset_type* p_list_offsets;
355 offset_type* p_list_sizes;
356
357 // friend classes
358 friend class array_crtp_base<self_type>;
359 friend class list_array_crtp_base<self_type>;
360 };
361
362 class fixed_sized_list_array final : public list_array_crtp_base<fixed_sized_list_array>
363 {
364 public:
365
369 using list_size_type = inner_types::list_size_type;
371 using offset_type = std::uint64_t;
372
373 explicit fixed_sized_list_array(arrow_proxy proxy);
374
377
380
381 template <class... ARGS>
384 : self_type(create_proxy(std::forward<ARGS>(args)...))
385 {
386 }
387
388 private:
389
390 template <validity_bitmap_input R = validity_bitmap>
391 [[nodiscard]] static arrow_proxy create_proxy(
392 std::uint64_t list_size,
393 array&& flat_values,
394 R&& validity_input = validity_bitmap{},
395 std::optional<std::string_view> name = std::nullopt,
396 std::optional<std::string_view> metadata = std::nullopt
397 );
398
399 [[nodiscard]] static uint64_t list_size_from_format(const std::string_view format);
400 [[nodiscard]] std::pair<offset_type, offset_type> offset_range(size_type i) const;
401
402 uint64_t m_list_size;
403
404 // friend classes
405 friend class array_crtp_base<self_type>;
406 friend class list_array_crtp_base<self_type>;
407 };
408
409 /***************************************
410 * list_array_crtp_base implementation *
411 ***************************************/
412
413 template <class DERIVED>
415 : base_type(std::move(proxy))
416 , p_flat_array(make_flat_array())
417 {
418 }
419
420 template <class DERIVED>
422 : base_type(rhs)
423 , p_flat_array(make_flat_array())
424 {
425 }
426
427 template <class DERIVED>
429 {
431 p_flat_array = make_flat_array();
432 return *this;
433 }
434
435 template <class DERIVED>
437 {
438 return p_flat_array.get();
439 }
440
441 template <class DERIVED>
443 {
444 return p_flat_array.get();
445 }
446
447 template <class DERIVED>
448 auto list_array_crtp_base<DERIVED>::value_begin() -> value_iterator
449 {
450 return value_iterator(detail::layout_value_functor<DERIVED, inner_value_type>(&this->derived_cast()), 0);
451 }
452
453 template <class DERIVED>
454 auto list_array_crtp_base<DERIVED>::value_end() -> value_iterator
455 {
456 return value_iterator(
457 detail::layout_value_functor<DERIVED, inner_value_type>(&this->derived_cast()),
458 this->size()
459 );
460 }
461
462 template <class DERIVED>
463 auto list_array_crtp_base<DERIVED>::value_cbegin() const -> const_value_iterator
464 {
465 return const_value_iterator(
467 0
468 );
469 }
470
471 template <class DERIVED>
472 auto list_array_crtp_base<DERIVED>::value_cend() const -> const_value_iterator
473 {
474 return const_value_iterator(
476 this->size()
477 );
478 }
479
480 template <class DERIVED>
481 auto list_array_crtp_base<DERIVED>::value(size_type i) -> inner_reference
482 {
483 const auto r = this->derived_cast().offset_range(i);
484 using st = typename list_value::size_type;
485 return list_value{p_flat_array.get(), static_cast<st>(r.first), static_cast<st>(r.second)};
486 }
487
488 template <class DERIVED>
489 auto list_array_crtp_base<DERIVED>::value(size_type i) const -> inner_const_reference
490 {
491 const auto r = this->derived_cast().offset_range(i);
492 using st = typename list_value::size_type;
493 return list_value{p_flat_array.get(), static_cast<st>(r.first), static_cast<st>(r.second)};
494 }
495
496 template <class DERIVED>
497 cloning_ptr<array_wrapper> list_array_crtp_base<DERIVED>::make_flat_array()
498 {
499 return array_factory(this->get_arrow_proxy().children()[0].view());
500 }
501
502 /**********************************
503 * list_array_impl implementation *
504 **********************************/
505
506#ifdef __GNUC__
507# pragma GCC diagnostic push
508# pragma GCC diagnostic ignored "-Wcast-align"
509#endif
510
511 template <bool BIG>
513 : base_type(std::move(proxy))
514 , p_list_offsets(make_list_offsets())
515 {
516 }
517
518 template <bool BIG>
519 template <std::ranges::range SIZES_RANGE>
521 {
522 return detail::offset_buffer_from_sizes<std::remove_const_t<offset_type>>(std::forward<SIZES_RANGE>(sizes
523 ));
524 }
525
526 template <bool BIG>
527 template <validity_bitmap_input VB>
528 arrow_proxy list_array_impl<BIG>::create_proxy(
529 array&& flat_values,
530 offset_buffer_type&& list_offsets,
531 VB&& validity_input,
532 std::optional<std::string_view> name,
533 std::optional<std::string_view> metadata
534 )
535 {
536 const auto size = list_offsets.size() - 1;
537 validity_bitmap vbitmap = ensure_validity_bitmap(size, std::forward<VB>(validity_input));
538
539 auto [flat_arr, flat_schema] = extract_arrow_structures(std::move(flat_values));
540
541 const auto null_count = vbitmap.null_count();
542
544 BIG ? std::string("+L") : std::string("+l"), // format
545 name, // name
546 metadata, // metadata
547 std::nullopt, // flags,
548 1, // n_children
549 new ArrowSchema*[1]{new ArrowSchema(std::move(flat_schema))}, // children
550 nullptr // dictionary
551
552 );
553 std::vector<buffer<std::uint8_t>> arr_buffs = {
554 std::move(vbitmap).extract_storage(),
555 std::move(list_offsets).extract_storage()
556 };
557
558 ArrowArray arr = make_arrow_array(
559 static_cast<std::int64_t>(size), // length
560 static_cast<int64_t>(null_count),
561 0, // offset
562 std::move(arr_buffs),
563 1, // n_children
564 new ArrowArray*[1]{new ArrowArray(std::move(flat_arr))}, // children
565 nullptr // dictionary
566 );
567 return arrow_proxy{std::move(arr), std::move(schema)};
568 }
569
570 template <bool BIG>
572 : base_type(rhs)
573 , p_list_offsets(make_list_offsets())
574 {
575 }
576
577 template <bool BIG>
579 {
580 if (this != &rhs)
581 {
583 p_list_offsets = make_list_offsets();
584 }
585 return *this;
586 }
587
588 template <bool BIG>
589 auto list_array_impl<BIG>::offset_range(size_type i) const -> std::pair<offset_type, offset_type>
590 {
591 return std::make_pair(p_list_offsets[i], p_list_offsets[i + 1]);
592 }
593
594 template <bool BIG>
595 auto list_array_impl<BIG>::make_list_offsets() -> offset_type*
596 {
597 return reinterpret_cast<offset_type*>(
598 this->get_arrow_proxy().buffers()[OFFSET_BUFFER_INDEX].data() + this->get_arrow_proxy().offset()
599 );
600 }
601
602 /***************************************
603 * list_view_array_impl implementation *
604 ***************************************/
605
606 template <bool BIG>
608 : base_type(std::move(proxy))
609 , p_list_offsets(make_list_offsets())
610 , p_list_sizes(make_list_sizes())
611 {
612 }
613
614 template <bool BIG>
615 template <validity_bitmap_input VB>
616 arrow_proxy list_view_array_impl<BIG>::create_proxy(
617 array&& flat_values,
618 offset_buffer_type&& list_offsets,
619 size_buffer_type&& list_sizes,
620 VB&& validity_input,
621 std::optional<std::string_view> name,
622 std::optional<std::string_view> metadata
623 )
624 {
625 SPARROW_ASSERT(list_offsets.size() == list_sizes.size(), "sizes and offset must have the same size");
626
627 const auto size = list_sizes.size();
628 validity_bitmap vbitmap = ensure_validity_bitmap(size, std::forward<VB>(validity_input));
629
630 auto [flat_arr, flat_schema] = extract_arrow_structures(std::move(flat_values));
631
632 const auto null_count = vbitmap.null_count();
633
635 BIG ? std::string("+vL") : std::string("+vl"), // format
636 name, // name
637 metadata, // metadata
638 std::nullopt, // flags,
639 1, // n_children
640 new ArrowSchema*[1]{new ArrowSchema(std::move(flat_schema))}, // children
641 nullptr // dictionary
642
643 );
644 std::vector<buffer<std::uint8_t>> arr_buffs = {
645 std::move(vbitmap).extract_storage(),
646 std::move(list_offsets).extract_storage(),
647 std::move(list_sizes).extract_storage()
648 };
649
650 ArrowArray arr = make_arrow_array(
651 static_cast<std::int64_t>(size), // length
652 static_cast<int64_t>(null_count),
653 0, // offset
654 std::move(arr_buffs),
655 1, // n_children
656 new ArrowArray*[1]{new ArrowArray(std::move(flat_arr))}, // children
657 nullptr // dictionary
658 );
659 return arrow_proxy{std::move(arr), std::move(schema)};
660 }
661
662 template <bool BIG>
664 : base_type(rhs)
665 , p_list_offsets(make_list_offsets())
666 , p_list_sizes(make_list_sizes())
667 {
668 }
669
670 template <bool BIG>
672 {
673 if (this != &rhs)
674 {
676 p_list_offsets = make_list_offsets();
677 p_list_sizes = make_list_sizes();
678 }
679 return *this;
680 }
681
682 template <bool BIG>
683 inline auto list_view_array_impl<BIG>::offset_range(size_type i) const
684 -> std::pair<offset_type, offset_type>
685 {
686 const auto offset = p_list_offsets[i];
687 return std::make_pair(offset, offset + p_list_sizes[i]);
688 }
689
690 template <bool BIG>
691 auto list_view_array_impl<BIG>::make_list_offsets() -> offset_type*
692 {
693 return reinterpret_cast<offset_type*>(
694 this->get_arrow_proxy().buffers()[OFFSET_BUFFER_INDEX].data() + this->get_arrow_proxy().offset()
695 );
696 }
697
698 template <bool BIG>
699 auto list_view_array_impl<BIG>::make_list_sizes() -> offset_type*
700 {
701 return reinterpret_cast<offset_type*>(
702 this->get_arrow_proxy().buffers()[SIZES_BUFFER_INDEX].data() + this->get_arrow_proxy().offset()
703 );
704 }
705
706#ifdef __GNUC__
707# pragma GCC diagnostic pop
708#endif
709
710 /*****************************************
711 * fixed_sized_list_array implementation *
712 *****************************************/
713
714 inline auto fixed_sized_list_array::list_size_from_format(const std::string_view format) -> uint64_t
715 {
716 SPARROW_ASSERT(format.size() >= 3, "Invalid format string");
717 const auto n_digits = format.size() - 3;
718 const auto list_size_str = format.substr(3, n_digits);
719 return std::stoull(std::string(list_size_str));
720 }
721
723 : base_type(std::move(proxy))
724 , m_list_size(fixed_sized_list_array::list_size_from_format(this->get_arrow_proxy().format()))
725 {
726 }
727
728 inline auto fixed_sized_list_array::offset_range(size_type i) const -> std::pair<offset_type, offset_type>
729 {
730 const auto offset = i * m_list_size;
731 return std::make_pair(offset, offset + m_list_size);
732 }
733
734 template <validity_bitmap_input R>
735 inline arrow_proxy fixed_sized_list_array::create_proxy(
736 std::uint64_t list_size,
737 array&& flat_values,
738 R&& validity_input,
739 std::optional<std::string_view> name,
740 std::optional<std::string_view> metadata
741 )
742 {
743 const auto size = flat_values.size() / static_cast<std::size_t>(list_size);
744 auto vbitmap = ensure_validity_bitmap(size, std::forward<R>(validity_input));
745
746 auto [flat_arr, flat_schema] = extract_arrow_structures(std::move(flat_values));
747
748 const auto null_count = vbitmap.null_count();
749
750 std::string format = "+w:" + std::to_string(list_size);
752 format,
753 std::move(name), // name
754 std::move(metadata), // metadata
755 std::nullopt, // flags,
756 1, // n_children
757 new ArrowSchema*[1]{new ArrowSchema(std::move(flat_schema))}, // children
758 nullptr // dictionary
759
760 );
761 std::vector<buffer<std::uint8_t>> arr_buffs = {vbitmap.extract_storage()};
762
763 ArrowArray arr = make_arrow_array(
764 static_cast<std::int64_t>(size), // length
765 static_cast<int64_t>(null_count),
766 0, // offset
767 std::move(arr_buffs),
768 1, // n_children
769 new ArrowArray*[1]{new ArrowArray(std::move(flat_arr))}, // children
770 nullptr // dictionary
771 );
772 return arrow_proxy{std::move(arr), std::move(schema)};
773 }
774}
typename base_type::const_bitmap_range const_bitmap_range
array_bitmap_base_impl & operator=(const array_bitmap_base_impl &)
typename base_type::iterator_tag iterator_tag
typename base_type::bitmap_const_reference bitmap_const_reference
typename base_type::bitmap_type bitmap_type
Base class defining common immutable interface for arrays with a bitmap.
Base class for array type erasure.
Dynamically typed array encapsulating an Arrow layout.
Definition array_api.hpp:39
Proxy class over ArrowArray and ArrowSchema.
Smart pointer behaving like a copiable std::unique_ptr.
Definition memory.hpp:127
storage_type extract_storage() noexcept
constexpr size_type null_count() const noexcept
fixed_sized_list_array & operator=(const self_type &)=default
inner_types::list_size_type list_size_type
array_inner_types< self_type > inner_types
fixed_sized_list_array(arrow_proxy proxy)
fixed_sized_list_array(ARGS &&... args)
list_array_crtp_base< self_type > base_type
fixed_sized_list_array self_type
fixed_sized_list_array & operator=(self_type &&)=default
fixed_sized_list_array(self_type &&)=default
typename base_type::size_type size_type
fixed_sized_list_array(const self_type &)=default
typename base_type::const_bitmap_range const_bitmap_range
const array_wrapper * raw_flat_array() const
list_array_crtp_base(self_type &&)=default
nullable< inner_const_reference, bitmap_const_reference > const_reference
typename inner_types::const_value_iterator const_value_iterator
typename base_type::bitmap_const_reference bitmap_const_reference
typename base_type::iterator_tag iterator_tag
list_array_crtp_base(arrow_proxy proxy)
array_wrapper * raw_flat_array()
typename inner_types::value_iterator value_iterator
list_array_crtp_base & operator=(const self_type &)
list_array_crtp_base & operator=(self_type &&)=default
typename base_type::bitmap_type bitmap_type
list_array_crtp_base< DERIVED > self_type
typename base_type::size_type size_type
array_inner_types< DERIVED > inner_types
list_array_crtp_base(const self_type &)
nullable< inner_value_type > value_type
array_bitmap_base< DERIVED > base_type
list_array_impl(self_type &&)=default
list_array_impl< BIG > self_type
std::conditional_t< BIG, const std::int64_t, const std::int32_t > offset_type
typename base_type::size_type size_type
list_array_impl & operator=(self_type &&)=default
list_array_impl(ARGS &&... args)
list_array_impl(const self_type &)
array_inner_types< self_type > inner_types
static auto offset_from_sizes(SIZES_RANGE &&sizes) -> offset_buffer_type
inner_types::list_size_type list_size_type
list_array_crtp_base< list_array_impl< BIG > > base_type
list_array_impl & operator=(const self_type &)
u8_buffer< std::remove_const_t< offset_type > > offset_buffer_type
list_array_impl(arrow_proxy proxy)
std::size_t size_type
list_view_array_impl & operator=(const self_type &)
typename base_type::size_type size_type
list_view_array_impl & operator=(self_type &&)=default
list_view_array_impl(self_type &&)=default
u8_buffer< std::remove_const_t< offset_type > > offset_buffer_type
list_view_array_impl(arrow_proxy proxy)
std::conditional_t< BIG, const std::int64_t, const std::int32_t > offset_type
array_inner_types< self_type > inner_types
list_array_crtp_base< list_view_array_impl< BIG > > base_type
list_view_array_impl(ARGS &&... args)
list_view_array_impl< BIG > self_type
list_view_array_impl(const self_type &)
inner_types::list_size_type list_size_type
u8_buffer< std::remove_const_t< list_size_type > > size_buffer_type
The nullable class models a value or a reference that can be "null", or missing, like values traditio...
Definition nullable.hpp:280
#define SPARROW_ASSERT(expr__, message__)
sparrow::u8_buffer< OFFSET_TYPE > offset_buffer_from_sizes(SIZES_RANGE &&sizes)
constexpr std::size_t size(typelist< T... >={})
Definition mp_utils.hpp:107
constexpr bool excludes_copy_and_move_ctor_v
Definition mp_utils.hpp:507
constexpr bool is_list_view_array_v
Checks whether T is a list_view_array type.
ArrowSchema make_arrow_schema(F format, N name, M metadata, std::optional< ArrowFlag > flags, int64_t n_children, ArrowSchema **children, ArrowSchema *dictionary)
Creates an ArrowSchema owned by a unique_ptr and holding the provided data.
list_array_impl< false > list_array
array_bitmap_base_impl< D, false > array_bitmap_base
Convenient typedef to be used as a crtp base class for arrays using an immutable validity buffer.
constexpr bool is_fixed_sized_list_array_v
Checks whether T is a fixed_sized_list_array type.
list_view_array_impl< true > big_list_view_array
std::pair< ArrowArray, ArrowSchema > extract_arrow_structures(A &&a)
Extracts the internal ArrowArrays and ArrowSchema structures from the given array or typed layout.
Definition array.hpp:91
constexpr bool is_big_list_array_v
Checks whether T is a big_list_array type.
list_view_array_impl< false > list_view_array
dynamic_bitset< std::uint8_t > validity_bitmap
constexpr bool is_list_array_v
Checks whether T is a list_array type.
SPARROW_API cloning_ptr< array_wrapper > array_factory(arrow_proxy proxy)
list_array_impl< true > big_list_array
validity_bitmap ensure_validity_bitmap(std::size_t size, R &&validity_input)
constexpr bool is_big_list_view_array_v
Checks whether T is a big_list_view_array type.
data_type
Runtime identifier of arrow data types, usually associated with raw bytes with the associated value.
ArrowArray make_arrow_array(int64_t length, int64_t null_count, int64_t offset, B buffers, size_t n_children, ArrowArray **children, ArrowArray *dictionary)
Creates an ArrowArray.
functor_index_iterator< detail::layout_value_functor< const array_type, inner_value_type > > const_value_iterator
functor_index_iterator< detail::layout_value_functor< array_type, inner_value_type > > value_iterator
std::conditional_t< BIG, std::uint64_t, std::uint32_t > list_size_type
functor_index_iterator< detail::layout_value_functor< const array_type, inner_value_type > > const_value_iterator
functor_index_iterator< detail::layout_value_functor< array_type, inner_value_type > > value_iterator
functor_index_iterator< detail::layout_value_functor< array_type, inner_value_type > > value_iterator
std::conditional_t< BIG, std::uint64_t, std::uint32_t > list_size_type
functor_index_iterator< detail::layout_value_functor< const array_type, inner_value_type > > const_value_iterator
Base class for array_inner_types specialization.
Traits class that must be specialized by array classes inheriting from array_crtp_base.