|
sparrow 2.2.0
C++20 idiomatic APIs for the Apache Arrow Columnar Format
|
Forward declaration of dictionary_encoded_array. More...
#include <dictionary_encoded_array.hpp>
Public Types | |
| using | self_type = dictionary_encoded_array<IT> |
| using | size_type = std::size_t |
| using | difference_type = std::ptrdiff_t |
| using | inner_value_type = array_traits::inner_value_type |
| using | value_type = array_traits::value_type |
| using | reference = array_traits::const_reference |
| using | const_reference = array_traits::const_reference |
| using | functor_type = layout_element_functor<self_type, true> |
| using | const_functor_type = layout_element_functor<self_type, true> |
| using | iterator = functor_index_iterator<functor_type> |
| using | reverse_iterator = std::reverse_iterator<iterator> |
| using | const_iterator = functor_index_iterator<const_functor_type> |
| using | const_reverse_iterator = std::reverse_iterator<const_iterator> |
| using | keys_buffer_type = u8_buffer<IT> |
Public Member Functions | |
| dictionary_encoded_array (arrow_proxy proxy) | |
| Constructs a dictionary encoded array from an arrow proxy. | |
| constexpr | dictionary_encoded_array (const self_type &other) |
| Copy constructor. | |
| constexpr self_type & | operator= (const self_type &other) |
| Copy assignment operator. | |
| constexpr | dictionary_encoded_array (self_type &&other) |
| Move constructor. | |
| constexpr self_type & | operator= (self_type &&other) |
| Move assignment operator. | |
| constexpr std::optional< std::string_view > | name () const |
| Gets the name of the array. | |
| std::optional< key_value_view > | metadata () const |
| Gets the metadata of the array. | |
| constexpr size_type | size () const |
| Gets the number of elements in the array. | |
| constexpr bool | empty () const |
| Checks if the array is empty. | |
| SPARROW_CONSTEXPR_CLANG const_reference | operator[] (size_type i) const |
| Access operator for getting element at index. | |
| constexpr iterator | begin () |
| Gets an iterator to the beginning of the array. | |
| constexpr iterator | end () |
| Gets an iterator to the end of the array. | |
| constexpr const_iterator | begin () const |
| Gets a constant iterator to the beginning of the array. | |
| constexpr const_iterator | end () const |
| Gets a constant iterator to the end of the array. | |
| constexpr const_iterator | cbegin () const |
| Gets a constant iterator to the beginning of the array. | |
| constexpr const_iterator | cend () const |
| Gets a constant iterator to the end of the array. | |
| constexpr reverse_iterator | rbegin () |
| Gets a reverse iterator to the beginning of the array. | |
| constexpr reverse_iterator | rend () |
| Gets a reverse iterator to the end of the array. | |
| constexpr const_reverse_iterator | rbegin () const |
| Gets a constant reverse iterator to the beginning of the array. | |
| constexpr const_reverse_iterator | rend () const |
| Gets a constant reverse iterator to the end of the array. | |
| constexpr const_reverse_iterator | crbegin () const |
| Gets a constant reverse iterator to the beginning of the array. | |
| constexpr const_reverse_iterator | crend () const |
| Gets a constant reverse iterator to the end of the array. | |
| SPARROW_CONSTEXPR_CLANG const_reference | front () const |
| Gets a reference to the first element. | |
| SPARROW_CONSTEXPR_CLANG const_reference | back () const |
| Gets a reference to the last element. | |
| template<class... Args> requires (mpl::excludes_copy_and_move_ctor_v<dictionary_encoded_array<IT>, Args...>) | |
| dictionary_encoded_array (Args &&... args) | |
| Constructs a dictionary encoded array with the given arguments. | |
| constexpr self_type | slice (size_type start, size_type end) const |
Slices the array to keep only the elements between the given start and end. | |
| constexpr self_type | slice_view (size_type start, size_type end) const |
Slices the array to keep only the elements between the given start and end. | |
| template<validity_bitmap_input VBI, input_metadata_container METADATA_RANGE> | |
| auto | create_proxy (keys_buffer_type &&keys, array &&values, VBI &&validity_input, std::optional< std::string_view > name, std::optional< METADATA_RANGE > metadata) -> arrow_proxy |
| template<input_metadata_container METADATA_RANGE> | |
| arrow_proxy | create_proxy_impl (keys_buffer_type &&keys, array &&values, std::optional< validity_bitmap > validity, std::optional< std::string_view > name, std::optional< METADATA_RANGE > metadata) |
Friends | |
| class | detail::array_access |
Forward declaration of dictionary_encoded_array.
Dictionary encoded array class.
| IT | The integral type used for dictionary keys. |
Dictionary encoding is a data representation technique to represent values by integers referencing a dictionary usually consisting of unique values. It can be effective when you have data with many repeated values. Related Apache Arrow specification: https://arrow.apache.org/docs/dev/format/Columnar.html#dictionary-encoded-layout
| IT | The integral type used for dictionary keys. |
Definition at line 149 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::const_functor_type = layout_element_functor<self_type, true> |
Definition at line 164 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::const_iterator = functor_index_iterator<const_functor_type> |
Definition at line 168 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::const_reference = array_traits::const_reference |
Definition at line 161 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 169 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::difference_type = std::ptrdiff_t |
Definition at line 155 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::functor_type = layout_element_functor<self_type, true> |
Definition at line 163 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::inner_value_type = array_traits::inner_value_type |
Definition at line 157 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::iterator = functor_index_iterator<functor_type> |
Definition at line 166 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::keys_buffer_type = u8_buffer<IT> |
Definition at line 171 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::reference = array_traits::const_reference |
Definition at line 160 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::reverse_iterator = std::reverse_iterator<iterator> |
Definition at line 167 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::self_type = dictionary_encoded_array<IT> |
Definition at line 153 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::size_type = std::size_t |
Definition at line 154 of file dictionary_encoded_array.hpp.
| using sparrow::dictionary_encoded_array< IT >::value_type = array_traits::value_type |
Definition at line 159 of file dictionary_encoded_array.hpp.
|
explicit |
Constructs a dictionary encoded array from an arrow proxy.
| proxy | The arrow proxy containing the array data and schema. |
Definition at line 580 of file dictionary_encoded_array.hpp.
|
constexpr |
Copy constructor.
| other | The dictionary_encoded_array to copy from. |
Definition at line 589 of file dictionary_encoded_array.hpp.
|
constexpr |
Move constructor.
| other | The dictionary_encoded_array to move from. |
Definition at line 609 of file dictionary_encoded_array.hpp.
|
inlineexplicit |
Constructs a dictionary encoded array with the given arguments.
| Args | The argument types. |
| args | Arguments forwarded to create_proxy. |
Definition at line 352 of file dictionary_encoded_array.hpp.
|
nodiscard |
Gets a reference to the last element.
Definition at line 876 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets an iterator to the beginning of the array.
Definition at line 797 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets a constant iterator to the beginning of the array.
Definition at line 809 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets a constant iterator to the beginning of the array.
Definition at line 821 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets a constant iterator to the end of the array.
Definition at line 827 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets a constant reverse iterator to the beginning of the array.
Definition at line 857 of file dictionary_encoded_array.hpp.
| auto sparrow::dictionary_encoded_array< IT >::create_proxy | ( | keys_buffer_type && | keys, |
| array && | values, | ||
| VBI && | validity_input, | ||
| std::optional< std::string_view > | name, | ||
| std::optional< METADATA_RANGE > | metadata ) -> arrow_proxy |
Definition at line 631 of file dictionary_encoded_array.hpp.
|
nodiscard |
Definition at line 673 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets a constant reverse iterator to the end of the array.
Definition at line 863 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Checks if the array is empty.
Definition at line 774 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets an iterator to the end of the array.
Definition at line 803 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets a constant iterator to the end of the array.
Definition at line 815 of file dictionary_encoded_array.hpp.
|
nodiscard |
Gets a reference to the first element.
Definition at line 869 of file dictionary_encoded_array.hpp.
|
nodiscard |
Gets the metadata of the array.
Definition at line 762 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets the name of the array.
Definition at line 756 of file dictionary_encoded_array.hpp.
|
constexpr |
Copy assignment operator.
| other | The dictionary_encoded_array to copy from. |
Definition at line 597 of file dictionary_encoded_array.hpp.
|
constexpr |
Move assignment operator.
| other | The dictionary_encoded_array to move from. |
Definition at line 617 of file dictionary_encoded_array.hpp.
|
nodiscard |
Access operator for getting element at index.
| i | The index of the element to access. |
Definition at line 780 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets a reverse iterator to the beginning of the array.
Definition at line 833 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets a constant reverse iterator to the beginning of the array.
Definition at line 845 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets a reverse iterator to the end of the array.
Definition at line 839 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets a constant reverse iterator to the end of the array.
Definition at line 851 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Gets the number of elements in the array.
Definition at line 768 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Slices the array to keep only the elements between the given start and end.
A copy of the Array is modified. The data is not modified, only the ArrowArray.offset and ArrowArray.length are updated. If end is greater than the size of the buffers, the following elements will be invalid.
| start | The index of the first element to keep. Must be less than end. |
| end | The index of the first element to discard. Must be less than the size of the buffers. |
Definition at line 890 of file dictionary_encoded_array.hpp.
|
nodiscardconstexpr |
Slices the array to keep only the elements between the given start and end.
A view of the Array is returned. The data is not modified, only the ArrowArray.offset and ArrowArray.length are updated. If end is greater than the size of the buffers, the following elements will be invalid.
| start | The index of the first element to keep. Must be less than end. |
| end | The index of the first element to discard. Must be less than the size of the buffers. |
Definition at line 897 of file dictionary_encoded_array.hpp.
|
friend |
Definition at line 561 of file dictionary_encoded_array.hpp.