sparrow 0.9.0
Loading...
Searching...
No Matches
sparrow::list_array_impl< BIG > Class Template Reference

#include <list_array.hpp>

Inheritance diagram for sparrow::list_array_impl< BIG >:
[legend]
Collaboration diagram for sparrow::list_array_impl< BIG >:
[legend]

Public Types

using self_type = list_array_impl<BIG>
 
using inner_types = array_inner_types<self_type>
 
using base_type = list_array_crtp_base<list_array_impl<BIG>>
 
using list_size_type = inner_types::list_size_type
 
using size_type = typename base_type::size_type
 
using offset_type = std::conditional_t<BIG, const std::int64_t, const std::int32_t>
 
using offset_buffer_type = u8_buffer<std::remove_const_t<offset_type>>
 
- Public Types inherited from sparrow::list_array_crtp_base< list_array_impl< BIG > >
using self_type
 
using base_type
 
using inner_types
 
using value_iterator
 
using const_value_iterator
 
using size_type
 
using bitmap_type
 
using bitmap_const_reference
 
using const_bitmap_range
 
using inner_value_type
 
using inner_reference
 
using inner_const_reference
 
using value_type
 
using const_reference
 
using iterator_tag
 
- Public Types inherited from sparrow::array_bitmap_base_impl< D, false >
using base_type
 
using size_type
 
using bitmap_type
 
using bitmap_iterator
 
using const_bitmap_iterator
 
using bitmap_const_reference
 
using difference_type
 
using const_bitmap_range
 
using iterator_tag
 

Public Member Functions

 list_array_impl (arrow_proxy proxy)
 Constructs list array from Arrow proxy.
 
constexpr list_array_impl (const self_type &)
 Copy constructor.
 
constexpr list_array_imploperator= (const self_type &)
 Copy assignment operator.
 
constexpr list_array_impl (self_type &&) noexcept=default
 
constexpr list_array_imploperator= (self_type &&) noexcept=default
 
template<class... ARGS>
requires (mpl::excludes_copy_and_move_ctor_v<list_array_impl<BIG>, ARGS...>)
 list_array_impl (ARGS &&... args)
 Generic constructor for creating list array from various inputs.
 
- Public Member Functions inherited from sparrow::list_array_crtp_base< list_array_impl< BIG > >
constexpr const array_wrapperraw_flat_array () const
 Gets read-only access to the underlying flat array.
 
constexpr array_wrapperraw_flat_array ()
 Gets mutable access to the underlying flat array.
 
constexpr const array_wrapperraw_flat_array () const
 Gets read-only access to the underlying flat array.
 
constexpr array_wrapperraw_flat_array ()
 Gets mutable access to the underlying flat array.
 
- Public Member Functions inherited from sparrow::array_bitmap_base_impl< D, false >
constexpr auto insert_bitmap (const_bitmap_iterator pos, InputIt first, InputIt last) -> bitmap_iterator is_mutable
 
constexpr auto insert_bitmap (const_bitmap_iterator pos, InputIt first, InputIt last) -> bitmap_iterator is_mutable
 

Static Public Member Functions

template<std::ranges::range SIZES_RANGE>
static constexpr auto offset_from_sizes (SIZES_RANGE &&sizes) -> offset_buffer_type
 Creates offset buffer from list sizes.
 

Friends

class array_crtp_base< self_type >
 
class list_array_crtp_base< self_type >
 

Additional Inherited Members

- Protected Member Functions inherited from sparrow::list_array_crtp_base< list_array_impl< BIG > >
 list_array_crtp_base (arrow_proxy proxy)
 Constructs list array base from Arrow proxy.
 
constexpr list_array_crtp_base (const self_type &)
 Copy constructor.
 
constexpr list_array_crtp_baseoperator= (const self_type &)
 Copy assignment operator.
 
constexpr list_array_crtp_base (self_type &&) noexcept=default
 
constexpr list_array_crtp_baseoperator= (self_type &&) noexcept=default
 
 list_array_crtp_base (arrow_proxy proxy)
 Constructs list array base from Arrow proxy.
 
constexpr list_array_crtp_base (const self_type &)
 Copy constructor.
 
constexpr list_array_crtp_base (self_type &&) noexcept=default
 
constexpr list_array_crtp_baseoperator= (const self_type &)
 Copy assignment operator.
 
constexpr list_array_crtp_baseoperator= (self_type &&) noexcept=default
 
