nuno-faria commented on code in PR #19362:
URL: https://github.com/apache/datafusion/pull/19362#discussion_r2624625301
##########
datafusion/physical-plan/src/memory.rs:
##########
@@ -144,6 +144,9 @@ pub trait LazyBatchGenerator: Send + Sync + fmt::Debug +
fmt::Display {
/// Generate the next batch, return `None` when no more batches are
available
fn generate_next_batch(&mut self) -> Result<Option<RecordBatch>>;
+
+ /// Returns a new instance with the state reset.
+ fn reset_state(&self) -> Arc<RwLock<dyn LazyBatchGenerator>>;
Review Comment:
I don't know if there is a better way to define this method. Returning a
`Box<>` might be better, but then I don't think it's possible to move it to
`Arc<RwLock<>>`.
--
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]