diff --git a/crates/build/re_types_builder/src/codegen/cpp/mod.rs b/crates/build/re_types_builder/src/codegen/cpp/mod.rs index 9cc8a4fe6cf3..ee8ae817e159 100644 --- a/crates/build/re_types_builder/src/codegen/cpp/mod.rs +++ b/crates/build/re_types_builder/src/codegen/cpp/mod.rs @@ -641,7 +641,7 @@ impl QuotedObject { Partitions the component data into multiple sub-batches. Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - instead, via `ComponentColumn::from_batch_with_lengths`. + instead, via `ComponentBatch::partitioned`. This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. @@ -659,9 +659,7 @@ impl QuotedObject { let field_ident = field_name_ident(field); quote! { if (#field_ident.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths( - #field_ident.value(), lengths_ - ).value_or_throw()); + columns.push_back(#field_ident.value().partitioned(lengths_).value_or_throw()); } } }); diff --git a/docs/snippets/CMakeLists.txt b/docs/snippets/CMakeLists.txt index ee52cdd57556..d64a1660e10a 100644 --- a/docs/snippets/CMakeLists.txt +++ b/docs/snippets/CMakeLists.txt @@ -33,4 +33,10 @@ foreach(SOURCE_PATH ${sources_list}) endforeach() # `text_log_integration` uses `loguru` as the example text logging library. -target_link_libraries(text_log_integration PRIVATE rerun_sdk loguru::loguru) +target_link_libraries(text_log_integration PRIVATE loguru::loguru) + +# `any_values`-style examples use `arrow` directly. +target_link_libraries(any_batch_value_send_columns PRIVATE rerun_arrow_target) +target_link_libraries(any_values PRIVATE rerun_arrow_target) +target_link_libraries(any_values_send_columns PRIVATE rerun_arrow_target) +target_link_libraries(extra_values PRIVATE rerun_arrow_target) diff --git a/docs/snippets/INDEX.md b/docs/snippets/INDEX.md index 54c37146d714..d11ad8321694 100644 --- a/docs/snippets/INDEX.md +++ b/docs/snippets/INDEX.md @@ -22,14 +22,14 @@ Use it to quickly find copy-pastable snippets of code for any Rerun feature you' | ------- | ------- | ----------- | ------ | ---- | --- | | **Query dataframes** | `dataframe_query` | Query and display the first 10 rows of a recording | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/reference/dataframe_query.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/reference/dataframe_query.rs) | | | **Query dataframes** | `dataframe_view_query` | Query and display the first 10 rows of a recording in a dataframe view | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/reference/dataframe_view_query.py) | | | -| **Send columnar data** | `any_batch_value_send_columns` | Use `AnyBatchValue` and `send_column` to send an entire column of custom data to Rerun | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_batch_value_send_columns.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_batch_value_send_columns.rs) | | -| **Send columnar data** | `any_values_send_columns` | Use `AnyValues` and `send_column` to send entire columns of custom data to Rerun | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_values_send_columns.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_values_send_columns.rs) | | +| **Send columnar data** | `any_batch_value_send_columns` | Use `AnyBatchValue` and `send_column` to send an entire column of custom data to Rerun | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_batch_value_send_columns.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_batch_value_send_columns.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_batch_value_send_columns.cpp) | +| **Send columnar data** | `any_values_send_columns` | Use `AnyValues` and `send_column` to send entire columns of custom data to Rerun | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_values_send_columns.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_values_send_columns.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_values_send_columns.cpp) | | **Send columnar data** | `image_send_columns` | Send multiple images at once using `send_columns` | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/image_send_columns.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/image_send_columns.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/image_send_columns.cpp) | | **Send columnar data** | `points3d_send_columns` | Use the `send_columns` API to send several point clouds over time in a single call | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_send_columns.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_send_columns.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_send_columns.cpp) | | **Send columnar data** | `scalar_send_columns` | Use the `send_columns` API to send scalars over time in a single call | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/scalar_send_columns.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/scalar_send_columns.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/scalar_send_columns.cpp) | -| **Send custom data** | `any_values` | Log arbitrary data | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/any_values.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/any_values.rs) | | +| **Send custom data** | `any_values` | Log arbitrary data | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/any_values.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/any_values.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/any_values.cpp) | | **Send custom data** | `custom_data` | Shows how to implement custom archetypes and components | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/custom_data.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/custom_data.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/custom_data.cpp) | -| **Send custom data** | `extra_values` | Log extra values with a `Points2D` | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.rs) | | +| **Send custom data** | `extra_values` | Log extra values with a `Points2D` | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.cpp) | | **Send partial updates** | `mesh3d_partial_updates` | Log a simple colored triangle, then update its vertices' positions each frame | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/mesh3d_partial_updates.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/mesh3d_partial_updates.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/mesh3d_partial_updates.cpp) | | **Send partial updates** | `points3d_partial_updates` | Demonstrates usage of the new partial updates APIs | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.cpp) | | **Send partial updates** | `transform3d_partial_updates` | Log different transforms with visualized coordinates axes | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_partial_updates.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_partial_updates.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_partial_updates.cpp) | @@ -130,7 +130,7 @@ _All snippets, organized by the [`Archetype`](https://rerun.io/docs/reference/ty | **[`Points2D`](https://rerun.io/docs/reference/types/archetypes/points2d)** | `concepts⁠/⁠different_data_per_timeline` | Log different data on different timelines | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/different_data_per_timeline.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/different_data_per_timeline.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/different_data_per_timeline.cpp) | | **[`Points2D`](https://rerun.io/docs/reference/types/archetypes/points2d)** | `concepts⁠/⁠viscomp-visualizer-override` | Override a visualizer | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/viscomp-visualizer-override.py) | | | | **[`Points2D`](https://rerun.io/docs/reference/types/archetypes/points2d)** | `concepts⁠/⁠viscomp-visualizer-override-multiple` | Override a visualizer | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/viscomp-visualizer-override-multiple.py) | | | -| **[`Points2D`](https://rerun.io/docs/reference/types/archetypes/points2d)** | `tutorials⁠/⁠extra_values` | Log extra values with a `Points2D` | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.rs) | | +| **[`Points2D`](https://rerun.io/docs/reference/types/archetypes/points2d)** | `tutorials⁠/⁠extra_values` | Log extra values with a `Points2D` | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.cpp) | | **[`Points2D`](https://rerun.io/docs/reference/types/archetypes/points2d)** | `views⁠/⁠spatial2d` | Use a blueprint to customize a Spatial2DView | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/views/spatial2d.py) | | | | **[`Points3D`](https://rerun.io/docs/reference/types/archetypes/points3d)** | `archetypes⁠/⁠points3d_ui_radius` | Log some points with ui points & scene unit radii | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_ui_radius.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_ui_radius.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_ui_radius.cpp) | | **[`Points3D`](https://rerun.io/docs/reference/types/archetypes/points3d)** | `archetypes⁠/⁠points3d_simple` | Log some very simple points | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_simple.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_simple.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_simple.cpp) | @@ -222,7 +222,7 @@ _All snippets, organized by the [`View`](https://rerun.io/docs/reference/types/v | **[`Spatial2DView`](https://rerun.io/docs/reference/types/views/spatial2d_view)** | `concepts⁠/⁠viscomp-component-override` | Override a component | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/viscomp-component-override.py) | | | | **[`Spatial2DView`](https://rerun.io/docs/reference/types/views/spatial2d_view)** | `concepts⁠/⁠viscomp-visualizer-override` | Override a visualizer | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/viscomp-visualizer-override.py) | | | | **[`Spatial2DView`](https://rerun.io/docs/reference/types/views/spatial2d_view)** | `concepts⁠/⁠viscomp-visualizer-override-multiple` | Override a visualizer | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/viscomp-visualizer-override-multiple.py) | | | -| **[`Spatial2DView`](https://rerun.io/docs/reference/types/views/spatial2d_view)** | `tutorials⁠/⁠extra_values` | Log extra values with a `Points2D` | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.rs) | | +| **[`Spatial2DView`](https://rerun.io/docs/reference/types/views/spatial2d_view)** | `tutorials⁠/⁠extra_values` | Log extra values with a `Points2D` | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.cpp) | | **[`Spatial2DView`](https://rerun.io/docs/reference/types/views/spatial2d_view)** | `views⁠/⁠spatial2d` | Use a blueprint to customize a Spatial2DView | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/views/spatial2d.py) | | | | **[`Spatial3DView`](https://rerun.io/docs/reference/types/views/spatial3d_view)** | `archetypes⁠/⁠transform3d_hierarchy` | Logs a transforms transform hierarchy | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_hierarchy.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_hierarchy.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_hierarchy.cpp) | | **[`Spatial3DView`](https://rerun.io/docs/reference/types/views/spatial3d_view)** | `views⁠/⁠spatial3d` | Use a blueprint to customize a Spatial3DView | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/views/spatial3d.py) | | | @@ -258,6 +258,6 @@ _All snippets, organized by the blueprint-related [`Archetype`](https://rerun.io | **`VisualBounds2D`** | `archetypes⁠/⁠points2d_simple` | Log some very simple points | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points2d_simple.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points2d_simple.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points2d_simple.cpp) | | **`VisualBounds2D`** | `archetypes⁠/⁠points2d_ui_radius` | Log some points with ui points & scene unit radii | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points2d_ui_radius.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points2d_ui_radius.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points2d_ui_radius.cpp) | | **`VisualBounds2D`** | `concepts⁠/⁠different_data_per_timeline` | Log different data on different timelines | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/different_data_per_timeline.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/different_data_per_timeline.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/different_data_per_timeline.cpp) | -| **`VisualBounds2D`** | `tutorials⁠/⁠extra_values` | Log extra values with a `Points2D` | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.rs) | | +| **`VisualBounds2D`** | `tutorials⁠/⁠extra_values` | Log extra values with a `Points2D` | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.cpp) | | **`VisualBounds2D`** | `views⁠/⁠graph` | Use a blueprint to customize a graph view | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/views/graph.py) | | | | **`VisualBounds2D`** | `views⁠/⁠spatial2d` | Use a blueprint to customize a Spatial2DView | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/views/spatial2d.py) | | | diff --git a/docs/snippets/all/howto/any_batch_value_send_columns.cpp b/docs/snippets/all/howto/any_batch_value_send_columns.cpp new file mode 100644 index 000000000000..f90f61d6fafd --- /dev/null +++ b/docs/snippets/all/howto/any_batch_value_send_columns.cpp @@ -0,0 +1,56 @@ +// Use `send_column` to send an entire column of custom data to Rerun. + +#include + +#include +#include +#include +#include + +arrow::Status run_main() { + const auto rec = rerun::RecordingStream("rerun_example_any_batch_value_send_columns"); + rec.spawn().exit_on_failure(); + + constexpr int64_t STEPS = 64; + + std::vector times(STEPS); + std::iota(times.begin(), times.end(), 0); + + std::shared_ptr arrow_array; + + arrow::DoubleBuilder one_per_timestamp_builder; + for (int64_t i = 0; i < STEPS; i++) { + ARROW_RETURN_NOT_OK(one_per_timestamp_builder.Append(sin(static_cast(i) / 10.0))); + } + ARROW_RETURN_NOT_OK(one_per_timestamp_builder.Finish(&arrow_array)); + auto one_per_timestamp = + rerun::ComponentBatch::from_arrow_array(std::move(arrow_array), "custom_component_single") + .value_or_throw(); + + arrow::DoubleBuilder ten_per_timestamp_builder; + for (int64_t i = 0; i < STEPS * 10; i++) { + ARROW_RETURN_NOT_OK(ten_per_timestamp_builder.Append(cos(static_cast(i) / 100.0))); + } + ARROW_RETURN_NOT_OK(ten_per_timestamp_builder.Finish(&arrow_array)); + auto ten_per_timestamp = + rerun::ComponentBatch::from_arrow_array(std::move(arrow_array), "custom_component_multi") + .value_or_throw(); + + rec.send_columns( + "/", + rerun::TimeColumn::from_sequence_points("step", std::move(times)), + one_per_timestamp.partitioned().value_or_throw(), + ten_per_timestamp.partitioned(std::vector(STEPS, 10)).value_or_throw() + ); + + return arrow::Status::OK(); +} + +int main() { + arrow::Status status = run_main(); + if (!status.ok()) { + printf("%s\n", status.ToString().c_str()); + return 1; + } + return 0; +} diff --git a/docs/snippets/all/howto/any_values_send_columns.cpp b/docs/snippets/all/howto/any_values_send_columns.cpp new file mode 100644 index 000000000000..5efbee8700ca --- /dev/null +++ b/docs/snippets/all/howto/any_values_send_columns.cpp @@ -0,0 +1,54 @@ +// Use `send_column` to send entire columns of custom data to Rerun. + +#include + +#include +#include +#include +#include + +arrow::Status run_main() { + const auto rec = rerun::RecordingStream("rerun_example_any_values_send_columns"); + rec.spawn().exit_on_failure(); + + constexpr int64_t STEPS = 64; + + std::vector times(STEPS); + std::iota(times.begin(), times.end(), 0); + + std::shared_ptr arrow_array; + + arrow::DoubleBuilder sin_builder; + for (int64_t i = 0; i < STEPS; i++) { + ARROW_RETURN_NOT_OK(sin_builder.Append(sin(static_cast(i) / 10.0))); + } + ARROW_RETURN_NOT_OK(sin_builder.Finish(&arrow_array)); + auto sin = + rerun::ComponentBatch::from_arrow_array(std::move(arrow_array), "sin").value_or_throw(); + + arrow::DoubleBuilder cos_builder; + for (int64_t i = 0; i < STEPS; i++) { + ARROW_RETURN_NOT_OK(cos_builder.Append(cos(static_cast(i) / 10.0))); + } + ARROW_RETURN_NOT_OK(cos_builder.Finish(&arrow_array)); + auto cos = + rerun::ComponentBatch::from_arrow_array(std::move(arrow_array), "cos").value_or_throw(); + + rec.send_columns( + "/", + rerun::TimeColumn::from_sequence_points("step", std::move(times)), + sin.partitioned().value_or_throw(), + cos.partitioned().value_or_throw() + ); + + return arrow::Status::OK(); +} + +int main() { + arrow::Status status = run_main(); + if (!status.ok()) { + printf("%s\n", status.ToString().c_str()); + return 1; + } + return 0; +} diff --git a/docs/snippets/all/tutorials/any_values.cpp b/docs/snippets/all/tutorials/any_values.cpp new file mode 100644 index 000000000000..45d22bd2c6c3 --- /dev/null +++ b/docs/snippets/all/tutorials/any_values.cpp @@ -0,0 +1,55 @@ +// Log arbitrary data. + +#include + +#include +#include +#include + +arrow::Status run_main() { + const auto rec = rerun::RecordingStream("rerun_example_any_values"); + rec.spawn().exit_on_failure(); + + std::shared_ptr arrow_array; + + arrow::DoubleBuilder confidences_builder; + ARROW_RETURN_NOT_OK(confidences_builder.AppendValues({1.2, 3.4, 5.6})); + ARROW_RETURN_NOT_OK(confidences_builder.Finish(&arrow_array)); + auto confidences = + rerun::ComponentBatch::from_arrow_array(std::move(arrow_array), "confidence"); + + arrow::StringBuilder description_builder; + ARROW_RETURN_NOT_OK(description_builder.Append("Bla bla bla…")); + ARROW_RETURN_NOT_OK(description_builder.Finish(&arrow_array)); + auto description = + rerun::ComponentBatch::from_arrow_array(std::move(arrow_array), "description"); + // URIs will become clickable links + arrow::StringBuilder homepage_builder; + ARROW_RETURN_NOT_OK(homepage_builder.Append("https://www.rerun.io")); + ARROW_RETURN_NOT_OK(homepage_builder.Finish(&arrow_array)); + auto homepage = rerun::ComponentBatch::from_arrow_array( + std::move(arrow_array), + rerun::ComponentDescriptor("homepage") + ); + + arrow::StringBuilder repository_builder; + ARROW_RETURN_NOT_OK(repository_builder.Append("https://github.com/rerun-io/rerun")); + ARROW_RETURN_NOT_OK(repository_builder.Finish(&arrow_array)); + auto repository = rerun::ComponentBatch::from_arrow_array( + std::move(arrow_array), + rerun::ComponentDescriptor("repository") + ); + + rec.log("any_values", confidences, description, homepage, repository); + + return arrow::Status::OK(); +} + +int main() { + arrow::Status status = run_main(); + if (!status.ok()) { + printf("%s\n", status.ToString().c_str()); + return 1; + } + return 0; +} diff --git a/docs/snippets/all/tutorials/extra_values.cpp b/docs/snippets/all/tutorials/extra_values.cpp new file mode 100644 index 000000000000..4b85b8f21ca1 --- /dev/null +++ b/docs/snippets/all/tutorials/extra_values.cpp @@ -0,0 +1,32 @@ +// Log extra values with a `Points2D`. + +#include +#include +#include + +arrow::Status run_main() { + const auto rec = rerun::RecordingStream("rerun_example_extra_values"); + rec.spawn().exit_on_failure(); + + auto points = rerun::Points2D({{-1.0f, -1.0f}, {-1.0f, 1.0f}, {1.0f, -1.0f}, {1.0f, 1.0f}}); + + std::shared_ptr arrow_array; + arrow::DoubleBuilder confidences_builder; + ARROW_RETURN_NOT_OK(confidences_builder.AppendValues({0.3, 0.4, 0.5, 0.6})); + ARROW_RETURN_NOT_OK(confidences_builder.Finish(&arrow_array)); + auto confidences = + rerun::ComponentBatch::from_arrow_array(std::move(arrow_array), "confidence"); + + rec.log("extra_values", points, confidences); + + return arrow::Status::OK(); +} + +int main() { + arrow::Status status = run_main(); + if (!status.ok()) { + printf("%s\n", status.ToString().c_str()); + return 1; + } + return 0; +} diff --git a/docs/snippets/snippets.toml b/docs/snippets/snippets.toml index 8e6c67c813a9..c918adc3610c 100644 --- a/docs/snippets/snippets.toml +++ b/docs/snippets/snippets.toml @@ -100,12 +100,6 @@ "cpp", # Missing examples "rust", # Missing examples ] -"howto/any_batch_value_send_columns" = [ - "cpp", # Not implemented -] -"howto/any_values_send_columns" = [ - "cpp", # Not implemented -] "migration/log_line" = [ # Not a complete example -- just a single log line "cpp", "rust", @@ -131,9 +125,6 @@ "rust", "py", ] -"tutorials/any_values" = [ # Not yet implemented - "cpp", -] "tutorials/custom-application-id" = [ # Not a complete examples "cpp", "rust", @@ -149,9 +140,6 @@ "rust", "py", ] -"tutorials/extra_values" = [ # Missing examples - "cpp", -] "tutorials/log-file" = [ # Not a complete examples "cpp", "rust", diff --git a/lychee.toml b/lychee.toml index 2ffa5759535a..32f382295611 100644 --- a/lychee.toml +++ b/lychee.toml @@ -69,7 +69,6 @@ exclude_path = [ "crates/viewer/re_viewer/src/reflection/mod.rs", # Checker struggles how links from examples are escaped here. They are all checked elsewhere, so not an issue. "crates/store/re_grpc_client/src/address.rs", # Contains some malformed URLs, but they are not actual links. ] - # Exclude URLs and mail addresses from checking (supports regex). exclude = [ # Skip speculative links @@ -154,18 +153,22 @@ exclude = [ # '^file:///', # Ignore local file links. They need to be tested, but it's useful for external links we have to ping. # Snippets that haven't been released yet. - 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.cpp', - 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.py', - 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.rs', 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates_legacy.cpp', 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates_legacy.py', 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates_legacy.rs', + 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.cpp', + 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.py', + 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.rs', 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_send_columns.rs', 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_partial_updates.cpp', 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_partial_updates.py', 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_partial_updates.rs', + 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_batch_value_send_columns.cpp', 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_batch_value_send_columns.rs', + 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_values_send_columns.cpp', 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_values_send_columns.rs', + 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/any_values.cpp', 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/any_values.rs', + 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.cpp', 'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.rs', ] diff --git a/rerun_cpp/src/rerun/archetypes/annotation_context.cpp b/rerun_cpp/src/rerun/archetypes/annotation_context.cpp index cfec268bfaf6..4b53be94caf6 100644 --- a/rerun_cpp/src/rerun/archetypes/annotation_context.cpp +++ b/rerun_cpp/src/rerun/archetypes/annotation_context.cpp @@ -18,9 +18,7 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(2); if (context.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(context.value(), lengths_).value_or_throw() - ); + columns.push_back(context.value().partitioned(lengths_).value_or_throw()); } columns.push_back(ComponentColumn::from_indicators( static_cast(lengths_.size()) diff --git a/rerun_cpp/src/rerun/archetypes/annotation_context.hpp b/rerun_cpp/src/rerun/archetypes/annotation_context.hpp index 46dacb3e9560..f0670c7e993e 100644 --- a/rerun_cpp/src/rerun/archetypes/annotation_context.hpp +++ b/rerun_cpp/src/rerun/archetypes/annotation_context.hpp @@ -122,7 +122,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/arrows2d.cpp b/rerun_cpp/src/rerun/archetypes/arrows2d.cpp index ebdef65b3ced..d6af9272f22d 100644 --- a/rerun_cpp/src/rerun/archetypes/arrows2d.cpp +++ b/rerun_cpp/src/rerun/archetypes/arrows2d.cpp @@ -34,43 +34,28 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(9); if (vectors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(vectors.value(), lengths_).value_or_throw() - ); + columns.push_back(vectors.value().partitioned(lengths_).value_or_throw()); } if (origins.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(origins.value(), lengths_).value_or_throw() - ); + columns.push_back(origins.value().partitioned(lengths_).value_or_throw()); } if (radii.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(radii.value(), lengths_).value_or_throw() - ); + columns.push_back(radii.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } if (labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(labels.value(), lengths_).value_or_throw() - ); + columns.push_back(labels.value().partitioned(lengths_).value_or_throw()); } if (show_labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(show_labels.value(), lengths_) - .value_or_throw() - ); + columns.push_back(show_labels.value().partitioned(lengths_).value_or_throw()); } if (draw_order.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(draw_order.value(), lengths_) - .value_or_throw()); + columns.push_back(draw_order.value().partitioned(lengths_).value_or_throw()); } if (class_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(class_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(class_ids.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/arrows2d.hpp b/rerun_cpp/src/rerun/archetypes/arrows2d.hpp index f596e01354d0..af9d88e69d15 100644 --- a/rerun_cpp/src/rerun/archetypes/arrows2d.hpp +++ b/rerun_cpp/src/rerun/archetypes/arrows2d.hpp @@ -241,7 +241,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/arrows3d.cpp b/rerun_cpp/src/rerun/archetypes/arrows3d.cpp index 100aefdd3c9b..ab95855cd163 100644 --- a/rerun_cpp/src/rerun/archetypes/arrows3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/arrows3d.cpp @@ -31,39 +31,25 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(8); if (vectors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(vectors.value(), lengths_).value_or_throw() - ); + columns.push_back(vectors.value().partitioned(lengths_).value_or_throw()); } if (origins.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(origins.value(), lengths_).value_or_throw() - ); + columns.push_back(origins.value().partitioned(lengths_).value_or_throw()); } if (radii.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(radii.value(), lengths_).value_or_throw() - ); + columns.push_back(radii.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } if (labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(labels.value(), lengths_).value_or_throw() - ); + columns.push_back(labels.value().partitioned(lengths_).value_or_throw()); } if (show_labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(show_labels.value(), lengths_) - .value_or_throw() - ); + columns.push_back(show_labels.value().partitioned(lengths_).value_or_throw()); } if (class_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(class_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(class_ids.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/arrows3d.hpp b/rerun_cpp/src/rerun/archetypes/arrows3d.hpp index dae5c2029a28..35d5f02311ad 100644 --- a/rerun_cpp/src/rerun/archetypes/arrows3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/arrows3d.hpp @@ -227,7 +227,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/asset3d.cpp b/rerun_cpp/src/rerun/archetypes/asset3d.cpp index 1e56ff2c6faf..dddccadb6880 100644 --- a/rerun_cpp/src/rerun/archetypes/asset3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/asset3d.cpp @@ -23,19 +23,13 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(4); if (blob.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(blob.value(), lengths_).value_or_throw() - ); + columns.push_back(blob.value().partitioned(lengths_).value_or_throw()); } if (media_type.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(media_type.value(), lengths_) - .value_or_throw()); + columns.push_back(media_type.value().partitioned(lengths_).value_or_throw()); } if (albedo_factor.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(albedo_factor.value(), lengths_) - .value_or_throw() - ); + columns.push_back(albedo_factor.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/asset3d.hpp b/rerun_cpp/src/rerun/archetypes/asset3d.hpp index 469089090a6e..b833681e8fdb 100644 --- a/rerun_cpp/src/rerun/archetypes/asset3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/asset3d.hpp @@ -209,7 +209,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/asset_video.cpp b/rerun_cpp/src/rerun/archetypes/asset_video.cpp index 55b02624064f..1ffd889b70ff 100644 --- a/rerun_cpp/src/rerun/archetypes/asset_video.cpp +++ b/rerun_cpp/src/rerun/archetypes/asset_video.cpp @@ -20,13 +20,10 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(3); if (blob.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(blob.value(), lengths_).value_or_throw() - ); + columns.push_back(blob.value().partitioned(lengths_).value_or_throw()); } if (media_type.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(media_type.value(), lengths_) - .value_or_throw()); + columns.push_back(media_type.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/asset_video.hpp b/rerun_cpp/src/rerun/archetypes/asset_video.hpp index 328a07c074ae..8b9af5c22339 100644 --- a/rerun_cpp/src/rerun/archetypes/asset_video.hpp +++ b/rerun_cpp/src/rerun/archetypes/asset_video.hpp @@ -237,7 +237,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/bar_chart.cpp b/rerun_cpp/src/rerun/archetypes/bar_chart.cpp index 3266ef50702c..651189ee943c 100644 --- a/rerun_cpp/src/rerun/archetypes/bar_chart.cpp +++ b/rerun_cpp/src/rerun/archetypes/bar_chart.cpp @@ -19,14 +19,10 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(3); if (values.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(values.value(), lengths_).value_or_throw() - ); + columns.push_back(values.value().partitioned(lengths_).value_or_throw()); } if (color.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(color.value(), lengths_).value_or_throw() - ); + columns.push_back(color.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/bar_chart.hpp b/rerun_cpp/src/rerun/archetypes/bar_chart.hpp index 239fc02da44c..ac7fdb44b113 100644 --- a/rerun_cpp/src/rerun/archetypes/bar_chart.hpp +++ b/rerun_cpp/src/rerun/archetypes/bar_chart.hpp @@ -231,7 +231,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/boxes2d.cpp b/rerun_cpp/src/rerun/archetypes/boxes2d.cpp index 8aadf266dcd9..aae00f52bd6a 100644 --- a/rerun_cpp/src/rerun/archetypes/boxes2d.cpp +++ b/rerun_cpp/src/rerun/archetypes/boxes2d.cpp @@ -35,42 +35,28 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(9); if (half_sizes.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(half_sizes.value(), lengths_) - .value_or_throw()); + columns.push_back(half_sizes.value().partitioned(lengths_).value_or_throw()); } if (centers.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(centers.value(), lengths_).value_or_throw() - ); + columns.push_back(centers.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } if (radii.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(radii.value(), lengths_).value_or_throw() - ); + columns.push_back(radii.value().partitioned(lengths_).value_or_throw()); } if (labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(labels.value(), lengths_).value_or_throw() - ); + columns.push_back(labels.value().partitioned(lengths_).value_or_throw()); } if (show_labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(show_labels.value(), lengths_) - .value_or_throw() - ); + columns.push_back(show_labels.value().partitioned(lengths_).value_or_throw()); } if (draw_order.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(draw_order.value(), lengths_) - .value_or_throw()); + columns.push_back(draw_order.value().partitioned(lengths_).value_or_throw()); } if (class_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(class_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(class_ids.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/boxes2d.hpp b/rerun_cpp/src/rerun/archetypes/boxes2d.hpp index 4b2057bc6843..6c943ef3d25a 100644 --- a/rerun_cpp/src/rerun/archetypes/boxes2d.hpp +++ b/rerun_cpp/src/rerun/archetypes/boxes2d.hpp @@ -265,7 +265,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/boxes3d.cpp b/rerun_cpp/src/rerun/archetypes/boxes3d.cpp index 05974b8cf6cc..150f15cf44d8 100644 --- a/rerun_cpp/src/rerun/archetypes/boxes3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/boxes3d.cpp @@ -44,54 +44,34 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(11); if (half_sizes.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(half_sizes.value(), lengths_) - .value_or_throw()); + columns.push_back(half_sizes.value().partitioned(lengths_).value_or_throw()); } if (centers.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(centers.value(), lengths_).value_or_throw() - ); + columns.push_back(centers.value().partitioned(lengths_).value_or_throw()); } if (rotation_axis_angles.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(rotation_axis_angles.value(), lengths_) - .value_or_throw() - ); + columns.push_back(rotation_axis_angles.value().partitioned(lengths_).value_or_throw()); } if (quaternions.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(quaternions.value(), lengths_) - .value_or_throw() - ); + columns.push_back(quaternions.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } if (radii.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(radii.value(), lengths_).value_or_throw() - ); + columns.push_back(radii.value().partitioned(lengths_).value_or_throw()); } if (fill_mode.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fill_mode.value(), lengths_) - .value_or_throw()); + columns.push_back(fill_mode.value().partitioned(lengths_).value_or_throw()); } if (labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(labels.value(), lengths_).value_or_throw() - ); + columns.push_back(labels.value().partitioned(lengths_).value_or_throw()); } if (show_labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(show_labels.value(), lengths_) - .value_or_throw() - ); + columns.push_back(show_labels.value().partitioned(lengths_).value_or_throw()); } if (class_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(class_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(class_ids.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/boxes3d.hpp b/rerun_cpp/src/rerun/archetypes/boxes3d.hpp index 0c4a8ecdeb76..c03b168ef20f 100644 --- a/rerun_cpp/src/rerun/archetypes/boxes3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/boxes3d.hpp @@ -339,7 +339,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/capsules3d.cpp b/rerun_cpp/src/rerun/archetypes/capsules3d.cpp index a27b228738ad..2b5c11c40982 100644 --- a/rerun_cpp/src/rerun/archetypes/capsules3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/capsules3d.cpp @@ -40,52 +40,31 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(10); if (lengths.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(lengths.value(), lengths_).value_or_throw() - ); + columns.push_back(lengths.value().partitioned(lengths_).value_or_throw()); } if (radii.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(radii.value(), lengths_).value_or_throw() - ); + columns.push_back(radii.value().partitioned(lengths_).value_or_throw()); } if (translations.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(translations.value(), lengths_) - .value_or_throw() - ); + columns.push_back(translations.value().partitioned(lengths_).value_or_throw()); } if (rotation_axis_angles.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(rotation_axis_angles.value(), lengths_) - .value_or_throw() - ); + columns.push_back(rotation_axis_angles.value().partitioned(lengths_).value_or_throw()); } if (quaternions.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(quaternions.value(), lengths_) - .value_or_throw() - ); + columns.push_back(quaternions.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } if (labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(labels.value(), lengths_).value_or_throw() - ); + columns.push_back(labels.value().partitioned(lengths_).value_or_throw()); } if (show_labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(show_labels.value(), lengths_) - .value_or_throw() - ); + columns.push_back(show_labels.value().partitioned(lengths_).value_or_throw()); } if (class_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(class_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(class_ids.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/capsules3d.hpp b/rerun_cpp/src/rerun/archetypes/capsules3d.hpp index 2f4a0ee00b6b..1fd0b1705b3c 100644 --- a/rerun_cpp/src/rerun/archetypes/capsules3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/capsules3d.hpp @@ -302,7 +302,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/clear.cpp b/rerun_cpp/src/rerun/archetypes/clear.cpp index 3f486d70889a..33fc01a51583 100644 --- a/rerun_cpp/src/rerun/archetypes/clear.cpp +++ b/rerun_cpp/src/rerun/archetypes/clear.cpp @@ -18,10 +18,7 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(2); if (is_recursive.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(is_recursive.value(), lengths_) - .value_or_throw() - ); + columns.push_back(is_recursive.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/clear.hpp b/rerun_cpp/src/rerun/archetypes/clear.hpp index dacbce677be8..505fed179f8e 100644 --- a/rerun_cpp/src/rerun/archetypes/clear.hpp +++ b/rerun_cpp/src/rerun/archetypes/clear.hpp @@ -150,7 +150,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/depth_image.cpp b/rerun_cpp/src/rerun/archetypes/depth_image.cpp index 5dd43e2774ed..b3c473e9432b 100644 --- a/rerun_cpp/src/rerun/archetypes/depth_image.cpp +++ b/rerun_cpp/src/rerun/archetypes/depth_image.cpp @@ -32,39 +32,25 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(8); if (buffer.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(buffer.value(), lengths_).value_or_throw() - ); + columns.push_back(buffer.value().partitioned(lengths_).value_or_throw()); } if (format.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(format.value(), lengths_).value_or_throw() - ); + columns.push_back(format.value().partitioned(lengths_).value_or_throw()); } if (meter.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(meter.value(), lengths_).value_or_throw() - ); + columns.push_back(meter.value().partitioned(lengths_).value_or_throw()); } if (colormap.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(colormap.value(), lengths_) - .value_or_throw()); + columns.push_back(colormap.value().partitioned(lengths_).value_or_throw()); } if (depth_range.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(depth_range.value(), lengths_) - .value_or_throw() - ); + columns.push_back(depth_range.value().partitioned(lengths_).value_or_throw()); } if (point_fill_ratio.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(point_fill_ratio.value(), lengths_) - .value_or_throw() - ); + columns.push_back(point_fill_ratio.value().partitioned(lengths_).value_or_throw()); } if (draw_order.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(draw_order.value(), lengths_) - .value_or_throw()); + columns.push_back(draw_order.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/depth_image.hpp b/rerun_cpp/src/rerun/archetypes/depth_image.hpp index c85836506af7..2aa6ef7ce0d8 100644 --- a/rerun_cpp/src/rerun/archetypes/depth_image.hpp +++ b/rerun_cpp/src/rerun/archetypes/depth_image.hpp @@ -392,7 +392,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp b/rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp index b325d28e492d..8ea117fcddc7 100644 --- a/rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp @@ -45,53 +45,34 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(11); if (half_sizes.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(half_sizes.value(), lengths_) - .value_or_throw()); + columns.push_back(half_sizes.value().partitioned(lengths_).value_or_throw()); } if (centers.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(centers.value(), lengths_).value_or_throw() - ); + columns.push_back(centers.value().partitioned(lengths_).value_or_throw()); } if (rotation_axis_angles.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(rotation_axis_angles.value(), lengths_) - .value_or_throw() - ); + columns.push_back(rotation_axis_angles.value().partitioned(lengths_).value_or_throw()); } if (quaternions.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(quaternions.value(), lengths_) - .value_or_throw() - ); + columns.push_back(quaternions.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } if (line_radii.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(line_radii.value(), lengths_) - .value_or_throw()); + columns.push_back(line_radii.value().partitioned(lengths_).value_or_throw()); } if (fill_mode.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fill_mode.value(), lengths_) - .value_or_throw()); + columns.push_back(fill_mode.value().partitioned(lengths_).value_or_throw()); } if (labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(labels.value(), lengths_).value_or_throw() - ); + columns.push_back(labels.value().partitioned(lengths_).value_or_throw()); } if (show_labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(show_labels.value(), lengths_) - .value_or_throw() - ); + columns.push_back(show_labels.value().partitioned(lengths_).value_or_throw()); } if (class_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(class_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(class_ids.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/ellipsoids3d.hpp b/rerun_cpp/src/rerun/archetypes/ellipsoids3d.hpp index ef42629537ac..b44c30ee8474 100644 --- a/rerun_cpp/src/rerun/archetypes/ellipsoids3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/ellipsoids3d.hpp @@ -352,7 +352,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/encoded_image.cpp b/rerun_cpp/src/rerun/archetypes/encoded_image.cpp index 8dabdf05701b..7b2fdbd4282d 100644 --- a/rerun_cpp/src/rerun/archetypes/encoded_image.cpp +++ b/rerun_cpp/src/rerun/archetypes/encoded_image.cpp @@ -25,22 +25,16 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(5); if (blob.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(blob.value(), lengths_).value_or_throw() - ); + columns.push_back(blob.value().partitioned(lengths_).value_or_throw()); } if (media_type.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(media_type.value(), lengths_) - .value_or_throw()); + columns.push_back(media_type.value().partitioned(lengths_).value_or_throw()); } if (opacity.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(opacity.value(), lengths_).value_or_throw() - ); + columns.push_back(opacity.value().partitioned(lengths_).value_or_throw()); } if (draw_order.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(draw_order.value(), lengths_) - .value_or_throw()); + columns.push_back(draw_order.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/encoded_image.hpp b/rerun_cpp/src/rerun/archetypes/encoded_image.hpp index a096758a1af4..66672539f736 100644 --- a/rerun_cpp/src/rerun/archetypes/encoded_image.hpp +++ b/rerun_cpp/src/rerun/archetypes/encoded_image.hpp @@ -218,7 +218,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp b/rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp index 218f0fca536a..800512cb6918 100644 --- a/rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp +++ b/rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp @@ -22,20 +22,13 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(4); if (line_strings.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(line_strings.value(), lengths_) - .value_or_throw() - ); + columns.push_back(line_strings.value().partitioned(lengths_).value_or_throw()); } if (radii.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(radii.value(), lengths_).value_or_throw() - ); + columns.push_back(radii.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/geo_line_strings.hpp b/rerun_cpp/src/rerun/archetypes/geo_line_strings.hpp index 2417a3ae232b..5ce1334f4039 100644 --- a/rerun_cpp/src/rerun/archetypes/geo_line_strings.hpp +++ b/rerun_cpp/src/rerun/archetypes/geo_line_strings.hpp @@ -134,7 +134,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/geo_points.cpp b/rerun_cpp/src/rerun/archetypes/geo_points.cpp index 9572943a141d..d39947ad597d 100644 --- a/rerun_cpp/src/rerun/archetypes/geo_points.cpp +++ b/rerun_cpp/src/rerun/archetypes/geo_points.cpp @@ -24,22 +24,16 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(5); if (positions.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(positions.value(), lengths_) - .value_or_throw()); + columns.push_back(positions.value().partitioned(lengths_).value_or_throw()); } if (radii.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(radii.value(), lengths_).value_or_throw() - ); + columns.push_back(radii.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } if (class_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(class_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(class_ids.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/geo_points.hpp b/rerun_cpp/src/rerun/archetypes/geo_points.hpp index ed8bbf9cc204..0401fca1a08d 100644 --- a/rerun_cpp/src/rerun/archetypes/geo_points.hpp +++ b/rerun_cpp/src/rerun/archetypes/geo_points.hpp @@ -146,7 +146,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/graph_edges.cpp b/rerun_cpp/src/rerun/archetypes/graph_edges.cpp index 68855c54711d..351ff08ef730 100644 --- a/rerun_cpp/src/rerun/archetypes/graph_edges.cpp +++ b/rerun_cpp/src/rerun/archetypes/graph_edges.cpp @@ -20,13 +20,10 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(3); if (edges.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(edges.value(), lengths_).value_or_throw() - ); + columns.push_back(edges.value().partitioned(lengths_).value_or_throw()); } if (graph_type.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(graph_type.value(), lengths_) - .value_or_throw()); + columns.push_back(graph_type.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/graph_edges.hpp b/rerun_cpp/src/rerun/archetypes/graph_edges.hpp index 12d63c94fc2e..232a53547209 100644 --- a/rerun_cpp/src/rerun/archetypes/graph_edges.hpp +++ b/rerun_cpp/src/rerun/archetypes/graph_edges.hpp @@ -121,7 +121,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/graph_nodes.cpp b/rerun_cpp/src/rerun/archetypes/graph_nodes.cpp index 96105ae01e81..0cc171ddea32 100644 --- a/rerun_cpp/src/rerun/archetypes/graph_nodes.cpp +++ b/rerun_cpp/src/rerun/archetypes/graph_nodes.cpp @@ -30,33 +30,22 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(7); if (node_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(node_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(node_ids.value().partitioned(lengths_).value_or_throw()); } if (positions.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(positions.value(), lengths_) - .value_or_throw()); + columns.push_back(positions.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } if (labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(labels.value(), lengths_).value_or_throw() - ); + columns.push_back(labels.value().partitioned(lengths_).value_or_throw()); } if (show_labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(show_labels.value(), lengths_) - .value_or_throw() - ); + columns.push_back(show_labels.value().partitioned(lengths_).value_or_throw()); } if (radii.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(radii.value(), lengths_).value_or_throw() - ); + columns.push_back(radii.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/graph_nodes.hpp b/rerun_cpp/src/rerun/archetypes/graph_nodes.hpp index 924ed7967e43..d91c796b223e 100644 --- a/rerun_cpp/src/rerun/archetypes/graph_nodes.hpp +++ b/rerun_cpp/src/rerun/archetypes/graph_nodes.hpp @@ -175,7 +175,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/image.cpp b/rerun_cpp/src/rerun/archetypes/image.cpp index 4067ad30a533..ed46bf26992e 100644 --- a/rerun_cpp/src/rerun/archetypes/image.cpp +++ b/rerun_cpp/src/rerun/archetypes/image.cpp @@ -24,23 +24,16 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(5); if (buffer.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(buffer.value(), lengths_).value_or_throw() - ); + columns.push_back(buffer.value().partitioned(lengths_).value_or_throw()); } if (format.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(format.value(), lengths_).value_or_throw() - ); + columns.push_back(format.value().partitioned(lengths_).value_or_throw()); } if (opacity.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(opacity.value(), lengths_).value_or_throw() - ); + columns.push_back(opacity.value().partitioned(lengths_).value_or_throw()); } if (draw_order.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(draw_order.value(), lengths_) - .value_or_throw()); + columns.push_back(draw_order.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/image.hpp b/rerun_cpp/src/rerun/archetypes/image.hpp index b6882477f6e0..6364ba654c76 100644 --- a/rerun_cpp/src/rerun/archetypes/image.hpp +++ b/rerun_cpp/src/rerun/archetypes/image.hpp @@ -402,7 +402,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp b/rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp index a48103fc0009..2ac5002d2fb7 100644 --- a/rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp @@ -31,32 +31,19 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(6); if (translations.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(translations.value(), lengths_) - .value_or_throw() - ); + columns.push_back(translations.value().partitioned(lengths_).value_or_throw()); } if (rotation_axis_angles.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(rotation_axis_angles.value(), lengths_) - .value_or_throw() - ); + columns.push_back(rotation_axis_angles.value().partitioned(lengths_).value_or_throw()); } if (quaternions.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(quaternions.value(), lengths_) - .value_or_throw() - ); + columns.push_back(quaternions.value().partitioned(lengths_).value_or_throw()); } if (scales.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(scales.value(), lengths_).value_or_throw() - ); + columns.push_back(scales.value().partitioned(lengths_).value_or_throw()); } if (mat3x3.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(mat3x3.value(), lengths_).value_or_throw() - ); + columns.push_back(mat3x3.value().partitioned(lengths_).value_or_throw()); } columns.push_back(ComponentColumn::from_indicators( static_cast(lengths_.size()) diff --git a/rerun_cpp/src/rerun/archetypes/instance_poses3d.hpp b/rerun_cpp/src/rerun/archetypes/instance_poses3d.hpp index b4dbe1e0a4ca..490abd0e024b 100644 --- a/rerun_cpp/src/rerun/archetypes/instance_poses3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/instance_poses3d.hpp @@ -189,7 +189,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/line_strips2d.cpp b/rerun_cpp/src/rerun/archetypes/line_strips2d.cpp index 5239ffc99832..205661cc93d0 100644 --- a/rerun_cpp/src/rerun/archetypes/line_strips2d.cpp +++ b/rerun_cpp/src/rerun/archetypes/line_strips2d.cpp @@ -32,38 +32,25 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(8); if (strips.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(strips.value(), lengths_).value_or_throw() - ); + columns.push_back(strips.value().partitioned(lengths_).value_or_throw()); } if (radii.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(radii.value(), lengths_).value_or_throw() - ); + columns.push_back(radii.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } if (labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(labels.value(), lengths_).value_or_throw() - ); + columns.push_back(labels.value().partitioned(lengths_).value_or_throw()); } if (show_labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(show_labels.value(), lengths_) - .value_or_throw() - ); + columns.push_back(show_labels.value().partitioned(lengths_).value_or_throw()); } if (draw_order.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(draw_order.value(), lengths_) - .value_or_throw()); + columns.push_back(draw_order.value().partitioned(lengths_).value_or_throw()); } if (class_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(class_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(class_ids.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/line_strips2d.hpp b/rerun_cpp/src/rerun/archetypes/line_strips2d.hpp index 1ee2d3d99803..bad5c3b97b2a 100644 --- a/rerun_cpp/src/rerun/archetypes/line_strips2d.hpp +++ b/rerun_cpp/src/rerun/archetypes/line_strips2d.hpp @@ -255,7 +255,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/line_strips3d.cpp b/rerun_cpp/src/rerun/archetypes/line_strips3d.cpp index c8c97fa50978..a471999aa77f 100644 --- a/rerun_cpp/src/rerun/archetypes/line_strips3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/line_strips3d.cpp @@ -29,34 +29,22 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(7); if (strips.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(strips.value(), lengths_).value_or_throw() - ); + columns.push_back(strips.value().partitioned(lengths_).value_or_throw()); } if (radii.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(radii.value(), lengths_).value_or_throw() - ); + columns.push_back(radii.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } if (labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(labels.value(), lengths_).value_or_throw() - ); + columns.push_back(labels.value().partitioned(lengths_).value_or_throw()); } if (show_labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(show_labels.value(), lengths_) - .value_or_throw() - ); + columns.push_back(show_labels.value().partitioned(lengths_).value_or_throw()); } if (class_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(class_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(class_ids.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/line_strips3d.hpp b/rerun_cpp/src/rerun/archetypes/line_strips3d.hpp index 78f69a110d9f..e154bdb75531 100644 --- a/rerun_cpp/src/rerun/archetypes/line_strips3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/line_strips3d.hpp @@ -238,7 +238,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/mesh3d.cpp b/rerun_cpp/src/rerun/archetypes/mesh3d.cpp index b309fb45e506..523bca465c49 100644 --- a/rerun_cpp/src/rerun/archetypes/mesh3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/mesh3d.cpp @@ -42,56 +42,31 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(10); if (vertex_positions.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(vertex_positions.value(), lengths_) - .value_or_throw() - ); + columns.push_back(vertex_positions.value().partitioned(lengths_).value_or_throw()); } if (triangle_indices.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(triangle_indices.value(), lengths_) - .value_or_throw() - ); + columns.push_back(triangle_indices.value().partitioned(lengths_).value_or_throw()); } if (vertex_normals.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(vertex_normals.value(), lengths_) - .value_or_throw() - ); + columns.push_back(vertex_normals.value().partitioned(lengths_).value_or_throw()); } if (vertex_colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(vertex_colors.value(), lengths_) - .value_or_throw() - ); + columns.push_back(vertex_colors.value().partitioned(lengths_).value_or_throw()); } if (vertex_texcoords.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(vertex_texcoords.value(), lengths_) - .value_or_throw() - ); + columns.push_back(vertex_texcoords.value().partitioned(lengths_).value_or_throw()); } if (albedo_factor.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(albedo_factor.value(), lengths_) - .value_or_throw() - ); + columns.push_back(albedo_factor.value().partitioned(lengths_).value_or_throw()); } if (albedo_texture_buffer.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(albedo_texture_buffer.value(), lengths_) - .value_or_throw() - ); + columns.push_back(albedo_texture_buffer.value().partitioned(lengths_).value_or_throw()); } if (albedo_texture_format.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(albedo_texture_format.value(), lengths_) - .value_or_throw() - ); + columns.push_back(albedo_texture_format.value().partitioned(lengths_).value_or_throw()); } if (class_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(class_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(class_ids.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/mesh3d.hpp b/rerun_cpp/src/rerun/archetypes/mesh3d.hpp index 981912dd02fb..bbbe93e8a139 100644 --- a/rerun_cpp/src/rerun/archetypes/mesh3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/mesh3d.hpp @@ -357,7 +357,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/pinhole.cpp b/rerun_cpp/src/rerun/archetypes/pinhole.cpp index e9fb30b169d8..77e69814f390 100644 --- a/rerun_cpp/src/rerun/archetypes/pinhole.cpp +++ b/rerun_cpp/src/rerun/archetypes/pinhole.cpp @@ -30,24 +30,16 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(5); if (image_from_camera.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(image_from_camera.value(), lengths_) - .value_or_throw() - ); + columns.push_back(image_from_camera.value().partitioned(lengths_).value_or_throw()); } if (resolution.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(resolution.value(), lengths_) - .value_or_throw()); + columns.push_back(resolution.value().partitioned(lengths_).value_or_throw()); } if (camera_xyz.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(camera_xyz.value(), lengths_) - .value_or_throw()); + columns.push_back(camera_xyz.value().partitioned(lengths_).value_or_throw()); } if (image_plane_distance.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(image_plane_distance.value(), lengths_) - .value_or_throw() - ); + columns.push_back(image_plane_distance.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/pinhole.hpp b/rerun_cpp/src/rerun/archetypes/pinhole.hpp index 0e4fbe899055..1c4a9891fb03 100644 --- a/rerun_cpp/src/rerun/archetypes/pinhole.hpp +++ b/rerun_cpp/src/rerun/archetypes/pinhole.hpp @@ -352,7 +352,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/points2d.cpp b/rerun_cpp/src/rerun/archetypes/points2d.cpp index 7eb55a2acd3d..7864ae7fb052 100644 --- a/rerun_cpp/src/rerun/archetypes/points2d.cpp +++ b/rerun_cpp/src/rerun/archetypes/points2d.cpp @@ -36,43 +36,28 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(9); if (positions.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(positions.value(), lengths_) - .value_or_throw()); + columns.push_back(positions.value().partitioned(lengths_).value_or_throw()); } if (radii.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(radii.value(), lengths_).value_or_throw() - ); + columns.push_back(radii.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } if (labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(labels.value(), lengths_).value_or_throw() - ); + columns.push_back(labels.value().partitioned(lengths_).value_or_throw()); } if (show_labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(show_labels.value(), lengths_) - .value_or_throw() - ); + columns.push_back(show_labels.value().partitioned(lengths_).value_or_throw()); } if (draw_order.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(draw_order.value(), lengths_) - .value_or_throw()); + columns.push_back(draw_order.value().partitioned(lengths_).value_or_throw()); } if (class_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(class_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(class_ids.value().partitioned(lengths_).value_or_throw()); } if (keypoint_ids.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(keypoint_ids.value(), lengths_) - .value_or_throw() - ); + columns.push_back(keypoint_ids.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/points2d.hpp b/rerun_cpp/src/rerun/archetypes/points2d.hpp index f12d10939ff2..31a7808ee235 100644 --- a/rerun_cpp/src/rerun/archetypes/points2d.hpp +++ b/rerun_cpp/src/rerun/archetypes/points2d.hpp @@ -301,7 +301,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/points3d.cpp b/rerun_cpp/src/rerun/archetypes/points3d.cpp index 6d06b32cea16..d1260b8e1f39 100644 --- a/rerun_cpp/src/rerun/archetypes/points3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/points3d.cpp @@ -33,39 +33,25 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(8); if (positions.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(positions.value(), lengths_) - .value_or_throw()); + columns.push_back(positions.value().partitioned(lengths_).value_or_throw()); } if (radii.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(radii.value(), lengths_).value_or_throw() - ); + columns.push_back(radii.value().partitioned(lengths_).value_or_throw()); } if (colors.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(colors.value(), lengths_).value_or_throw() - ); + columns.push_back(colors.value().partitioned(lengths_).value_or_throw()); } if (labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(labels.value(), lengths_).value_or_throw() - ); + columns.push_back(labels.value().partitioned(lengths_).value_or_throw()); } if (show_labels.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(show_labels.value(), lengths_) - .value_or_throw() - ); + columns.push_back(show_labels.value().partitioned(lengths_).value_or_throw()); } if (class_ids.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(class_ids.value(), lengths_) - .value_or_throw()); + columns.push_back(class_ids.value().partitioned(lengths_).value_or_throw()); } if (keypoint_ids.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(keypoint_ids.value(), lengths_) - .value_or_throw() - ); + columns.push_back(keypoint_ids.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/points3d.hpp b/rerun_cpp/src/rerun/archetypes/points3d.hpp index cdcac22aa108..e8c450349252 100644 --- a/rerun_cpp/src/rerun/archetypes/points3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/points3d.hpp @@ -307,7 +307,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/scalar.cpp b/rerun_cpp/src/rerun/archetypes/scalar.cpp index 354ea4f6d69f..f0b49becaf0e 100644 --- a/rerun_cpp/src/rerun/archetypes/scalar.cpp +++ b/rerun_cpp/src/rerun/archetypes/scalar.cpp @@ -17,9 +17,7 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(2); if (scalar.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(scalar.value(), lengths_).value_or_throw() - ); + columns.push_back(scalar.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/scalar.hpp b/rerun_cpp/src/rerun/archetypes/scalar.hpp index 5f93e3facb70..b92d58770090 100644 --- a/rerun_cpp/src/rerun/archetypes/scalar.hpp +++ b/rerun_cpp/src/rerun/archetypes/scalar.hpp @@ -132,7 +132,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/segmentation_image.cpp b/rerun_cpp/src/rerun/archetypes/segmentation_image.cpp index 43ab8233024d..e9c618bd4fc9 100644 --- a/rerun_cpp/src/rerun/archetypes/segmentation_image.cpp +++ b/rerun_cpp/src/rerun/archetypes/segmentation_image.cpp @@ -24,23 +24,16 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(5); if (buffer.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(buffer.value(), lengths_).value_or_throw() - ); + columns.push_back(buffer.value().partitioned(lengths_).value_or_throw()); } if (format.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(format.value(), lengths_).value_or_throw() - ); + columns.push_back(format.value().partitioned(lengths_).value_or_throw()); } if (opacity.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(opacity.value(), lengths_).value_or_throw() - ); + columns.push_back(opacity.value().partitioned(lengths_).value_or_throw()); } if (draw_order.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(draw_order.value(), lengths_) - .value_or_throw()); + columns.push_back(draw_order.value().partitioned(lengths_).value_or_throw()); } columns.push_back(ComponentColumn::from_indicators( static_cast(lengths_.size()) diff --git a/rerun_cpp/src/rerun/archetypes/segmentation_image.hpp b/rerun_cpp/src/rerun/archetypes/segmentation_image.hpp index fb5033a652f5..5726411aa281 100644 --- a/rerun_cpp/src/rerun/archetypes/segmentation_image.hpp +++ b/rerun_cpp/src/rerun/archetypes/segmentation_image.hpp @@ -271,7 +271,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/series_line.cpp b/rerun_cpp/src/rerun/archetypes/series_line.cpp index e3cb7481c88a..99ead2d7b8cc 100644 --- a/rerun_cpp/src/rerun/archetypes/series_line.cpp +++ b/rerun_cpp/src/rerun/archetypes/series_line.cpp @@ -25,25 +25,16 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(5); if (color.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(color.value(), lengths_).value_or_throw() - ); + columns.push_back(color.value().partitioned(lengths_).value_or_throw()); } if (width.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(width.value(), lengths_).value_or_throw() - ); + columns.push_back(width.value().partitioned(lengths_).value_or_throw()); } if (name.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(name.value(), lengths_).value_or_throw() - ); + columns.push_back(name.value().partitioned(lengths_).value_or_throw()); } if (aggregation_policy.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(aggregation_policy.value(), lengths_) - .value_or_throw() - ); + columns.push_back(aggregation_policy.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/series_line.hpp b/rerun_cpp/src/rerun/archetypes/series_line.hpp index 4a6c7343c5d6..622939959975 100644 --- a/rerun_cpp/src/rerun/archetypes/series_line.hpp +++ b/rerun_cpp/src/rerun/archetypes/series_line.hpp @@ -201,7 +201,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/series_point.cpp b/rerun_cpp/src/rerun/archetypes/series_point.cpp index a1605c636f8b..141b8a54db88 100644 --- a/rerun_cpp/src/rerun/archetypes/series_point.cpp +++ b/rerun_cpp/src/rerun/archetypes/series_point.cpp @@ -24,25 +24,16 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(5); if (color.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(color.value(), lengths_).value_or_throw() - ); + columns.push_back(color.value().partitioned(lengths_).value_or_throw()); } if (marker.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(marker.value(), lengths_).value_or_throw() - ); + columns.push_back(marker.value().partitioned(lengths_).value_or_throw()); } if (name.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(name.value(), lengths_).value_or_throw() - ); + columns.push_back(name.value().partitioned(lengths_).value_or_throw()); } if (marker_size.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(marker_size.value(), lengths_) - .value_or_throw() - ); + columns.push_back(marker_size.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/series_point.hpp b/rerun_cpp/src/rerun/archetypes/series_point.hpp index a6884fa2956b..5415e70c8e58 100644 --- a/rerun_cpp/src/rerun/archetypes/series_point.hpp +++ b/rerun_cpp/src/rerun/archetypes/series_point.hpp @@ -197,7 +197,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/tensor.cpp b/rerun_cpp/src/rerun/archetypes/tensor.cpp index 87bae900385e..abf8d9b9140b 100644 --- a/rerun_cpp/src/rerun/archetypes/tensor.cpp +++ b/rerun_cpp/src/rerun/archetypes/tensor.cpp @@ -20,15 +20,10 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(3); if (data.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(data.value(), lengths_).value_or_throw() - ); + columns.push_back(data.value().partitioned(lengths_).value_or_throw()); } if (value_range.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(value_range.value(), lengths_) - .value_or_throw() - ); + columns.push_back(value_range.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/tensor.hpp b/rerun_cpp/src/rerun/archetypes/tensor.hpp index 09a98b582697..b9f6ce3e7569 100644 --- a/rerun_cpp/src/rerun/archetypes/tensor.hpp +++ b/rerun_cpp/src/rerun/archetypes/tensor.hpp @@ -183,7 +183,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/text_document.cpp b/rerun_cpp/src/rerun/archetypes/text_document.cpp index 8143aa6030ff..2d2068ed057f 100644 --- a/rerun_cpp/src/rerun/archetypes/text_document.cpp +++ b/rerun_cpp/src/rerun/archetypes/text_document.cpp @@ -20,13 +20,10 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(3); if (text.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(text.value(), lengths_).value_or_throw() - ); + columns.push_back(text.value().partitioned(lengths_).value_or_throw()); } if (media_type.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(media_type.value(), lengths_) - .value_or_throw()); + columns.push_back(media_type.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/text_document.hpp b/rerun_cpp/src/rerun/archetypes/text_document.hpp index ad1156cc1c0c..122e441270a8 100644 --- a/rerun_cpp/src/rerun/archetypes/text_document.hpp +++ b/rerun_cpp/src/rerun/archetypes/text_document.hpp @@ -168,7 +168,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/text_log.cpp b/rerun_cpp/src/rerun/archetypes/text_log.cpp index 7d93eb1fdb1c..2dfbaff4e3a3 100644 --- a/rerun_cpp/src/rerun/archetypes/text_log.cpp +++ b/rerun_cpp/src/rerun/archetypes/text_log.cpp @@ -21,19 +21,13 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(4); if (text.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(text.value(), lengths_).value_or_throw() - ); + columns.push_back(text.value().partitioned(lengths_).value_or_throw()); } if (level.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(level.value(), lengths_).value_or_throw() - ); + columns.push_back(level.value().partitioned(lengths_).value_or_throw()); } if (color.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(color.value(), lengths_).value_or_throw() - ); + columns.push_back(color.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/text_log.hpp b/rerun_cpp/src/rerun/archetypes/text_log.hpp index ef0296a9ba4a..3c54e5e38420 100644 --- a/rerun_cpp/src/rerun/archetypes/text_log.hpp +++ b/rerun_cpp/src/rerun/archetypes/text_log.hpp @@ -181,7 +181,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/transform3d.cpp b/rerun_cpp/src/rerun/archetypes/transform3d.cpp index 8dc47cc53e90..23240f965bd9 100644 --- a/rerun_cpp/src/rerun/archetypes/transform3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/transform3d.cpp @@ -36,40 +36,25 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(8); if (translation.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(translation.value(), lengths_) - .value_or_throw() - ); + columns.push_back(translation.value().partitioned(lengths_).value_or_throw()); } if (rotation_axis_angle.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(rotation_axis_angle.value(), lengths_) - .value_or_throw() - ); + columns.push_back(rotation_axis_angle.value().partitioned(lengths_).value_or_throw()); } if (quaternion.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(quaternion.value(), lengths_) - .value_or_throw()); + columns.push_back(quaternion.value().partitioned(lengths_).value_or_throw()); } if (scale.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(scale.value(), lengths_).value_or_throw() - ); + columns.push_back(scale.value().partitioned(lengths_).value_or_throw()); } if (mat3x3.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(mat3x3.value(), lengths_).value_or_throw() - ); + columns.push_back(mat3x3.value().partitioned(lengths_).value_or_throw()); } if (relation.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(relation.value(), lengths_) - .value_or_throw()); + columns.push_back(relation.value().partitioned(lengths_).value_or_throw()); } if (axis_length.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(axis_length.value(), lengths_) - .value_or_throw() - ); + columns.push_back(axis_length.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/archetypes/transform3d.hpp b/rerun_cpp/src/rerun/archetypes/transform3d.hpp index 867b9bf06496..dcae9e72316d 100644 --- a/rerun_cpp/src/rerun/archetypes/transform3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/transform3d.hpp @@ -744,7 +744,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp b/rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp index fee7791b6238..9762e29de85d 100644 --- a/rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp +++ b/rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp @@ -21,14 +21,10 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(3); if (timestamp.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(timestamp.value(), lengths_) - .value_or_throw()); + columns.push_back(timestamp.value().partitioned(lengths_).value_or_throw()); } if (video_reference.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(video_reference.value(), lengths_) - .value_or_throw() - ); + columns.push_back(video_reference.value().partitioned(lengths_).value_or_throw()); } columns.push_back(ComponentColumn::from_indicators( static_cast(lengths_.size()) diff --git a/rerun_cpp/src/rerun/archetypes/video_frame_reference.hpp b/rerun_cpp/src/rerun/archetypes/video_frame_reference.hpp index c274a33d9a00..fe51e5501826 100644 --- a/rerun_cpp/src/rerun/archetypes/video_frame_reference.hpp +++ b/rerun_cpp/src/rerun/archetypes/video_frame_reference.hpp @@ -229,7 +229,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/archetypes/view_coordinates.cpp b/rerun_cpp/src/rerun/archetypes/view_coordinates.cpp index eecca1af4b07..ef4b462075af 100644 --- a/rerun_cpp/src/rerun/archetypes/view_coordinates.cpp +++ b/rerun_cpp/src/rerun/archetypes/view_coordinates.cpp @@ -17,9 +17,7 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(2); if (xyz.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(xyz.value(), lengths_).value_or_throw() - ); + columns.push_back(xyz.value().partitioned(lengths_).value_or_throw()); } columns.push_back(ComponentColumn::from_indicators( static_cast(lengths_.size()) diff --git a/rerun_cpp/src/rerun/archetypes/view_coordinates.hpp b/rerun_cpp/src/rerun/archetypes/view_coordinates.hpp index 93754b9938d9..2cfb6c35c261 100644 --- a/rerun_cpp/src/rerun/archetypes/view_coordinates.hpp +++ b/rerun_cpp/src/rerun/archetypes/view_coordinates.hpp @@ -358,7 +358,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/background.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/background.cpp index 1634703a607a..2e6473dc4ace 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/background.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/background.cpp @@ -20,14 +20,10 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(3); if (kind.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(kind.value(), lengths_).value_or_throw() - ); + columns.push_back(kind.value().partitioned(lengths_).value_or_throw()); } if (color.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(color.value(), lengths_).value_or_throw() - ); + columns.push_back(color.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/background.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/background.hpp index eea5f84a60ef..ff20d1b10c86 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/background.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/background.hpp @@ -78,7 +78,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.cpp index 76d3649f2188..23e944494bb1 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.cpp @@ -43,43 +43,28 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(9); if (container_kind.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(container_kind.value(), lengths_) - .value_or_throw() - ); + columns.push_back(container_kind.value().partitioned(lengths_).value_or_throw()); } if (display_name.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(display_name.value(), lengths_) - .value_or_throw() - ); + columns.push_back(display_name.value().partitioned(lengths_).value_or_throw()); } if (contents.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(contents.value(), lengths_) - .value_or_throw()); + columns.push_back(contents.value().partitioned(lengths_).value_or_throw()); } if (col_shares.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(col_shares.value(), lengths_) - .value_or_throw()); + columns.push_back(col_shares.value().partitioned(lengths_).value_or_throw()); } if (row_shares.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(row_shares.value(), lengths_) - .value_or_throw()); + columns.push_back(row_shares.value().partitioned(lengths_).value_or_throw()); } if (active_tab.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(active_tab.value(), lengths_) - .value_or_throw()); + columns.push_back(active_tab.value().partitioned(lengths_).value_or_throw()); } if (visible.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(visible.value(), lengths_).value_or_throw() - ); + columns.push_back(visible.value().partitioned(lengths_).value_or_throw()); } if (grid_columns.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(grid_columns.value(), lengths_) - .value_or_throw() - ); + columns.push_back(grid_columns.value().partitioned(lengths_).value_or_throw()); } columns.push_back(ComponentColumn::from_indicators( static_cast(lengths_.size()) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.hpp index 6e9da9d0d1d7..248fbf4c85ef 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.hpp @@ -224,7 +224,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp index 99198af6dd65..d383e0fde59f 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp @@ -36,31 +36,19 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(6); if (timeline.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(timeline.value(), lengths_) - .value_or_throw()); + columns.push_back(timeline.value().partitioned(lengths_).value_or_throw()); } if (filter_by_range.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(filter_by_range.value(), lengths_) - .value_or_throw() - ); + columns.push_back(filter_by_range.value().partitioned(lengths_).value_or_throw()); } if (filter_is_not_null.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(filter_is_not_null.value(), lengths_) - .value_or_throw() - ); + columns.push_back(filter_is_not_null.value().partitioned(lengths_).value_or_throw()); } if (apply_latest_at.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(apply_latest_at.value(), lengths_) - .value_or_throw() - ); + columns.push_back(apply_latest_at.value().partitioned(lengths_).value_or_throw()); } if (select.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(select.value(), lengths_).value_or_throw() - ); + columns.push_back(select.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.hpp index 5f917f5312e5..f9f73450cde5 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.hpp @@ -143,7 +143,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_center.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_center.cpp index 818a8d91be3c..e226e284dcca 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_center.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_center.cpp @@ -21,13 +21,10 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(3); if (enabled.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(enabled.value(), lengths_).value_or_throw() - ); + columns.push_back(enabled.value().partitioned(lengths_).value_or_throw()); } if (strength.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(strength.value(), lengths_) - .value_or_throw()); + columns.push_back(strength.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_center.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_center.hpp index 17adc69677f7..76e70e2c7df8 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_center.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_center.hpp @@ -80,7 +80,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.cpp index 8029d63fe6ce..24006051d0f1 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.cpp @@ -26,17 +26,13 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(4); if (enabled.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(enabled.value(), lengths_).value_or_throw() - ); + columns.push_back(enabled.value().partitioned(lengths_).value_or_throw()); } if (strength.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(strength.value(), lengths_) - .value_or_throw()); + columns.push_back(strength.value().partitioned(lengths_).value_or_throw()); } if (iterations.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(iterations.value(), lengths_) - .value_or_throw()); + columns.push_back(iterations.value().partitioned(lengths_).value_or_throw()); } columns.push_back(ComponentColumn::from_indicators( static_cast(lengths_.size()) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.hpp index 73f01eb3fc75..b1ae28186c0e 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.hpp @@ -106,7 +106,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_link.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_link.cpp index e343efbae9c5..75f7b57d7c3f 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_link.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_link.cpp @@ -25,17 +25,13 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(4); if (enabled.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(enabled.value(), lengths_).value_or_throw() - ); + columns.push_back(enabled.value().partitioned(lengths_).value_or_throw()); } if (distance.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(distance.value(), lengths_) - .value_or_throw()); + columns.push_back(distance.value().partitioned(lengths_).value_or_throw()); } if (iterations.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(iterations.value(), lengths_) - .value_or_throw()); + columns.push_back(iterations.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_link.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_link.hpp index 5e09a8b071f9..3da3c70aed9c 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_link.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_link.hpp @@ -101,7 +101,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.cpp index 285538f2d030..6e3abe0b106d 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.cpp @@ -21,13 +21,10 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(3); if (enabled.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(enabled.value(), lengths_).value_or_throw() - ); + columns.push_back(enabled.value().partitioned(lengths_).value_or_throw()); } if (strength.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(strength.value(), lengths_) - .value_or_throw()); + columns.push_back(strength.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.hpp index daf9799c2ef6..fdb9f396db5a 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.hpp @@ -89,7 +89,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_position.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_position.cpp index 4147c1928b22..4f9fab2df62a 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_position.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_position.cpp @@ -24,17 +24,13 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(4); if (enabled.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(enabled.value(), lengths_).value_or_throw() - ); + columns.push_back(enabled.value().partitioned(lengths_).value_or_throw()); } if (strength.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(strength.value(), lengths_) - .value_or_throw()); + columns.push_back(strength.value().partitioned(lengths_).value_or_throw()); } if (position.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(position.value(), lengths_) - .value_or_throw()); + columns.push_back(position.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_position.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_position.hpp index 686d2fccd4dc..dece0e9fad64 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_position.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_position.hpp @@ -97,7 +97,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.cpp index 8c19f591c5e1..13ec7d30ca90 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.cpp @@ -28,30 +28,19 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(6); if (visible.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(visible.value(), lengths_).value_or_throw() - ); + columns.push_back(visible.value().partitioned(lengths_).value_or_throw()); } if (spacing.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(spacing.value(), lengths_).value_or_throw() - ); + columns.push_back(spacing.value().partitioned(lengths_).value_or_throw()); } if (plane.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(plane.value(), lengths_).value_or_throw() - ); + columns.push_back(plane.value().partitioned(lengths_).value_or_throw()); } if (stroke_width.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(stroke_width.value(), lengths_) - .value_or_throw() - ); + columns.push_back(stroke_width.value().partitioned(lengths_).value_or_throw()); } if (color.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(color.value(), lengths_).value_or_throw() - ); + columns.push_back(color.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.hpp index 11472c8be2de..34fb50279caa 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.hpp @@ -143,7 +143,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/map_background.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/map_background.cpp index 350045cdfd53..093b63590ac7 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/map_background.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/map_background.cpp @@ -18,8 +18,7 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(2); if (provider.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(provider.value(), lengths_) - .value_or_throw()); + columns.push_back(provider.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/map_background.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/map_background.hpp index 41b48d7b2c5a..6530befd2e31 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/map_background.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/map_background.hpp @@ -69,7 +69,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.cpp index cd92461a73e1..18f47531dc23 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.cpp @@ -18,9 +18,7 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(2); if (zoom.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(zoom.value(), lengths_).value_or_throw() - ); + columns.push_back(zoom.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.hpp index 054b6790e896..e8df93b49bf7 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.hpp @@ -68,7 +68,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/near_clip_plane.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/near_clip_plane.cpp index b3447b770abc..31a0e2937f17 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/near_clip_plane.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/near_clip_plane.cpp @@ -20,10 +20,7 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(2); if (near_clip_plane.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(near_clip_plane.value(), lengths_) - .value_or_throw() - ); + columns.push_back(near_clip_plane.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/near_clip_plane.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/near_clip_plane.hpp index 714f2bf3681d..348c4435af4a 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/near_clip_plane.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/near_clip_plane.hpp @@ -74,7 +74,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.cpp index 3e5a8492a717..f9918f36ccde 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.cpp @@ -18,9 +18,7 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(2); if (state.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(state.value(), lengths_).value_or_throw() - ); + columns.push_back(state.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.hpp index 07926c3980b5..d5184ec3b25d 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.hpp @@ -60,7 +60,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.cpp index dbe67196df4b..71f76fc390ea 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.cpp @@ -21,14 +21,10 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(3); if (corner.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(corner.value(), lengths_).value_or_throw() - ); + columns.push_back(corner.value().partitioned(lengths_).value_or_throw()); } if (visible.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(visible.value(), lengths_).value_or_throw() - ); + columns.push_back(visible.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.hpp index 0f03d1692895..8844e8e0c0c5 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.hpp @@ -83,7 +83,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.cpp index 5913964fef1b..c8227d54382c 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.cpp @@ -22,13 +22,10 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(3); if (range.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(range.value(), lengths_).value_or_throw() - ); + columns.push_back(range.value().partitioned(lengths_).value_or_throw()); } if (zoom_lock.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(zoom_lock.value(), lengths_) - .value_or_throw()); + columns.push_back(zoom_lock.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.hpp index 43f8d76d41c5..02a0b31dd479 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.hpp @@ -81,7 +81,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.cpp index 58f777ab3ed0..837862b38397 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.cpp @@ -23,17 +23,13 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(4); if (mag_filter.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(mag_filter.value(), lengths_) - .value_or_throw()); + columns.push_back(mag_filter.value().partitioned(lengths_).value_or_throw()); } if (colormap.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(colormap.value(), lengths_) - .value_or_throw()); + columns.push_back(colormap.value().partitioned(lengths_).value_or_throw()); } if (gamma.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(gamma.value(), lengths_).value_or_throw() - ); + columns.push_back(gamma.value().partitioned(lengths_).value_or_throw()); } columns.push_back(ComponentColumn::from_indicators( static_cast(lengths_.size()) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.hpp index 9d730e5976dd..2c7be029c60e 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.hpp @@ -111,7 +111,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.cpp index d20b3ba6bbf7..c474bd29a8e0 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.cpp @@ -31,24 +31,16 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(5); if (width.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(width.value(), lengths_).value_or_throw() - ); + columns.push_back(width.value().partitioned(lengths_).value_or_throw()); } if (height.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(height.value(), lengths_).value_or_throw() - ); + columns.push_back(height.value().partitioned(lengths_).value_or_throw()); } if (indices.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(indices.value(), lengths_).value_or_throw() - ); + columns.push_back(indices.value().partitioned(lengths_).value_or_throw()); } if (slider.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(slider.value(), lengths_).value_or_throw() - ); + columns.push_back(slider.value().partitioned(lengths_).value_or_throw()); } columns.push_back(ComponentColumn::from_indicators( static_cast(lengths_.size()) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.hpp index bd992dacabe6..6248d5598d81 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.hpp @@ -132,7 +132,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.cpp index 7fdfa1b38cc0..8deab3523482 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.cpp @@ -18,9 +18,7 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(2); if (scaling.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(scaling.value(), lengths_).value_or_throw() - ); + columns.push_back(scaling.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.hpp index 5d2864840db9..679187ecb863 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.hpp @@ -60,7 +60,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.cpp index 7cbba2e3bad5..3010a2a5b7fa 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.cpp @@ -28,27 +28,16 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(5); if (class_identifier.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(class_identifier.value(), lengths_) - .value_or_throw() - ); + columns.push_back(class_identifier.value().partitioned(lengths_).value_or_throw()); } if (display_name.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(display_name.value(), lengths_) - .value_or_throw() - ); + columns.push_back(display_name.value().partitioned(lengths_).value_or_throw()); } if (space_origin.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(space_origin.value(), lengths_) - .value_or_throw() - ); + columns.push_back(space_origin.value().partitioned(lengths_).value_or_throw()); } if (visible.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(visible.value(), lengths_).value_or_throw() - ); + columns.push_back(visible.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.hpp index c2988cd8ffcb..fe5097bf51e0 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.hpp @@ -135,7 +135,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.cpp index 4cd4b74f8686..e1920ff038a8 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.cpp @@ -18,9 +18,7 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(2); if (query.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(query.value(), lengths_).value_or_throw() - ); + columns.push_back(query.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.hpp index da45bc00650f..b1bb9d2390a0 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.hpp @@ -107,7 +107,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.cpp index 3a4c31e4d99d..9a9f9bf02f33 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.cpp @@ -34,31 +34,21 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(6); if (root_container.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(root_container.value(), lengths_) - .value_or_throw() - ); + columns.push_back(root_container.value().partitioned(lengths_).value_or_throw()); } if (maximized.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(maximized.value(), lengths_) - .value_or_throw()); + columns.push_back(maximized.value().partitioned(lengths_).value_or_throw()); } if (auto_layout.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(auto_layout.value(), lengths_) - .value_or_throw() - ); + columns.push_back(auto_layout.value().partitioned(lengths_).value_or_throw()); } if (auto_views.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(auto_views.value(), lengths_) - .value_or_throw()); + columns.push_back(auto_views.value().partitioned(lengths_).value_or_throw()); } if (past_viewer_recommendations.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths( - past_viewer_recommendations.value(), - lengths_ - ) - .value_or_throw()); + columns.push_back( + past_viewer_recommendations.value().partitioned(lengths_).value_or_throw() + ); } columns.push_back(ComponentColumn::from_indicators( static_cast(lengths_.size()) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.hpp index cb9159711713..c034c85be200 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.hpp @@ -165,7 +165,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.cpp index 4f89a5a0910c..977bd9541baa 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.cpp @@ -18,9 +18,7 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(2); if (ranges.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(ranges.value(), lengths_).value_or_throw() - ); + columns.push_back(ranges.value().partitioned(lengths_).value_or_throw()); } columns.push_back(ComponentColumn::from_indicators( static_cast(lengths_.size()) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.hpp index a292b1d1760e..c92a14f71e1e 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.hpp @@ -81,7 +81,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.cpp index b91bd036f5e9..2cf1f99709cd 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.cpp @@ -18,9 +18,7 @@ namespace rerun::blueprint::archetypes { std::vector columns; columns.reserve(2); if (range.has_value()) { - columns.push_back( - ComponentColumn::from_batch_with_lengths(range.value(), lengths_).value_or_throw() - ); + columns.push_back(range.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.hpp b/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.hpp index 40be6ebe1607..4608d2b19d39 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.hpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.hpp @@ -74,7 +74,7 @@ namespace rerun::blueprint::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/src/rerun/component_batch.cpp b/rerun_cpp/src/rerun/component_batch.cpp index 931946cf039b..25964cc47663 100644 --- a/rerun_cpp/src/rerun/component_batch.cpp +++ b/rerun_cpp/src/rerun/component_batch.cpp @@ -1,4 +1,5 @@ #include "component_batch.hpp" +#include "component_column.hpp" #include #include @@ -6,6 +7,60 @@ #include "c/rerun.h" namespace rerun { + /// Creates a new component batch from a collection of component instances. + /// + /// Automatically registers the component type the first time this type is encountered. + Result ComponentBatch::from_arrow_array( + std::shared_ptr array, const ComponentDescriptor& descriptor + ) { + static std::unordered_map + comp_types_per_descr; + + ComponentTypeHandle comp_type_handle; + + auto descr_hash = descriptor.hashed(); + + auto search = comp_types_per_descr.find(descr_hash); + if (search != comp_types_per_descr.end()) { + comp_type_handle = search->second; + } else { + auto comp_type = ComponentType(descriptor, array->type()); + + const Result comp_type_handle_result = + comp_type.register_component(); + RR_RETURN_NOT_OK(comp_type_handle_result.error); + + comp_type_handle = comp_type_handle_result.value; + comp_types_per_descr.insert({descr_hash, comp_type_handle}); + } + + ComponentBatch component_batch; + component_batch.array = std::move(array); + component_batch.component_type = comp_type_handle; + return component_batch; + } + + Result ComponentBatch::partitioned(const Collection& lengths) && { + // Can't define this method in the header because it needs to know about `ComponentColumn`. + return ComponentColumn::from_batch_with_lengths(std::move(*this), lengths); + } + + Result ComponentBatch::partitioned() && { + // Can't define this method in the header because it needs to know about `ComponentColumn`. + return std::move(*this).partitioned(std::vector(length(), 1)); + } + + Result ComponentBatch::partitioned(const Collection& lengths + ) const& { + // Can't define this method in the header because it needs to know about `ComponentColumn`. + return ComponentColumn::from_batch_with_lengths(*this, lengths); + } + + Result ComponentBatch::partitioned() const& { + // Can't define this method in the header because it needs to know about `ComponentColumn`. + return partitioned(std::vector(length(), 1)); + } + Error ComponentBatch::to_c_ffi_struct(rr_component_batch& out_component_batch) const { if (array == nullptr) { return Error(ErrorCode::UnexpectedNullArgument, "array is null"); diff --git a/rerun_cpp/src/rerun/component_batch.hpp b/rerun_cpp/src/rerun/component_batch.hpp index 37eef13f1f60..f2d62469d9dd 100644 --- a/rerun_cpp/src/rerun/component_batch.hpp +++ b/rerun_cpp/src/rerun/component_batch.hpp @@ -17,6 +17,10 @@ namespace arrow { struct rr_component_batch; +namespace rerun { + struct ComponentColumn; +} + namespace rerun { /// Arrow-encoded data of a single batch of components together with a component descriptor. /// @@ -37,55 +41,27 @@ namespace rerun { /// Creates a new component batch from a collection of component instances. /// - /// Automatically registers the component type the first time this type is encountered. + /// Automatically registers the descriptor the first time it is encountered. template static Result from_loggable( const rerun::Collection& components, const ComponentDescriptor& descriptor = rerun::Loggable::Descriptor - ) { static_assert( rerun::is_loggable, "The given type does not implement the rerun::Loggable trait." ); - // The template is over the `Loggable` itself, but a single `Loggable` might have any number of - // descriptors/tags associated with it, therefore a static `ComponentTypeHandle` is not enough, - // we need a map. - static std::unordered_map - comp_types_per_descr; - - ComponentTypeHandle comp_type_handle; - - auto descr_hash = descriptor.hashed(); - - auto search = comp_types_per_descr.find(descr_hash); - if (search != comp_types_per_descr.end()) { - comp_type_handle = search->second; - } else { - auto comp_type = ComponentType(descriptor, Loggable::arrow_datatype()); - - const Result comp_type_handle_result = - comp_type.register_component(); - RR_RETURN_NOT_OK(comp_type_handle_result.error); - - comp_type_handle = comp_type_handle_result.value; - comp_types_per_descr.insert({descr_hash, comp_type_handle}); - } - /// TODO(#4257) should take a rerun::Collection instead of pointer and size. auto array = Loggable::to_arrow(components.data(), components.size()); RR_RETURN_NOT_OK(array.error); - ComponentBatch component_batch; - component_batch.array = std::move(array.value); - component_batch.component_type = comp_type_handle; - return component_batch; + return from_arrow_array(std::move(array.value), descriptor); } /// Creates a new component batch from a single component instance. /// - /// Automatically registers the component type the first time this type is encountered. + /// Automatically registers the descriptor the first time it is encountered. template static Result from_loggable( const T& component, @@ -100,7 +76,7 @@ namespace rerun { /// /// None is represented as a data cell with 0 instances. /// - /// Automatically registers the component type the first time this type is encountered. + /// Automatically registers the descriptor the first time it is encountered. template static Result from_loggable( const std::optional& component, @@ -117,7 +93,7 @@ namespace rerun { /// /// None is represented as a data cell with 0 instances. /// - /// Automatically registers the component type the first time this type is encountered. + /// Automatically registers the descriptor the first time it is encountered. template static Result from_loggable( const std::optional>& components, @@ -139,6 +115,46 @@ namespace rerun { ); } + /// Creates a new component batch from an already existing arrow array. + /// + /// Automatically registers the descriptor the first time it is encountered. + static Result from_arrow_array( + std::shared_ptr array, const ComponentDescriptor& descriptor + ); + + /// Partitions the component data into multiple sub-batches. + /// + /// Specifically, this transforms the existing `ComponentBatch` data into a `ComponentColumn`. + /// + /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. + /// + /// \param 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. + Result partitioned(const Collection& lengths) &&; + + /// Partitions the component data into unit-length sub-batches. + /// + /// Specifically, this transforms the existing `ComponentBatch` data into a `ComponentColumn`. + /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. + Result partitioned() &&; + + /// Partitions the component data into multiple sub-batches. + /// + /// Specifically, this transforms the existing `ComponentBatch` data into a `ComponentColumn`. + /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. + /// + /// \param 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. + Result partitioned(const Collection& lengths) const&; + + /// Partitions the component data into unit-length sub-batches. + /// + /// Specifically, this transforms the existing `ComponentBatch` data into a `ComponentColumn`. + /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. + Result partitioned() const&; + /// Size in the number of elements the underlying arrow array contains. size_t length() const; diff --git a/rerun_cpp/tests/generated/archetypes/affix_fuzzer1.cpp b/rerun_cpp/tests/generated/archetypes/affix_fuzzer1.cpp index 617686ec3679..cc3c7b106a72 100644 --- a/rerun_cpp/tests/generated/archetypes/affix_fuzzer1.cpp +++ b/rerun_cpp/tests/generated/archetypes/affix_fuzzer1.cpp @@ -81,92 +81,70 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(23); if (fuzz1001.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1001.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1001.value().partitioned(lengths_).value_or_throw()); } if (fuzz1002.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1002.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1002.value().partitioned(lengths_).value_or_throw()); } if (fuzz1003.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1003.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1003.value().partitioned(lengths_).value_or_throw()); } if (fuzz1004.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1004.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1004.value().partitioned(lengths_).value_or_throw()); } if (fuzz1005.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1005.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1005.value().partitioned(lengths_).value_or_throw()); } if (fuzz1006.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1006.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1006.value().partitioned(lengths_).value_or_throw()); } if (fuzz1007.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1007.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1007.value().partitioned(lengths_).value_or_throw()); } if (fuzz1008.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1008.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1008.value().partitioned(lengths_).value_or_throw()); } if (fuzz1009.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1009.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1009.value().partitioned(lengths_).value_or_throw()); } if (fuzz1010.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1010.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1010.value().partitioned(lengths_).value_or_throw()); } if (fuzz1011.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1011.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1011.value().partitioned(lengths_).value_or_throw()); } if (fuzz1012.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1012.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1012.value().partitioned(lengths_).value_or_throw()); } if (fuzz1013.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1013.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1013.value().partitioned(lengths_).value_or_throw()); } if (fuzz1014.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1014.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1014.value().partitioned(lengths_).value_or_throw()); } if (fuzz1015.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1015.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1015.value().partitioned(lengths_).value_or_throw()); } if (fuzz1016.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1016.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1016.value().partitioned(lengths_).value_or_throw()); } if (fuzz1017.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1017.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1017.value().partitioned(lengths_).value_or_throw()); } if (fuzz1018.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1018.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1018.value().partitioned(lengths_).value_or_throw()); } if (fuzz1019.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1019.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1019.value().partitioned(lengths_).value_or_throw()); } if (fuzz1020.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1020.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1020.value().partitioned(lengths_).value_or_throw()); } if (fuzz1021.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1021.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1021.value().partitioned(lengths_).value_or_throw()); } if (fuzz1022.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1022.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1022.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/tests/generated/archetypes/affix_fuzzer1.hpp b/rerun_cpp/tests/generated/archetypes/affix_fuzzer1.hpp index 6d51e12efa4a..71616cdb5997 100644 --- a/rerun_cpp/tests/generated/archetypes/affix_fuzzer1.hpp +++ b/rerun_cpp/tests/generated/archetypes/affix_fuzzer1.hpp @@ -665,7 +665,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/tests/generated/archetypes/affix_fuzzer2.cpp b/rerun_cpp/tests/generated/archetypes/affix_fuzzer2.cpp index d79cc8f01a67..de90b17fcb6f 100644 --- a/rerun_cpp/tests/generated/archetypes/affix_fuzzer2.cpp +++ b/rerun_cpp/tests/generated/archetypes/affix_fuzzer2.cpp @@ -72,80 +72,61 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(20); if (fuzz1101.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1101.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1101.value().partitioned(lengths_).value_or_throw()); } if (fuzz1102.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1102.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1102.value().partitioned(lengths_).value_or_throw()); } if (fuzz1103.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1103.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1103.value().partitioned(lengths_).value_or_throw()); } if (fuzz1104.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1104.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1104.value().partitioned(lengths_).value_or_throw()); } if (fuzz1105.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1105.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1105.value().partitioned(lengths_).value_or_throw()); } if (fuzz1106.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1106.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1106.value().partitioned(lengths_).value_or_throw()); } if (fuzz1107.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1107.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1107.value().partitioned(lengths_).value_or_throw()); } if (fuzz1108.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1108.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1108.value().partitioned(lengths_).value_or_throw()); } if (fuzz1109.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1109.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1109.value().partitioned(lengths_).value_or_throw()); } if (fuzz1110.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1110.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1110.value().partitioned(lengths_).value_or_throw()); } if (fuzz1111.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1111.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1111.value().partitioned(lengths_).value_or_throw()); } if (fuzz1112.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1112.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1112.value().partitioned(lengths_).value_or_throw()); } if (fuzz1113.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1113.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1113.value().partitioned(lengths_).value_or_throw()); } if (fuzz1114.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1114.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1114.value().partitioned(lengths_).value_or_throw()); } if (fuzz1115.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1115.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1115.value().partitioned(lengths_).value_or_throw()); } if (fuzz1116.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1116.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1116.value().partitioned(lengths_).value_or_throw()); } if (fuzz1117.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1117.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1117.value().partitioned(lengths_).value_or_throw()); } if (fuzz1118.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1118.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1118.value().partitioned(lengths_).value_or_throw()); } if (fuzz1122.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz1122.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz1122.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/tests/generated/archetypes/affix_fuzzer2.hpp b/rerun_cpp/tests/generated/archetypes/affix_fuzzer2.hpp index ff3b2a6d05ee..08470a50e240 100644 --- a/rerun_cpp/tests/generated/archetypes/affix_fuzzer2.hpp +++ b/rerun_cpp/tests/generated/archetypes/affix_fuzzer2.hpp @@ -389,7 +389,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/tests/generated/archetypes/affix_fuzzer3.cpp b/rerun_cpp/tests/generated/archetypes/affix_fuzzer3.cpp index 62049f28693c..4ec95edf0631 100644 --- a/rerun_cpp/tests/generated/archetypes/affix_fuzzer3.cpp +++ b/rerun_cpp/tests/generated/archetypes/affix_fuzzer3.cpp @@ -69,76 +69,58 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(19); if (fuzz2001.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2001.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2001.value().partitioned(lengths_).value_or_throw()); } if (fuzz2002.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2002.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2002.value().partitioned(lengths_).value_or_throw()); } if (fuzz2003.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2003.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2003.value().partitioned(lengths_).value_or_throw()); } if (fuzz2004.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2004.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2004.value().partitioned(lengths_).value_or_throw()); } if (fuzz2005.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2005.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2005.value().partitioned(lengths_).value_or_throw()); } if (fuzz2006.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2006.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2006.value().partitioned(lengths_).value_or_throw()); } if (fuzz2007.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2007.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2007.value().partitioned(lengths_).value_or_throw()); } if (fuzz2008.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2008.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2008.value().partitioned(lengths_).value_or_throw()); } if (fuzz2009.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2009.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2009.value().partitioned(lengths_).value_or_throw()); } if (fuzz2010.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2010.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2010.value().partitioned(lengths_).value_or_throw()); } if (fuzz2011.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2011.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2011.value().partitioned(lengths_).value_or_throw()); } if (fuzz2012.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2012.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2012.value().partitioned(lengths_).value_or_throw()); } if (fuzz2013.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2013.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2013.value().partitioned(lengths_).value_or_throw()); } if (fuzz2014.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2014.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2014.value().partitioned(lengths_).value_or_throw()); } if (fuzz2015.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2015.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2015.value().partitioned(lengths_).value_or_throw()); } if (fuzz2016.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2016.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2016.value().partitioned(lengths_).value_or_throw()); } if (fuzz2017.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2017.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2017.value().partitioned(lengths_).value_or_throw()); } if (fuzz2018.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2018.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2018.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/tests/generated/archetypes/affix_fuzzer3.hpp b/rerun_cpp/tests/generated/archetypes/affix_fuzzer3.hpp index efe3ee9a6ae0..fdabea2c31f3 100644 --- a/rerun_cpp/tests/generated/archetypes/affix_fuzzer3.hpp +++ b/rerun_cpp/tests/generated/archetypes/affix_fuzzer3.hpp @@ -503,7 +503,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. /// diff --git a/rerun_cpp/tests/generated/archetypes/affix_fuzzer4.cpp b/rerun_cpp/tests/generated/archetypes/affix_fuzzer4.cpp index eb1c13b08a18..7ac1403116cc 100644 --- a/rerun_cpp/tests/generated/archetypes/affix_fuzzer4.cpp +++ b/rerun_cpp/tests/generated/archetypes/affix_fuzzer4.cpp @@ -69,76 +69,58 @@ namespace rerun::archetypes { std::vector columns; columns.reserve(19); if (fuzz2101.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2101.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2101.value().partitioned(lengths_).value_or_throw()); } if (fuzz2102.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2102.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2102.value().partitioned(lengths_).value_or_throw()); } if (fuzz2103.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2103.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2103.value().partitioned(lengths_).value_or_throw()); } if (fuzz2104.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2104.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2104.value().partitioned(lengths_).value_or_throw()); } if (fuzz2105.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2105.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2105.value().partitioned(lengths_).value_or_throw()); } if (fuzz2106.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2106.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2106.value().partitioned(lengths_).value_or_throw()); } if (fuzz2107.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2107.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2107.value().partitioned(lengths_).value_or_throw()); } if (fuzz2108.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2108.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2108.value().partitioned(lengths_).value_or_throw()); } if (fuzz2109.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2109.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2109.value().partitioned(lengths_).value_or_throw()); } if (fuzz2110.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2110.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2110.value().partitioned(lengths_).value_or_throw()); } if (fuzz2111.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2111.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2111.value().partitioned(lengths_).value_or_throw()); } if (fuzz2112.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2112.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2112.value().partitioned(lengths_).value_or_throw()); } if (fuzz2113.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2113.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2113.value().partitioned(lengths_).value_or_throw()); } if (fuzz2114.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2114.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2114.value().partitioned(lengths_).value_or_throw()); } if (fuzz2115.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2115.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2115.value().partitioned(lengths_).value_or_throw()); } if (fuzz2116.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2116.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2116.value().partitioned(lengths_).value_or_throw()); } if (fuzz2117.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2117.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2117.value().partitioned(lengths_).value_or_throw()); } if (fuzz2118.has_value()) { - columns.push_back(ComponentColumn::from_batch_with_lengths(fuzz2118.value(), lengths_) - .value_or_throw()); + columns.push_back(fuzz2118.value().partitioned(lengths_).value_or_throw()); } columns.push_back( ComponentColumn::from_indicators(static_cast(lengths_.size())) diff --git a/rerun_cpp/tests/generated/archetypes/affix_fuzzer4.hpp b/rerun_cpp/tests/generated/archetypes/affix_fuzzer4.hpp index edd525bb5032..2aaf6a500f9a 100644 --- a/rerun_cpp/tests/generated/archetypes/affix_fuzzer4.hpp +++ b/rerun_cpp/tests/generated/archetypes/affix_fuzzer4.hpp @@ -314,7 +314,7 @@ namespace rerun::archetypes { /// Partitions the component data into multiple sub-batches. /// /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s - /// instead, via `ComponentColumn::from_batch_with_lengths`. + /// instead, via `ComponentBatch::partitioned`. /// /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun. ///