Commits

Andrew Lamb authored 6ddaaa87798
ARROW-12254: [Rust][DataFusion] Stop polling limit input once limit is reached # Rationale Once the number of rows needed for a limit query has been produced, any further work done to read values from its input is wasted. The current implementation of LimitStream will keep polling its input for the next value, and returning `Poll::Ready(None)` , even once the limit has been reached For queries like `select * from foo limit 10` used for initial data exploration this is very wasteful. # Changes This PR changes `LimitStream` so that it drops its input once the limit has been reached -- this both potentially frees resources (memory, file handles, etc) it also avoids unnecessary computation Closes #9926 from alamb/alamb/limit_less_run Authored-by: Andrew Lamb <andrew@nerdnetworks.org> Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>