zhangfengcdt opened a new pull request, #7804: URL: https://github.com/apache/datafusion-comet/pull/7804
## Which issue does this PR close? No issue. Split out of #7316 at review. ## Rationale for this change `execute_plan` pulls the next JVM batch into every scan before it polls the plan. When a limit is already met by rows from the previous batch, that reads one more batch from the JVM than the query needs, and if reading it fails, the query fails. ## What changes are included in this PR? `execute_plan` no longer pulls before polling. It pulls only when a poll returns `Pending`, which `next_batch` already handles. ## How are these changes tested? New test in `CometExecIteratorLifecycleSuite`: a limit of 3 over a scan whose first batch has 10 rows, where reading a second batch throws. It fails before this change and passes with it. -- 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]
