alamb commented on a change in pull request #9897:
URL: https://github.com/apache/arrow/pull/9897#discussion_r608659790
##########
File path: rust/datafusion/src/execution/context.rs
##########
@@ -1721,6 +1721,46 @@ mod tests {
Ok(())
}
+ #[tokio::test]
+ async fn limit() -> Result<()> {
+ let tmp_dir = TempDir::new()?;
+ let mut ctx = create_ctx(&tmp_dir, 1)?;
+ ctx.register_table("t", table_with_sequence(1, 1000).unwrap())
Review comment:
> I was looking at Limit yesterday - it seems to poll new batches even
when the limit has been reached (and throw away the result in the end)? Not
wrong - but quite inefficient of course :)
@Dandandan I spent some time looking into this and you were absolutely
correct. I have a PR (draft) up with a proposed fix:
https://github.com/apache/arrow/pull/9926
--
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]