rluvaton commented on code in PR #23976:
URL: https://github.com/apache/datafusion/pull/23976#discussion_r3686530474
##########
datafusion/physical-plan/src/joins/sort_merge_join/materializing_stream.rs:
##########
@@ -995,15 +984,12 @@ impl MaterializingSortMergeJoinStream {
let bb = &mut self.buffered_data.batches[idx];
if let BufferedBatchState::Spilled(spill_file) = &bb.batch {
- if self.spill_stream.is_none() {
- let stream = self
- .spill_manager
- .read_spill_as_stream(Arc::clone(spill_file), None)?;
- self.spill_stream = Some(stream);
- }
+ let mut spill_stream = self
+ .spill_manager
+ .read_spill_as_stream(Arc::clone(spill_file), None)?;
- match
ready!(self.spill_stream.as_mut().unwrap().poll_next_unpin(cx)) {
- Some(Ok(batch)) => {
+ match spill_stream.next().await.transpose()? {
Review Comment:
done
--
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]