sparrow 0.6.0
Loading...
Searching...
No Matches
sparrow::arrow_proxy Class Reference

Proxy class over ArrowArray and ArrowSchema. More...

#include <arrow_array_schema_proxy.hpp>

Public Member Functions

SPARROW_API arrow_proxy (ArrowArray &&array, ArrowSchema &&schema)
 Constructs an arrow_proxy which takes the ownership of the ArrowArray and ArrowSchema.
 
SPARROW_API arrow_proxy (ArrowArray &&array, ArrowSchema *schema)
 Constructs an arrow_proxy which takes the ownership of the ArrowArray and uses the provided ArrowSchema.
 
SPARROW_API arrow_proxy (ArrowArray *array, ArrowSchema *schema)
 Constructs an arrow_proxy which uses the provided ArrowArray and ArrowSchema.
 
SPARROW_API arrow_proxy (const arrow_proxy &)
 
SPARROW_API arrow_proxyoperator= (const arrow_proxy &)
 
SPARROW_API arrow_proxy (arrow_proxy &&)
 
SPARROW_API arrow_proxyoperator= (arrow_proxy &&)
 
SPARROW_API ~arrow_proxy ()
 
SPARROW_API const std::string_view format () const
 
SPARROW_API void set_format (const std::string_view format)
 Set the format according to the Arrow format specification: https://arrow.apache.org/docs/dev/format/CDataInterface.html#data-type-description-format-strings.
 
SPARROW_API enum data_type data_type () const
 
void SPARROW_API set_data_type (enum data_type data_type)
 Set the data type.
 
SPARROW_API std::optional< std::string_view > name () const
 
SPARROW_API void set_name (std::optional< std::string_view > name)
 Set the name of the ArrowSchema.
 
SPARROW_API std::optional< key_value_viewmetadata () const
 
template<input_metadata_container R>
void set_metadata (std::optional< R > metadata)
 Set the metadata of the ArrowSchema.
 
SPARROW_API std::unordered_set< ArrowFlagflags () const
 
SPARROW_API void set_flags (const std::unordered_set< ArrowFlag > &flags)
 Set the flags of the ArrowSchema.
 
SPARROW_API size_t length () const
 
SPARROW_API void set_length (size_t length)
 Set the length of the ArrowArray.
 
SPARROW_API int64_t null_count () const
 
SPARROW_API void set_null_count (int64_t null_count)
 Set the null count of the ArrowArray.
 
SPARROW_API size_t offset () const
 
SPARROW_API void set_offset (size_t offset)
 Set the offset of the ArrowArray.
 
SPARROW_API size_t n_buffers () const
 
SPARROW_API void set_n_buffers (size_t n_buffers)
 Set the number of buffers of the ArrowArray.
 
SPARROW_API size_t n_children () const
 
SPARROW_API const std::vector< sparrow::buffer_view< uint8_t > > & buffers () const
 
SPARROW_API std::vector< sparrow::buffer_view< uint8_t > > & buffers ()
 
SPARROW_API void set_buffer (size_t index, const buffer_view< uint8_t > &buffer)
 Set the buffer at the given index.
 
SPARROW_API void set_buffer (size_t index, buffer< uint8_t > &&buffer)
 Set the buffer at the given index.
 
SPARROW_API void resize_bitmap (size_t new_size, bool value=true)
 Resize the bitmap buffer of the ArrowArray.
 
SPARROW_API size_t insert_bitmap (size_t index, bool value, size_t count=1)
 Insert elements of the same value in the bitmap buffer at the given index.
 
template<std::ranges::input_range R>
size_t insert_bitmap (size_t index, const R &range)
 Insert several elements in the bitmap buffer at the given index.
 
SPARROW_API size_t erase_bitmap (size_t index, size_t count=1)
 Erase several elements in the bitmap buffer at the given index.
 
SPARROW_API void push_back_bitmap (bool value)
 Push a value at the end of the bitmap buffer.
 
SPARROW_API void pop_back_bitmap ()
 Pop a value at the end of the bitmap buffer.
 
template<std::ranges::input_range R>
requires std::same_as<std::ranges::range_value_t<R>, arrow_array_and_schema_pointers>
void add_children (const R &arrow_array_and_schema_pointers)
 Add children without taking their ownership.
 
template<std::ranges::input_range R>
requires std::same_as<std::ranges::range_value_t<R>, arrow_array_and_schema>
void add_children (R &&arrow_array_and_schemas)
 Add children and take their ownership.
 
SPARROW_API void add_child (ArrowArray *array, ArrowSchema *schema)
 Add a child without taking its ownership.
 
SPARROW_API void add_child (ArrowArray &&array, ArrowSchema &&schema)
 Add a child and takes its ownership.
 
SPARROW_API void pop_children (size_t n)
 Pop n children.
 
SPARROW_API void set_child (size_t index, ArrowArray *array, ArrowSchema *schema)
 Set the child at the given index.
 
SPARROW_API void set_child (size_t index, ArrowArray &&array, ArrowSchema &&schema)
 Set the child at the given index.
 
SPARROW_API const std::vector< arrow_proxy > & children () const
 
SPARROW_API std::vector< arrow_proxy > & children ()
 
SPARROW_API const std::unique_ptr< arrow_proxy > & dictionary () const
 
SPARROW_API std::unique_ptr< arrow_proxy > & dictionary ()
 
SPARROW_API void set_dictionary (ArrowArray *array, ArrowSchema *schema)
 Set the dictionary.It does not take the ownership on the ArrowArray and ArrowSchema passed by pointers.
 
SPARROW_API void set_dictionary (ArrowArray &&array_dictionary, ArrowSchema &&schema_dictionary)
 Set the dictionary.
 
SPARROW_API bool is_created_with_sparrow () const
 
SPARROW_API void * private_data () const
 
SPARROW_API arrow_proxy view () const
 get a non-owning view of the arrow_proxy.
 
SPARROW_API bool owns_array () const
 
SPARROW_API ArrowArray extract_array ()
 
SPARROW_API ArrowArrayarray ()
 
SPARROW_API const ArrowArrayarray () const
 
SPARROW_API bool owns_schema () const
 
SPARROW_API ArrowSchema extract_schema ()
 
SPARROW_API ArrowSchemaschema ()
 
SPARROW_API const ArrowSchemaschema () const
 
SPARROW_API arrow_schema_private_dataget_schema_private_data ()
 
SPARROW_API arrow_array_private_dataget_array_private_data ()
 
SPARROW_API arrow_proxy slice (size_t start, size_t end) const
 Slices the array to keep only the elements between the given start and end.
 
SPARROW_API arrow_proxy slice_view (size_t start, size_t end) const
 Slices the array to keep only the elements between the given start and end.
 
SPARROW_API void update_buffers ()
 Refresh the buffers views.
 

Detailed Description

Proxy class over ArrowArray and ArrowSchema.

It ease the use of ArrowArray and ArrowSchema by providing a more user-friendly interface. It can take ownership of the ArrowArray and ArrowSchema or use them as pointers. If the arrow_proxy takes ownership of the ArrowArray and ArrowSchema, they are released when the arrow_proxy is destroyed. Otherwise, the arrow_proxy does not release the ArrowArray and ArrowSchema.

Definition at line 72 of file arrow_array_schema_proxy.hpp.

Constructor & Destructor Documentation

◆ arrow_proxy() [1/5]

SPARROW_API sparrow::arrow_proxy::arrow_proxy ( ArrowArray && array,
ArrowSchema && schema )
explicit

Constructs an arrow_proxy which takes the ownership of the ArrowArray and ArrowSchema.

The array and schema are released when the arrow_proxy is destroyed.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ arrow_proxy() [2/5]

SPARROW_API sparrow::arrow_proxy::arrow_proxy ( ArrowArray && array,
ArrowSchema * schema )
explicit

Constructs an arrow_proxy which takes the ownership of the ArrowArray and uses the provided ArrowSchema.

The array is released when the arrow_proxy is destroyed. The schema is not released.

Here is the call graph for this function:

◆ arrow_proxy() [3/5]

SPARROW_API sparrow::arrow_proxy::arrow_proxy ( ArrowArray * array,
ArrowSchema * schema )
explicit

Constructs an arrow_proxy which uses the provided ArrowArray and ArrowSchema.

Neither the array nor the schema are released when the arrow_proxy is destroyed.

Here is the call graph for this function:

◆ arrow_proxy() [4/5]

SPARROW_API sparrow::arrow_proxy::arrow_proxy ( const arrow_proxy & )
Here is the call graph for this function:

◆ arrow_proxy() [5/5]

SPARROW_API sparrow::arrow_proxy::arrow_proxy ( arrow_proxy && )
Here is the call graph for this function:

◆ ~arrow_proxy()

SPARROW_API sparrow::arrow_proxy::~arrow_proxy ( )

Member Function Documentation

◆ add_child() [1/2]

SPARROW_API void sparrow::arrow_proxy::add_child ( ArrowArray && array,
ArrowSchema && schema )

Add a child and takes its ownership.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` or the `ArrowSchema` wrapped in this proxy were not created with sparrow.
Parameters
arrayThe ArrowArray to set as child.
schemaThe ArrowSchema to set as child.
Here is the call graph for this function:

◆ add_child() [2/2]

SPARROW_API void sparrow::arrow_proxy::add_child ( ArrowArray * array,
ArrowSchema * schema )

Add a child without taking its ownership.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` or the `ArrowSchema` wrapped in this proxy were not created with sparrow.
Parameters
arrayThe ArrowArray to set as child.
schemaThe ArrowSchema to set as child.
Here is the call graph for this function:

◆ add_children() [1/2]

template<std::ranges::input_range R>
requires std::same_as<std::ranges::range_value_t<R>, arrow_array_and_schema_pointers>
void sparrow::arrow_proxy::add_children ( const R & arrow_array_and_schema_pointers)

Add children without taking their ownership.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` or the `ArrowSchema` wrapped in this proxy were not created with sparrow.
Parameters
arrow_array_and_schema_pointersThe children to add.

Definition at line 463 of file arrow_array_schema_proxy.hpp.

Here is the call graph for this function:

◆ add_children() [2/2]

template<std::ranges::input_range R>
requires std::same_as<std::ranges::range_value_t<R>, arrow_array_and_schema>
void sparrow::arrow_proxy::add_children ( R && arrow_array_and_schemas)

Add children and take their ownership.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` or the `ArrowSchema` wrapped in this proxy were not created with sparrow.
Parameters
arrow_array_and_schemaThe children to add.

Definition at line 487 of file arrow_array_schema_proxy.hpp.

Here is the call graph for this function:

◆ array() [1/2]

SPARROW_API ArrowArray & sparrow::arrow_proxy::array ( )
nodiscard
Here is the caller graph for this function:

◆ array() [2/2]

SPARROW_API const ArrowArray & sparrow::arrow_proxy::array ( ) const
nodiscard

◆ buffers() [1/2]

SPARROW_API std::vector< sparrow::buffer_view< uint8_t > > & sparrow::arrow_proxy::buffers ( )
nodiscard

◆ buffers() [2/2]

SPARROW_API const std::vector< sparrow::buffer_view< uint8_t > > & sparrow::arrow_proxy::buffers ( ) const
nodiscard
Here is the caller graph for this function:

◆ children() [1/2]

SPARROW_API std::vector< arrow_proxy > & sparrow::arrow_proxy::children ( )
nodiscard

◆ children() [2/2]

SPARROW_API const std::vector< arrow_proxy > & sparrow::arrow_proxy::children ( ) const
nodiscard

◆ data_type()

SPARROW_API enum data_type sparrow::arrow_proxy::data_type ( ) const
nodiscard
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dictionary() [1/2]

SPARROW_API std::unique_ptr< arrow_proxy > & sparrow::arrow_proxy::dictionary ( )
nodiscard

◆ dictionary() [2/2]

SPARROW_API const std::unique_ptr< arrow_proxy > & sparrow::arrow_proxy::dictionary ( ) const
nodiscard

◆ erase_bitmap()

SPARROW_API size_t sparrow::arrow_proxy::erase_bitmap ( size_t index,
size_t count = 1 )

Erase several elements in the bitmap buffer at the given index.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` was not created with sparrow.
`arrow_proxy_exception`If the array format does not support a validity bitmap.
`std::out_of_range`If the index is greater than the length of the bitmap.
Parameters
indexThe index of the first value to erase. Must be less than the length of the bitmap.
countThe number of elements to erase. 1 by default.
Returns
The index of the first erased value.
Here is the caller graph for this function:

◆ extract_array()

SPARROW_API ArrowArray sparrow::arrow_proxy::extract_array ( )
nodiscard
Here is the caller graph for this function:

◆ extract_schema()

SPARROW_API ArrowSchema sparrow::arrow_proxy::extract_schema ( )
nodiscard
Here is the caller graph for this function:

◆ flags()

SPARROW_API std::unordered_set< ArrowFlag > sparrow::arrow_proxy::flags ( ) const
nodiscard
Here is the caller graph for this function:

◆ format()

SPARROW_API const std::string_view sparrow::arrow_proxy::format ( ) const
nodiscard
Here is the caller graph for this function:

◆ get_array_private_data()

SPARROW_API arrow_array_private_data * sparrow::arrow_proxy::get_array_private_data ( )
nodiscard
Here is the caller graph for this function:

◆ get_schema_private_data()

SPARROW_API arrow_schema_private_data * sparrow::arrow_proxy::get_schema_private_data ( )
nodiscard
Here is the caller graph for this function:

◆ insert_bitmap() [1/2]

SPARROW_API size_t sparrow::arrow_proxy::insert_bitmap ( size_t index,
bool value,
size_t count = 1 )

Insert elements of the same value in the bitmap buffer at the given index.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` was not created with sparrow.
`arrow_proxy_exception`If the array format does not support a validity bitmap.
`std::out_of_range`If the index is greater than the length of the bitmap.
Parameters
indexThe index where to insert the value. Must be less than the length of the bitmap.
valueThe value to insert.
countThe number of times to insert the value. 1 by default
Returns
The index of the first inserted value.
Here is the caller graph for this function:

◆ insert_bitmap() [2/2]

template<std::ranges::input_range R>
size_t sparrow::arrow_proxy::insert_bitmap ( size_t index,
const R & range )
inline

Insert several elements in the bitmap buffer at the given index.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` was not created with sparrow.
`arrow_proxy_exception`If the array format does not support a validity bitmap.
`std::out_of_range`If the index is greater than the length of the bitmap.
Parameters
indexThe index where to insert the values. Must be less than the length of the bitmap.
rangeThe range of values to insert.
Returns
The index of the first inserted value.

Definition at line 510 of file arrow_array_schema_proxy.hpp.

Here is the call graph for this function:

◆ is_created_with_sparrow()

SPARROW_API bool sparrow::arrow_proxy::is_created_with_sparrow ( ) const
nodiscard
Here is the caller graph for this function:

◆ length()

SPARROW_API size_t sparrow::arrow_proxy::length ( ) const
nodiscard
Here is the caller graph for this function:

◆ metadata()

SPARROW_API std::optional< key_value_view > sparrow::arrow_proxy::metadata ( ) const
nodiscard
Here is the caller graph for this function:

◆ n_buffers()

SPARROW_API size_t sparrow::arrow_proxy::n_buffers ( ) const
nodiscard
Here is the caller graph for this function:

◆ n_children()

SPARROW_API size_t sparrow::arrow_proxy::n_children ( ) const
nodiscard
Here is the caller graph for this function:

◆ name()

SPARROW_API std::optional< std::string_view > sparrow::arrow_proxy::name ( ) const
nodiscard
Here is the caller graph for this function:

◆ null_count()

SPARROW_API int64_t sparrow::arrow_proxy::null_count ( ) const
nodiscard
Here is the caller graph for this function:

◆ offset()

SPARROW_API size_t sparrow::arrow_proxy::offset ( ) const
nodiscard
Here is the caller graph for this function:

◆ operator=() [1/2]

SPARROW_API arrow_proxy & sparrow::arrow_proxy::operator= ( arrow_proxy && )
Here is the call graph for this function:

◆ operator=() [2/2]

SPARROW_API arrow_proxy & sparrow::arrow_proxy::operator= ( const arrow_proxy & )
Here is the call graph for this function:

◆ owns_array()

SPARROW_API bool sparrow::arrow_proxy::owns_array ( ) const
nodiscard
Here is the caller graph for this function:

◆ owns_schema()

SPARROW_API bool sparrow::arrow_proxy::owns_schema ( ) const
nodiscard
Here is the caller graph for this function:

◆ pop_back_bitmap()

SPARROW_API void sparrow::arrow_proxy::pop_back_bitmap ( )

Pop a value at the end of the bitmap buffer.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` was not created with sparrow.
`arrow_proxy_exception`If the array format does not support a validity bitmap.

◆ pop_children()

SPARROW_API void sparrow::arrow_proxy::pop_children ( size_t n)

Pop n children.

If the children were created by sparrow or are owned by the proxy, it will delete them.

Parameters
nThe number of children to pop.

◆ private_data()

SPARROW_API void * sparrow::arrow_proxy::private_data ( ) const
nodiscard
Here is the caller graph for this function:

◆ push_back_bitmap()

SPARROW_API void sparrow::arrow_proxy::push_back_bitmap ( bool value)

Push a value at the end of the bitmap buffer.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` was not created with sparrow.
`arrow_proxy_exception`If the array format does not support a validity bitmap.
Parameters
valueThe value to push.

◆ resize_bitmap()

SPARROW_API void sparrow::arrow_proxy::resize_bitmap ( size_t new_size,
bool value = true )

Resize the bitmap buffer of the ArrowArray.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` was not created with sparrow.
`arrow_proxy_exception`If the array format does not support a validity bitmap.
Parameters
new_sizeThe new size of the bitmap buffer.
valueThe value to set in the new elements. True by default.
Here is the caller graph for this function:

◆ schema() [1/2]

SPARROW_API ArrowSchema & sparrow::arrow_proxy::schema ( )
nodiscard
Here is the caller graph for this function:

◆ schema() [2/2]

SPARROW_API const ArrowSchema & sparrow::arrow_proxy::schema ( ) const
nodiscard

◆ set_buffer() [1/2]

SPARROW_API void sparrow::arrow_proxy::set_buffer ( size_t index,
buffer< uint8_t > && buffer )

Set the buffer at the given index.

You have to call the set_length method before calling this method to have the right sizes when calling buffers().

Exceptions
`arrow_proxy_exception`If the `ArrowArray` was not created with sparrow.
Parameters
indexThe index of the buffer to set.
bufferThe buffer to set.

◆ set_buffer() [2/2]

SPARROW_API void sparrow::arrow_proxy::set_buffer ( size_t index,
const buffer_view< uint8_t > & buffer )

Set the buffer at the given index.

You have to call the set_length method before calling this method to have the right sizes when calling buffers().

Exceptions
`arrow_proxy_exception`If the `ArrowArray` was not created with sparrow.
Parameters
indexThe index of the buffer to set.
bufferThe buffer to set.

◆ set_child() [1/2]

SPARROW_API void sparrow::arrow_proxy::set_child ( size_t index,
ArrowArray && array,
ArrowSchema && schema )

Set the child at the given index.

It takes the ownership on the ArrowArray andArrowSchema passed by rvalue referencess.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` or `ArrowSchema` wrapped in this proxy were not created with sparrow.
Parameters
indexThe index of the child to set.
arrayThe ArrowArray to set as child.
schemaThe ArrowSchema to set as child.
Here is the call graph for this function:

◆ set_child() [2/2]

SPARROW_API void sparrow::arrow_proxy::set_child ( size_t index,
ArrowArray * array,
ArrowSchema * schema )

Set the child at the given index.

It does not take the ownership on the ArrowArray and ArrowSchema passed by pointers.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` or the `ArrowSchema` wrapped in this proxy were not created with sparrow.
Parameters
indexThe index of the child to set.
arrayThe ArrowArray to set as child.
schemaThe ArrowSchema to set as child.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_data_type()

void SPARROW_API sparrow::arrow_proxy::set_data_type ( enum data_type data_type)

Set the data type.

It's a convenient way to set the format of the ArrowSchema.

Exceptions
`arrow_proxy_exception`If the `ArrowSchema` was not created with sparrow.
Parameters
data_typeThe data type to set.
Here is the call graph for this function:

◆ set_dictionary() [1/2]

SPARROW_API void sparrow::arrow_proxy::set_dictionary ( ArrowArray && array_dictionary,
ArrowSchema && schema_dictionary )

Set the dictionary.

It takes the ownership on the ArrowArray andArrowSchema passed by rvalue referencess.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` or `ArrowSchema` wrapped in this proxy were not created with sparrow.
Parameters
indexThe index of the child to set.
arrayThe ArrowArray to set as child.
schemaThe ArrowSchema to set as child.

◆ set_dictionary() [2/2]

SPARROW_API void sparrow::arrow_proxy::set_dictionary ( ArrowArray * array,
ArrowSchema * schema )

Set the dictionary.It does not take the ownership on the ArrowArray and ArrowSchema passed by pointers.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` or `ArrowSchema` were not created with sparrow.
Parameters
arrayThe ArrowArray to set as dictionary.
schemaThe ArrowSchema to set as dictionary.
Here is the call graph for this function:

◆ set_flags()

SPARROW_API void sparrow::arrow_proxy::set_flags ( const std::unordered_set< ArrowFlag > & flags)

Set the flags of the ArrowSchema.

Exceptions
`arrow_proxy_exception`If the `ArrowSchema` was not created with sparrow.
Parameters
flagsThe flags to set.
Here is the call graph for this function:

◆ set_format()

SPARROW_API void sparrow::arrow_proxy::set_format ( const std::string_view format)

Set the format according to the Arrow format specification: https://arrow.apache.org/docs/dev/format/CDataInterface.html#data-type-description-format-strings.

Exceptions
`arrow_proxy_exception`If the `ArrowSchema` was not created with sparrow.
Parameters
formatThe format to set.
Here is the call graph for this function:

◆ set_length()

SPARROW_API void sparrow::arrow_proxy::set_length ( size_t length)

Set the length of the ArrowArray.

This method does not resize the buffers of the ArrowArray. You have to change the length before replacing/resizing the buffers to have the right sizes when calling buffers().

Exceptions
`arrow_proxy_exception`If the `ArrowArray` was not created with sparrow.
Parameters
lengthThe length to set.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_metadata()

template<input_metadata_container R>
void sparrow::arrow_proxy::set_metadata ( std::optional< R > metadata)
inline

Set the metadata of the ArrowSchema.

Exceptions
`arrow_proxy_exception`If the `ArrowSchema` was not created with sparrow.
Parameters
metadataThe metadata to set.

Definition at line 130 of file arrow_array_schema_proxy.hpp.

Here is the call graph for this function:

◆ set_n_buffers()

SPARROW_API void sparrow::arrow_proxy::set_n_buffers ( size_t n_buffers)

Set the number of buffers of the ArrowArray.

Resize the buffers vector of the ArrowArray private data.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` was not created with sparrow.
Parameters
n_buffersThe number of buffers to set.
Here is the call graph for this function:

◆ set_name()

SPARROW_API void sparrow::arrow_proxy::set_name ( std::optional< std::string_view > name)

Set the name of the ArrowSchema.

Exceptions
`arrow_proxy_exception`If the `ArrowSchema` was not created with sparrow.
Parameters
nameThe name to set.
Here is the call graph for this function:

◆ set_null_count()

SPARROW_API void sparrow::arrow_proxy::set_null_count ( int64_t null_count)

Set the null count of the ArrowArray.

This method does not change the bitmap.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` was not created with sparrow.
Parameters
null_countThe null count to set.
Here is the call graph for this function:

◆ set_offset()

SPARROW_API void sparrow::arrow_proxy::set_offset ( size_t offset)

Set the offset of the ArrowArray.

Exceptions
`arrow_proxy_exception`If the `ArrowArray` was not created with sparrow.
Parameters
offsetThe offset to set.
Here is the call graph for this function:

◆ slice()

SPARROW_API arrow_proxy sparrow::arrow_proxy::slice ( size_t start,
size_t end ) const
nodiscard

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.

Parameters
startThe index of the first element to keep. Must be less than end.
endThe index of the first element to discard. Must be less than the size of the buffers.
Here is the call graph for this function:

◆ slice_view()

SPARROW_API arrow_proxy sparrow::arrow_proxy::slice_view ( size_t start,
size_t end ) const
nodiscard

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.

Parameters
startThe index of the first element to keep. Must be less than end.
endThe index of the first element to discard. Must be less than the size of the buffers.
Here is the call graph for this function:

◆ update_buffers()

SPARROW_API void sparrow::arrow_proxy::update_buffers ( )

Refresh the buffers views.

This method should be called after modifying the buffers of the array.

◆ view()

SPARROW_API arrow_proxy sparrow::arrow_proxy::view ( ) const
nodiscard

get a non-owning view of the arrow_proxy.

Here is the call graph for this function:

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