sparrow ..
Loading...
Searching...
No Matches
sparrow::decimal_array< T > Class Template Reference

Array implementation for decimal types. More...

#include <decimal_array.hpp>

Inheritance diagram for sparrow::decimal_array< T >:
[legend]
Collaboration diagram for sparrow::decimal_array< T >:
[legend]

Public Types

using self_type = decimal_array<T>
 
using base_type = mutable_array_bitmap_base<self_type>
 
using inner_types = array_inner_types<self_type>
 
using inner_value_type = typename inner_types::inner_value_type
 
using inner_reference = typename inner_types::inner_reference
 
using inner_const_reference = typename inner_types::inner_const_reference
 
using storage_type = typename T::integer_type
 
using bitmap_type = typename base_type::bitmap_type
 
using bitmap_const_reference = typename base_type::bitmap_const_reference
 
using const_bitmap_iterator = typename base_type::const_bitmap_iterator
 
using const_bitmap_range = typename base_type::const_bitmap_range
 
using value_type = nullable<inner_value_type>
 
using const_reference = nullable<inner_const_reference, bitmap_const_reference>
 
using size_type = typename base_type::size_type
 
using difference_type = typename base_type::difference_type
 
using iterator_tag = typename base_type::iterator_tag
 
using value_iterator = typename inner_types::value_iterator
 
using const_value_iterator = typename inner_types::const_value_iterator
 
- Public Types inherited from sparrow::array_bitmap_base_impl< D, true >
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

 decimal_array (arrow_proxy proxy)
 Constructs a decimal array from an arrow proxy.
 
template<class... Args>
requires (mpl::excludes_copy_and_move_ctor_v<decimal_array<T>, Args...>)
 decimal_array (Args &&... args)
 Constructs a decimal array with the given arguments.
 
constexpr inner_reference value (size_type i)
 Gets a mutable reference to the value at the specified index.
 
constexpr inner_const_reference value (size_type i) const
 Gets a constant reference to the value at the specified index.
 
template<std::ranges::input_range VALUE_RANGE, validity_bitmap_input VALIDITY_RANGE, input_metadata_container METADATA_RANGE>
requires std::convertible_to<std::ranges::range_value_t<VALUE_RANGE>, typename T::integer_type>
arrow_proxy create_proxy (VALUE_RANGE &&range, VALIDITY_RANGE &&bitmaps, std::size_t precision, int scale, std::optional< std::string_view > name, std::optional< METADATA_RANGE > metadata)
 
template<std::ranges::input_range NULLABLE_VALUE_RANGE, input_metadata_container METADATA_RANGE>
requires std::is_same_v<std::ranges::range_value_t<NULLABLE_VALUE_RANGE>, nullable<typename T::integer_type>>
arrow_proxy create_proxy (NULLABLE_VALUE_RANGE &&range, std::size_t precision, int scale, std::optional< std::string_view > name, std::optional< METADATA_RANGE > metadata)
 
template<std::ranges::input_range VALUE_RANGE, input_metadata_container METADATA_RANGE>
requires std::is_same_v<std::ranges::range_value_t<VALUE_RANGE>, typename T::integer_type>
arrow_proxy create_proxy (VALUE_RANGE &&range, std::size_t precision, int scale, bool nullable, std::optional< std::string_view > name, std::optional< METADATA_RANGE > metadata)
 
- Public Member Functions inherited from sparrow::array_bitmap_base_impl< D, true >
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 detail::layout_value_functor< self_type, inner_value_type >
 
class detail::layout_value_functor< const self_type, inner_value_type >
 
class decimal_reference< self_type >
 

Additional Inherited Members

- Protected Member Functions inherited from sparrow::array_bitmap_base_impl< D, true >
 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<decimal_type T>
class sparrow::decimal_array< T >

Array implementation for decimal types.

Array implementation for decimal types with fixed precision and scale.

Template Parameters
TThe decimal type (e.g., decimal<int32_t>, decimal<int64_t>, etc.).

This class provides a container for decimal values with a specified precision and scale, stored as integer values with an associated scaling factor.

Template Parameters
TThe decimal type, must satisfy the decimal_type concept.

Definition at line 153 of file decimal_array.hpp.

Member Typedef Documentation

◆ base_type

template<decimal_type T>
using sparrow::decimal_array< T >::base_type = mutable_array_bitmap_base<self_type>

Definition at line 158 of file decimal_array.hpp.

◆ bitmap_const_reference

template<decimal_type T>
using sparrow::decimal_array< T >::bitmap_const_reference = typename base_type::bitmap_const_reference

Definition at line 174 of file decimal_array.hpp.

◆ bitmap_type

template<decimal_type T>
using sparrow::decimal_array< T >::bitmap_type = typename base_type::bitmap_type

Definition at line 173 of file decimal_array.hpp.

◆ const_bitmap_iterator

template<decimal_type T>
using sparrow::decimal_array< T >::const_bitmap_iterator = typename base_type::const_bitmap_iterator

Definition at line 175 of file decimal_array.hpp.

◆ const_bitmap_range

template<decimal_type T>
using sparrow::decimal_array< T >::const_bitmap_range = typename base_type::const_bitmap_range

Definition at line 176 of file decimal_array.hpp.

◆ const_reference

template<decimal_type T>
using sparrow::decimal_array< T >::const_reference = nullable<inner_const_reference, bitmap_const_reference>

Definition at line 179 of file decimal_array.hpp.

◆ const_value_iterator

template<decimal_type T>
using sparrow::decimal_array< T >::const_value_iterator = typename inner_types::const_value_iterator

Definition at line 186 of file decimal_array.hpp.

◆ difference_type

template<decimal_type T>
using sparrow::decimal_array< T >::difference_type = typename base_type::difference_type

Definition at line 182 of file decimal_array.hpp.

◆ inner_const_reference

template<decimal_type T>
using sparrow::decimal_array< T >::inner_const_reference = typename inner_types::inner_const_reference

Definition at line 163 of file decimal_array.hpp.

◆ inner_reference

template<decimal_type T>
using sparrow::decimal_array< T >::inner_reference = typename inner_types::inner_reference

Definition at line 162 of file decimal_array.hpp.

◆ inner_types

template<decimal_type T>
using sparrow::decimal_array< T >::inner_types = array_inner_types<self_type>

Definition at line 160 of file decimal_array.hpp.

◆ inner_value_type

template<decimal_type T>
using sparrow::decimal_array< T >::inner_value_type = typename inner_types::inner_value_type

Definition at line 161 of file decimal_array.hpp.

◆ iterator_tag

template<decimal_type T>
using sparrow::decimal_array< T >::iterator_tag = typename base_type::iterator_tag

Definition at line 183 of file decimal_array.hpp.

◆ self_type

template<decimal_type T>
using sparrow::decimal_array< T >::self_type = decimal_array<T>

Definition at line 157 of file decimal_array.hpp.

◆ size_type

template<decimal_type T>
using sparrow::decimal_array< T >::size_type = typename base_type::size_type

Definition at line 181 of file decimal_array.hpp.

◆ storage_type

template<decimal_type T>
using sparrow::decimal_array< T >::storage_type = typename T::integer_type

Definition at line 166 of file decimal_array.hpp.

◆ value_iterator

template<decimal_type T>
using sparrow::decimal_array< T >::value_iterator = typename inner_types::value_iterator

Definition at line 185 of file decimal_array.hpp.

◆ value_type

template<decimal_type T>
using sparrow::decimal_array< T >::value_type = nullable<inner_value_type>

Definition at line 178 of file decimal_array.hpp.

Constructor & Destructor Documentation

◆ decimal_array() [1/2]

template<decimal_type T>
sparrow::decimal_array< T >::decimal_array ( arrow_proxy proxy)
explicit

Constructs a decimal array from an arrow proxy.

Parameters
proxyThe arrow proxy containing the array data and schema.

Definition at line 436 of file decimal_array.hpp.

◆ decimal_array() [2/2]

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

Constructs a decimal array with the given arguments.

Template Parameters
ArgsThe argument types.
Parameters
argsArguments forwarded to create_proxy.

Definition at line 203 of file decimal_array.hpp.

Member Function Documentation

◆ create_proxy() [1/3]

template<decimal_type T>
template<std::ranges::input_range NULLABLE_VALUE_RANGE, input_metadata_container METADATA_RANGE>
requires std::is_same_v<std::ranges::range_value_t<NULLABLE_VALUE_RANGE>, nullable<typename T::integer_type>>
arrow_proxy sparrow::decimal_array< T >::create_proxy ( NULLABLE_VALUE_RANGE && range,
std::size_t precision,
int scale,
std::optional< std::string_view > name,
std::optional< METADATA_RANGE > metadata )

Definition at line 493 of file decimal_array.hpp.

◆ create_proxy() [2/3]

template<decimal_type T>
template<std::ranges::input_range VALUE_RANGE, input_metadata_container METADATA_RANGE>
requires std::is_same_v<std::ranges::range_value_t<VALUE_RANGE>, typename T::integer_type>
arrow_proxy sparrow::decimal_array< T >::create_proxy ( VALUE_RANGE && range,
std::size_t precision,
int scale,
bool nullable,
std::optional< std::string_view > name,
std::optional< METADATA_RANGE > metadata )

Definition at line 543 of file decimal_array.hpp.

◆ create_proxy() [3/3]

template<decimal_type T>
template<std::ranges::input_range VALUE_RANGE, validity_bitmap_input VALIDITY_RANGE, input_metadata_container METADATA_RANGE>
requires std::convertible_to<std::ranges::range_value_t<VALUE_RANGE>, typename T::integer_type>
arrow_proxy sparrow::decimal_array< T >::create_proxy ( VALUE_RANGE && range,
VALIDITY_RANGE && bitmaps,
std::size_t precision,
int scale,
std::optional< std::string_view > name,
std::optional< METADATA_RANGE > metadata )

Definition at line 468 of file decimal_array.hpp.

◆ value() [1/2]

template<decimal_type T>
auto sparrow::decimal_array< T >::value ( size_type i)
nodiscardconstexpr

Gets a mutable reference to the value at the specified index.

Parameters
iThe index of the element.
Returns
Mutable reference to the decimal value.

Definition at line 637 of file decimal_array.hpp.

◆ value() [2/2]

template<decimal_type T>
auto sparrow::decimal_array< T >::value ( size_type i) const
nodiscardconstexpr

Gets a constant reference to the value at the specified index.

Parameters
iThe index of the element.
Returns
Constant reference to the decimal value.

Definition at line 644 of file decimal_array.hpp.

Friends And Related Symbol Documentation

◆ decimal_reference< self_type >

template<decimal_type T>
friend class decimal_reference< self_type >
friend

Definition at line 420 of file decimal_array.hpp.

◆ detail::layout_value_functor< const self_type, inner_value_type >

template<decimal_type T>
friend class detail::layout_value_functor< const self_type, inner_value_type >
friend

Definition at line 420 of file decimal_array.hpp.

◆ detail::layout_value_functor< self_type, inner_value_type >

template<decimal_type T>
friend class detail::layout_value_functor< self_type, inner_value_type >
friend

Definition at line 420 of file decimal_array.hpp.


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