ameyc opened a new issue, #11369:
URL: https://github.com/apache/datafusion/issues/11369

   ### 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](https://github.com/probably-nothing-labs/arrow-datafusion/pull/22/files)
 for this.
   
   Would love to hear feedback from the community on this proposal.
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to