Arrow-encoded data of a column of components.
More...
#include <rerun/component_column.hpp>
|
| Error | to_c_ffi_struct (rr_component_column &out_component_batch) const |
| | To rerun C API component batch.
|
| |
|
|
std::shared_ptr< arrow::Array > | array |
| | Arrow-encoded list array of component batches.
|
| |
|
ComponentTypeHandle | component_type |
| | The type of the component instances in array.
|
| |
Arrow-encoded data of a column of components.
This is essentially an array of rerun::ComponentBatch with all batches continuously in a single array.
- See also
rerun::RecordingStream::send_columns
◆ from_loggable_with_lengths()
Creates a new component column from a collection of component instances.
Automatically registers the component type the first time this type is encountered.
- Parameters
-
| components | Continuous collection of components which is about to be partitioned. |
| lengths | The number of components in each run. for rerun::RecordingStream::send_columns, this specifies the number of components at each time point. The sum of the lengths must be equal to the number of components in the batch. |
| descriptor | Descriptor of the component type for this column. |
◆ from_loggable()
Creates a new component column from a collection of component instances where each run has a length of one.
When used with rerun::RecordingStream::send_columns, this is equivalent to from_loggable(components, std::vector{1, 1, ...}). I.e. there's a single component for each time point.
Automatically registers the component type the first time this type is encountered.
- Parameters
-
| components | Continuous collection of components which is about to be partitioned into runs of length one. |
| descriptor | Descriptor of the component type for this column. |
◆ from_batch_with_lengths()
Creates a new component batch partition from a batch and a collection of run lengths.
- Parameters
-
| batch | A batch of components which is about to be partitioned. |
| lengths | The number of components in each run. for rerun::RecordingStream::send_columns, this specifies the number of components at each time point. The sum of the lengths must be equal to the number of components in the batch. |
◆ from_batch_with_offsets() [1/2]
Creates a new component batch partition from a batch and a collection of component offsets.
- Parameters
-
| batch | A batch of components which is about to be partitioned. |
| offsets | An offset within batch for each array of components. The last offset is the total number of components in the batch. Meaning that this array has to be one element longer than the number of component runs. E.g. a PartitionedComponentBatch with a single component would have an offset array of [0, 1]. A ComponentColumn with 5 components divided into runs of length 2 and 3 |
◆ from_batch_with_offsets() [2/2]
Creates a new component batch partition from a batch and a shared Arrow offsets buffer.
The column shares ownership of the offsets buffer and the batch's values without copying them, and retains the batch's component type handle. Multiple columns can share the same offsets buffer.
- Parameters
-
| batch | A batch of components which is about to be partitioned. |
| offsets | A non-null buffer containing num_rows + 1 contiguous uint32_t offsets into batch. Offsets must start at zero, be nondecreasing, and end at the total number of components in the batch. Equal consecutive offsets produce an empty row. For example, five components divided into two rows of lengths two and three use [0, 2, 5]. The buffer must not be modified while any column uses it. |
| num_rows | The number of component runs (rows), one less than the number of offsets. |
The caller must supply valid Arrow list offsets; this method does not validate them.
◆ to_c_ffi_struct()
| Error rerun::ComponentColumn::to_c_ffi_struct |
( |
rr_component_column & |
out_component_batch | ) |
const |
To rerun C API component batch.
The resulting rr_component_column keeps the arrow::Array alive until it is released.
The documentation for this struct was generated from the following file: