2010YOUY01 commented on code in PR #23828:
URL: https://github.com/apache/datafusion/pull/23828#discussion_r3793759010


##########
datafusion/physical-plan/src/joins/asof_join.rs:
##########
@@ -997,21 +1000,23 @@ impl AsOfJoinStreamState {
     ///   emit the left row with the candidate (or NULLs), then advance left
     /// flush pending rows without resetting either cursor or the candidate
     /// ```
-    async fn next_batch(&mut self) -> Result<Option<RecordBatch>> {
+    fn poll_next_impl(

Review Comment:
   I haven't fully figure out what's the best practice to implement the state 
machines to make them easy to read and extend, probably it is:
   - generator pattern https://github.com/apache/datafusion/issues/23974
   - If we need to draw a state machine to understand its mechanism, then use 
explicit state management like 
https://github.com/apache/datafusion/blob/9a83691aadaadbf72bf4c8b7d87bd28af9dc68dd/datafusion/physical-plan/src/aggregates/hash_stream.rs#L175
   
   Not an issue for now, we could experiment in the future.
   
   



-- 
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