sparrow ..
Loading...
Searching...
No Matches
sparrow::struct_array Class Referencefinal

#include <struct_array.hpp>

Inheritance diagram for sparrow::struct_array:
[legend]
Collaboration diagram for sparrow::struct_array:
[legend]

Public Types

using self_type = struct_array
 
using base_type = array_bitmap_base<self_type>
 
using inner_types = array_inner_types<self_type>
 
using value_iterator = typename inner_types::value_iterator
 
using const_value_iterator = typename inner_types::const_value_iterator
 
using size_type = typename base_type::size_type
 
using bitmap_type = typename base_type::bitmap_type
 
using bitmap_const_reference = typename base_type::bitmap_const_reference
 
using const_bitmap_range = base_type::const_bitmap_range
 
using inner_value_type = struct_value
 
using inner_reference = struct_value
 
using inner_const_reference = struct_value
 
using value_type = nullable<inner_value_type>
 
using const_reference = nullable<inner_const_reference, bitmap_const_reference>
 
using iterator_tag = base_type::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

SPARROW_API struct_array (arrow_proxy proxy)
 Constructs struct array from Arrow proxy.
 
template<class... Args>
requires (mpl::excludes_copy_and_move_ctor_v<struct_array, Args...>)
 struct_array (Args &&... args)
 Generic constructor for creating struct array from various inputs.
 
SPARROW_API struct_array (const struct_array &rhs)
 Copy constructor.
 
SPARROW_API struct_arrayoperator= (const struct_array &rhs)
 Copy assignment operator.
 
 struct_array (struct_array &&)=default
 
struct_arrayoperator= (struct_array &&)=default
 
SPARROW_API size_type children_count () const
 Gets the number of child arrays (fields).
 
SPARROW_API const array_wrapperraw_child (std::size_t i) const
 Gets const pointer to child array at specified index.
 
SPARROW_API array_wrapperraw_child (std::size_t i)
 Gets mutable pointer to child array at specified index.
 
- 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
 

Friends

class array_crtp_base< self_type >
 
class detail::layout_value_functor< self_type, inner_value_type >
 
class detail::layout_value_functor< const self_type, inner_value_type >
 

Additional Inherited Members

- 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

Member Typedef Documentation

◆ base_type

◆ bitmap_const_reference

◆ bitmap_type

Definition at line 134 of file struct_array.hpp.

◆ const_bitmap_range

◆ const_reference

◆ const_value_iterator

using sparrow::struct_array::const_value_iterator = typename inner_types::const_value_iterator

◆ inner_const_reference

◆ inner_reference

◆ inner_types

◆ inner_value_type

◆ iterator_tag

◆ self_type

◆ size_type

Definition at line 132 of file struct_array.hpp.

◆ value_iterator

using sparrow::struct_array::value_iterator = typename inner_types::value_iterator

Definition at line 130 of file struct_array.hpp.

◆ value_type

Constructor & Destructor Documentation

◆ struct_array() [1/4]

SPARROW_API sparrow::struct_array::struct_array ( arrow_proxy proxy)
explicit

Constructs struct array from Arrow proxy.

Parameters
proxyArrow proxy containing struct array data and schema
Precondition
proxy must contain valid Arrow struct array and schema
proxy format must be "+s"
proxy must have child arrays with consistent lengths
Postcondition
Array is initialized with data from proxy
Child arrays are accessible via field access methods
Validity bitmap is properly initialized
Here is the call graph for this function:
Here is the caller graph for this function:

◆ struct_array() [2/4]

template<class... Args>
requires (mpl::excludes_copy_and_move_ctor_v<struct_array, Args...>)
sparrow::struct_array::struct_array ( Args &&... args)
inlineexplicit

Generic constructor for creating struct array from various inputs.

Creates a struct array from different input combinations. Arguments are forwarded to compatible create_proxy() functions based on their types.

Template Parameters
ArgsParameter pack for constructor arguments
Parameters
argsConstructor arguments (children, validity, metadata, etc.)
Precondition
Arguments must match one of the create_proxy() overload signatures
All child arrays must have the same length
Child array names must be unique (if specified)
Postcondition
Array is created with the specified children and configuration
Field access is available for all child arrays

Definition at line 178 of file struct_array.hpp.

◆ struct_array() [3/4]

SPARROW_API sparrow::struct_array::struct_array ( const struct_array & rhs)

Copy constructor.

Parameters
rhsSource struct array to copy from
Precondition
rhs must be in a valid state
Postcondition
This array contains a deep copy of rhs data
All child arrays are independently copied
Field structure and names are preserved
Here is the call graph for this function:

◆ struct_array() [4/4]

sparrow::struct_array::struct_array ( struct_array && )
default
Here is the call graph for this function:

Member Function Documentation

◆ children_count()

SPARROW_API size_type sparrow::struct_array::children_count ( ) const
nodiscard

Gets the number of child arrays (fields).

Returns
Number of fields in the struct
Postcondition
Returns non-negative count
Equals the number of distinct fields in the struct
Examples
/home/runner/work/sparrow/sparrow/include/sparrow/struct_array.hpp.

◆ operator=() [1/2]

SPARROW_API struct_array & sparrow::struct_array::operator= ( const struct_array & rhs)

Copy assignment operator.

Parameters
rhsSource struct 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
All child arrays are independently copied
Examples
/home/runner/work/sparrow/sparrow/include/sparrow/struct_array.hpp.
Here is the call graph for this function:

◆ operator=() [2/2]

struct_array & sparrow::struct_array::operator= ( struct_array && )
default
Here is the call graph for this function:

◆ raw_child() [1/2]

SPARROW_API array_wrapper * sparrow::struct_array::raw_child ( std::size_t i)
nodiscard

Gets mutable pointer to child array at specified index.

Parameters
iIndex of the child array
Returns
Pointer to the child array wrapper
Precondition
i must be < children_count()
Postcondition
Returns non-null pointer to valid array_wrapper
Modifications through pointer affect the struct array

◆ raw_child() [2/2]

SPARROW_API const array_wrapper * sparrow::struct_array::raw_child ( std::size_t i) const
nodiscard

Gets const pointer to child array at specified index.

Parameters
iIndex of the child array
Returns
Const pointer to the child array wrapper
Precondition
i must be < children_count()
Postcondition
Returns non-null pointer to valid array_wrapper
Pointer remains valid while struct array exists
Examples
/home/runner/work/sparrow/sparrow/include/sparrow/struct_array.hpp.

Friends And Related Symbol Documentation

◆ array_crtp_base< self_type >

friend class array_crtp_base< self_type >
friend

Definition at line 405 of file struct_array.hpp.

◆ detail::layout_value_functor< const self_type, inner_value_type >

Definition at line 405 of file struct_array.hpp.

◆ detail::layout_value_functor< self_type, inner_value_type >

Definition at line 405 of file struct_array.hpp.


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