Aaravkhanal opened a new pull request, #27750:
URL: https://github.com/apache/datafusion/pull/27750

   ## Which issue does this PR close?
   
   Closes #27726.
   
   ## Rationale for this change
   
   A hash join with a pushed-down limit can keep reading probe batches after it 
has found enough rows when the build map is empty.
   
   ## What changes are included in this PR?
   
   Finish the output buffer when this path reaches the fetch limit. This 
flushes buffered rows and stops the stream before it polls the probe input 
again.
   
   ## What is the testing strategy for this PR?
   
   The regression test covers a right anti join with an empty build input and a 
build input containing only a NULL key. It checks the returned rows and makes 
the next probe poll fail. The test reproduced the extra poll before the fix and 
passed afterward. All 3,070 physical-plan unit tests and crate-level Clippy 
passed locally. Workspace-wide Clippy was stopped when the workstation ran low 
on disk.
   
   ## Are there any user-facing changes?
   
   Affected queries stop scanning the probe input once the limit is satisfied.
   
   @mbutrovich, could you approve the first-time contributor CI runs when you 
have a chance?
   
   Assisted-by: OpenAI Codex
   


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

Reply via email to