-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New types and traits for (co-existing!) eager serialization #8642
base: main
Are you sure you want to change the base?
Conversation
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
Latest documentation preview deployed successfully.
Note: This comment is updated whenever you push a commit. |
@@ -34,7 +33,37 @@ pub trait AsComponents { | |||
// | |||
// NOTE: Don't bother returning a CoW here: we need to dynamically discard optional components | |||
// depending on their presence (or lack thereof) at runtime anyway. | |||
fn as_component_batches(&self) -> Vec<ComponentBatchCowWithDescriptor<'_>>; | |||
#[deprecated(since = "0.22.0", note = "use as_serialized_batches instead")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's worth to also change the docstring to DEPRECATED - DO NOT USE
or similar.
/// | ||
/// # Fallibility | ||
/// | ||
/// There are very few ways in which serialization can fail, all of which are very rare to hit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still worth mentioning a few of the ways it can fail (e.g. overflowing an i32
)
This introduces
SerializedComponentBatch
, which will become the main type we use to carry user data around internally.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.