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



##########
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:
       Imagine it is actually a subquery with a group by hash or join with a 
large hash table :) It may actually be hanging on to a substantial amount of 
memory I suspect




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