-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
When running continuous computations, we'd like to snapshot the state of our operators many of which use accumulators. This would be key to make computations over continuous streams a first class citizen in DataFusion (see #11365 ).
Describe the solution you'd like
Addition of a SerializableAccumulator trait -
pub trait SerializableAccumulator: Accumulator {
fn serialize(&self) -> Result<Vec<u8>>;
fn deserialize(bytes: &[u8]) -> Result<Box<dyn Accumulator>>
where
Self: Sized;
}
as well as a method on the Accumulator trait -
fn as_serializable(&self) -> Option<&dyn SerializableAccumulator> {
None
}
This would mean ScalarValue also needs to implement serialization to [u8]. We have a POC PR on our fork of DataFusion for this.
Would love to hear feedback from the community on this proposal.
Describe alternatives you've considered
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request