- Protected Member Functions inherited from sparrow::array_bitmap_base_impl< D, false >
 array_bitmap_base_impl (arrow_proxy proxy)
 Constructs array bitmap base from Arrow proxy.
 
constexpr array_bitmap_base_impl (const array_bitmap_base_impl &)
 Copy constructor.
 
constexpr array_bitmap_base_imploperator= (const array_bitmap_base_impl &)
 Copy assignment operator.
 
constexpr array_bitmap_base_impl (array_bitmap_base_impl &&) noexcept=default
 
constexpr array_bitmap_base_imploperator= (array_bitmap_base_impl &&) noexcept=default
 
constexpr bitmap_typeget_bitmap ()
 Gets mutable reference to the validity bitmap.
 
constexpr const bitmap_typeget_bitmap () const
 Gets const reference to the validity bitmap.
 
constexpr void resize_bitmap (size_type new_length, bool value)
 Resizes the validity bitmap to accommodate new array length.
 
constexpr bitmap_iterator insert_bitmap (const_bitmap_iterator pos, bool value, size_type count)
 Inserts validity bits at specified position.
 
constexpr bitmap_iterator insert_bitmap (const_bitmap_iterator pos, InputIt first, InputIt last) is_mutable
 Inserts range of validity bits at specified position.
 
constexpr bitmap_iterator erase_bitmap (const_bitmap_iterator pos, size_type count)
 Erases validity bits starting at specified position.
 
constexpr void update ()
 Updates internal bitmap after external modifications to Arrow data.
 
constexpr non_owning_dynamic_bitset< uint8_t > get_non_owning_dynamic_bitset ()
 Gets non-owning view of the bitmap as dynamic bitset.
 
constexpr bitmap_type make_bitmap ()
 Creates bitmap wrapper from current Arrow validity buffer.
 
 array_bitmap_base_impl (arrow_proxy proxy)
 Constructs array bitmap base from Arrow proxy.
 
constexpr array_bitmap_base_impl (const array_bitmap_base_impl &)
 Copy constructor.
 
constexpr array_bitmap_base_impl (array_bitmap_base_impl &&) noexcept=default
 
constexpr array_bitmap_base_imploperator= (const array_bitmap_base_impl &)
 Copy assignment operator.
 
constexpr array_bitmap_base_imploperator= (array_bitmap_base_impl &&) noexcept=default
 
constexpr bitmap_typeget_bitmap ()
 Gets mutable reference to the validity bitmap.
 
constexpr const bitmap_typeget_bitmap () const
 Gets const reference to the validity bitmap.
 
constexpr void resize_bitmap (size_type new_length, bool value)
 Resizes the validity bitmap to accommodate new array length.
 
constexpr bitmap_iterator insert_bitmap (const_bitmap_iterator pos, bool value, size_type count)
 Inserts validity bits at specified position.
 
constexpr bitmap_iterator insert_bitmap (const_bitmap_iterator pos, InputIt first, InputIt last) is_mutable
 Inserts range of validity bits at specified position.
 
constexpr bitmap_iterator erase_bitmap (const_bitmap_iterator pos, size_type count)
 Erases validity bits starting at specified position.
 
constexpr void update ()
 Updates internal bitmap after external modifications to Arrow data.
 
constexpr non_owning_dynamic_bitset< uint8_t > get_non_owning_dynamic_bitset ()
 Gets non-owning view of the bitmap as dynamic bitset.
 
constexpr bitmap_type make_bitmap ()
 Creates bitmap wrapper from current Arrow validity buffer.
 

Detailed Description

template<bool BIG>
class sparrow::list_array_impl< BIG >

Definition at line 329 of file list_array.hpp.

Member Typedef Documentation

◆ base_type

template<bool BIG>
using sparrow::list_array_impl< BIG >::base_type = list_array_crtp_base<list_array_impl<BIG>>

Definition at line 335 of file list_array.hpp.

◆ inner_types

template<bool BIG>
using sparrow::list_array_impl< BIG >::inner_types = array_inner_types<self_type>

Definition at line 334 of file list_array.hpp.

◆ list_size_type

template<bool BIG>
using sparrow::list_array_impl< BIG >::list_size_type = inner_types::list_size_type

Definition at line 336 of file list_array.hpp.

◆ offset_buffer_type

template<bool BIG>
using sparrow::list_array_impl< BIG >::offset_buffer_type = u8_buffer<std::remove_const_t<offset_type>>

Definition at line 339 of file list_array.hpp.

◆ offset_type

template<bool BIG>
using sparrow::list_array_impl< BIG >::offset_type = std::conditional_t<BIG, const std::int64_t, const std::int32_t>

Definition at line 338 of file list_array.hpp.

◆ self_type

template<bool BIG>
using sparrow::list_array_impl< BIG >::self_type = list_array_impl<BIG>

Definition at line 333 of file list_array.hpp.

◆ size_type

template<bool BIG>
using sparrow::list_array_impl< BIG >::size_type = typename base_type::size_type

Definition at line 337 of file list_array.hpp.

Constructor & Destructor Documentation

◆ list_array_impl() [1/4]

template<bool BIG>
sparrow::list_array_impl< BIG >::list_array_impl ( arrow_proxy proxy)
explicit

Constructs list array from Arrow proxy.

Parameters
proxyArrow proxy containing list array data and schema
Precondition
proxy must contain valid Arrow List or Large List array and schema
proxy format must match BIG template parameter
proxy must have offset buffer at index 1
Postcondition
Array is initialized with data from proxy
Offset pointers are set up for efficient access

Definition at line 972 of file list_array.hpp.

◆ list_array_impl() [2/4]

template<bool BIG>
sparrow::list_array_impl< BIG >::list_array_impl ( const self_type & rhs)
constexpr

Copy constructor.

Parameters
rhsSource array to copy from
Precondition
rhs must be in a valid state
Postcondition
This array contains a deep copy of rhs data
Offset pointers are recalculated for the new data

Definition at line 1093 of file list_array.hpp.

◆ list_array_impl() [3/4]

template<bool BIG>
sparrow::list_array_impl< BIG >::list_array_impl ( self_type && )
constexprdefaultnoexcept

◆ list_array_impl() [4/4]

template<bool BIG>
template<class... ARGS>
requires (mpl::excludes_copy_and_move_ctor_v<list_array_impl<BIG>, ARGS...>)
sparrow::list_array_impl< BIG >::list_array_impl ( ARGS &&... args)
inlineexplicit

Generic constructor for creating list array from various inputs.

Template Parameters
ARGSParameter pack for constructor arguments
Parameters
argsConstructor arguments (flat_values, offsets, validity, etc.)
Precondition
First argument must be a valid array for flat values
Second argument must be offset buffer or range convertible to offsets
If validity is provided, it must match the number of lists
Postcondition
Array is created with the specified data and configuration

Definition at line 394 of file list_array.hpp.

Member Function Documentation

◆ offset_from_sizes()

template<bool BIG>
template<std::ranges::range SIZES_RANGE>
auto sparrow::list_array_impl< BIG >::offset_from_sizes ( SIZES_RANGE && sizes) -> offset_buffer_type
staticnodiscardconstexpr

Creates offset buffer from list sizes.

Converts a range of list sizes into cumulative offsets. The resulting offset buffer has size = sizes.size() + 1, with the first element being 0 and subsequent elements being cumulative sums.

Template Parameters
SIZES_RANGEType of input range containing list sizes
Parameters
sizesRange of list sizes
Returns
Offset buffer suitable for list array construction
Precondition
sizes must be a valid range of non-negative integers
All sizes must fit within the offset_type range
Postcondition
Returned buffer has size = sizes.size() + 1
First offset is 0, last offset is sum of all sizes
Each offset[i+1] = offset[i] + sizes[i]

Definition at line 980 of file list_array.hpp.

Here is the call graph for this function:

◆ operator=() [1/2]

template<bool BIG>
auto sparrow::list_array_impl< BIG >::operator= ( const self_type & rhs)
constexpr

Copy assignment operator.

Parameters
rhsSource array to copy from
Returns
Reference to this array
Precondition
rhs must be in a valid state
Postcondition
This array contains a deep copy of rhs data
Previous data is properly released
Offset pointers are recalculated for the new data

Definition at line 1100 of file list_array.hpp.

Here is the call graph for this function:

◆ operator=() [2/2]

template<bool BIG>
list_array_impl & sparrow::list_array_impl< BIG >::operator= ( self_type && )
constexprdefaultnoexcept

Friends And Related Symbol Documentation

◆ array_crtp_base< self_type >

template<bool BIG>
friend class array_crtp_base< self_type >
friend

Definition at line 531 of file list_array.hpp.

◆ list_array_crtp_base< self_type >

template<bool BIG>
friend class list_array_crtp_base< self_type >
friend

Definition at line 531 of file list_array.hpp.


The documentation for this class was generated from the following file: