sparrow 2.6.0
C++20 idiomatic APIs for the Apache Arrow Columnar Format
Loading...
Searching...
No Matches
sparrow::detail::union_rebuild Namespace Reference

Typedefs

using dynamic_value = array_traits::value_type
using rebuild_value = detail::union_rebuild_value
using union_rebuild_payload = detail::union_rebuild_payload

Functions

SPARROW_API array make_null_child (std::size_t count, const arrow_proxy &child_proxy)
std::size_t next_free_type_id (std::span< const bool > used_type_ids)
 Finds an existing type ID not yet assigned, or TYPE_ID_MAP_SIZE if none is free.
std::size_t child_of (const rebuild_value &value, std::span< const std::size_t > inserted_children)
 Resolves the child a plan entry targets: inserted values carry no child index, only the index of the value they insert.
array make_empty_child (const array_wrapper &child)
template<class T>
dynamic_value make_null_dynamic_value (const T &value)
 Builds a null dynamic value holding the type of the given inner value.
dynamic_value make_null_like (const dynamic_value &value)
 Creates a null-like dynamic value for the given dynamic value.
union_rebuild_payload make_dense_rebuild_payload (std::span< const rebuild_value > values, std::span< const std::size_t > inserted_children, std::span< const std::uint8_t > child_type_ids)
 Creates a rebuild payload for a dense union array.
union_rebuild_payload make_sparse_rebuild_payload (std::span< const rebuild_value > values, std::span< const std::size_t > inserted_children, std::span< const std::uint8_t > child_type_ids, std::span< const rebuild_value > fillers)
 Creates a rebuild payload for a sparse union array.
array make_filler_row (const array &old_child_view, std::size_t row)
 Slices the row a filler rebuild value refers to, marked as null.
void append_old_child_values (array &destination, const array &old_child_view, std::size_t first_row, std::size_t count)
 Appends count consecutive rows of an old child, in a single insertion.
template<typename CHILDREN>
void append_rebuild_values (array &destination, std::span< const rebuild_value > values, std::span< const dynamic_value > inserted, std::span< const std::size_t > inserted_children, const CHILDREN &old_children)
 Appends the rebuild rows of one child to destination.

Typedef Documentation

◆ dynamic_value

◆ rebuild_value

◆ union_rebuild_payload

Function Documentation

◆ append_old_child_values()

void sparrow::detail::union_rebuild::append_old_child_values ( array & destination,
const array & old_child_view,
std::size_t first_row,
std::size_t count )
inline

Appends count consecutive rows of an old child, in a single insertion.

Definition at line 1785 of file union_array.hpp.

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

◆ append_rebuild_values()

template<typename CHILDREN>
void sparrow::detail::union_rebuild::append_rebuild_values ( array & destination,
std::span< const rebuild_value > values,
std::span< const dynamic_value > inserted,
std::span< const std::size_t > inserted_children,
const CHILDREN & old_children )

Appends the rebuild rows of one child to destination.

Rows reading consecutive rows of the old child are appended with a single range insertion, and repeated rows (an inserted value inserted several times, or a filler row) with a single repeated insertion..

Definition at line 1799 of file union_array.hpp.

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

◆ child_of()

std::size_t sparrow::detail::union_rebuild::child_of ( const rebuild_value & value,
std::span< const std::size_t > inserted_children )
inline

Resolves the child a plan entry targets: inserted values carry no child index, only the index of the value they insert.

Definition at line 1633 of file union_array.hpp.

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

◆ make_dense_rebuild_payload()

union_rebuild_payload sparrow::detail::union_rebuild::make_dense_rebuild_payload ( std::span< const rebuild_value > values,
std::span< const std::size_t > inserted_children,
std::span< const std::uint8_t > child_type_ids )
inline

Creates a rebuild payload for a dense union array.

Parameters
valuesThe rows to be rebuilt.
inserted_childrenChild index of each inserted value, in insertion order.
child_type_idsThe type IDs of the child arrays.
Returns
A union_rebuild_payload containing the rebuilt data.

Definition at line 1690 of file union_array.hpp.

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

◆ make_empty_child()

array sparrow::detail::union_rebuild::make_empty_child ( const array_wrapper & child)
inline

Definition at line 1643 of file union_array.hpp.

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

◆ make_filler_row()

array sparrow::detail::union_rebuild::make_filler_row ( const array & old_child_view,
std::size_t row )
inline

Slices the row a filler rebuild value refers to, marked as null.

Bitmap-less children (e.g. a nested union) cannot hold a null in a single row: the row keeps its value, sparse-union filler rows being unspecified by the Arrow format.

Definition at line 1769 of file union_array.hpp.

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

◆ make_null_child()

SPARROW_API array sparrow::detail::union_rebuild::make_null_child ( std::size_t count,
const arrow_proxy & child_proxy )
nodiscard
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_null_dynamic_value()

template<class T>
dynamic_value sparrow::detail::union_rebuild::make_null_dynamic_value ( const T & value)

Builds a null dynamic value holding the type of the given inner value.

Template Parameters
TThe type of the inner value (nullable alternatives are unwrapped by the caller, e.g. via get()).
Parameters
valueAn inner value only used for its type.
Returns
A dynamic_value of the same type, in null state.

Definition at line 1657 of file union_array.hpp.

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

◆ make_null_like()

dynamic_value sparrow::detail::union_rebuild::make_null_like ( const dynamic_value & value)
inline

Creates a null-like dynamic value for the given dynamic value.

Parameters
valueThe dynamic value for which to create a null-like value.
Returns
A dynamic_value representing the null-like value.

Definition at line 1668 of file union_array.hpp.

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

◆ make_sparse_rebuild_payload()

union_rebuild_payload sparrow::detail::union_rebuild::make_sparse_rebuild_payload ( std::span< const rebuild_value > values,
std::span< const std::size_t > inserted_children,
std::span< const std::uint8_t > child_type_ids,
std::span< const rebuild_value > fillers )
inline

Creates a rebuild payload for a sparse union array.

Parameters
valuesThe rows to be rebuilt.
inserted_childrenChild index of each inserted value, in insertion order.
child_type_idsThe type IDs of the child arrays.
fillersThe row padding the non-selected output rows of each child.
Returns
A union_rebuild_payload containing the rebuilt data.

Definition at line 1733 of file union_array.hpp.

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

◆ next_free_type_id()

std::size_t sparrow::detail::union_rebuild::next_free_type_id ( std::span< const bool > used_type_ids)
inline

Finds an existing type ID not yet assigned, or TYPE_ID_MAP_SIZE if none is free.

Definition at line 1626 of file union_array.hpp.

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