-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New types and traits for (co-existing!) eager serialization (#8642)
This introduces `SerializedComponentBatch`, which will become the main type we use to carry user data around internally. ```rust /// The serialized contents of a [`ComponentBatch`] with associated [`ComponentDescriptor`]. /// /// This is what gets logged into Rerun: /// * See [`ComponentBatch`] to easily serialize component data. /// * See [`AsComponents`] for logging serialized data. /// /// [`AsComponents`]: [crate::AsComponents] #[derive(Debug, Clone)] pub struct SerializedComponentBatch { pub array: arrow::array::ArrayRef, // TODO(cmc): Maybe Cow<> this one if it grows bigger. Or intern descriptors altogether, most likely. pub descriptor: ComponentDescriptor, } ``` The goal is to keep the `ComponentBatch` trait isolated at the edge, where it is used as a means of easily converting any data into arrow arrays, instead of simultaneously being used as a means of transporting data around through the internals. `ComponentBatch` is here to stay, if only for its conversion capabilities. This opens a lot of opportunities of improvements in terms of DX, UX and future features (e.g. generics). The two code paths will co-exist for the foreseeable future, until all archetypes have been made eager. * Part of #7245
- Loading branch information
Showing
11 changed files
with
420 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.