Dandandan commented on a change in pull request #9926:
URL: https://github.com/apache/arrow/pull/9926#discussion_r608763634



##########
File path: rust/datafusion/src/physical_plan/limit.rs
##########
@@ -236,23 +245,29 @@ impl Stream for LimitStream {
         mut self: Pin<&mut Self>,
         cx: &mut Context<'_>,
     ) -> Poll<Option<Self::Item>> {
-        self.input.poll_next_unpin(cx).map(|x| match x {
-            Some(Ok(batch)) => Ok(self.stream_limit(batch)).transpose(),
-            other => other,
-        })
+        match &mut self.input {

Review comment:
       As far as I understand it now, it can consist of the whole tree of 
dependent streams. Probably still not a big resource hog but more than a few 
bytes.




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

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


Reply via email to