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

   ## Which issue does this PR close?
   
   - #24962(https://github.com/apache/datafusion/issues/24962)
   
   ## Rationale for this change
   
   `HashJoinExec` and `NestedLoopJoinExec` report `LeftSemi` joins as emitting 
incrementally, but they only emit matched build-side rows after the probe
   side is exhausted.
   
   Reporting `EmissionType::Final` reflects their actual behavior and allows 
`SanityCheckPlan` to reject pipelines with an unbounded probe side that cannot 
produce output.
   
   ## What changes are included in this PR?
   
   - Classify `LeftSemi` joins as `EmissionType::Final` in both operators, 
regardless of the probe input's emission type.
   - Added unit tests verifying the emission type of LeftSemi joins in both 
`HashJoinExec` and `NestedLoopJoinExec`.
   - Add an integration test covering input swapping for an unbounded left
     input, rejection of an unbounded probe input, and successful planning when
     both inputs are bounded.
   
   ## Are these changes tested?
   
   Added unit tests verifying the emission type of LeftSemi joins in both 
`HashJoinExec` and `NestedLoopJoinExec`.
   
   Added an integration test covering:
   - Unbounded left and bounded right: planning succeeds after swapping to
       RightSemi.
   - Bounded left and unbounded right: planning is rejected.
   - Both inputs bounded: planning succeeds.
   
   Following test commands have been executed and passed
   
   - `cargo test -p datafusion`
   - `cargo test --profile=ci --test sqllogictests`
   - `cargo test -p datafusion`
   - `cargo test -p datafusion-cli`
     
   ## Are there any user-facing changes?
   
   Yes. 
   
   `LeftSemi` hash and nested loop joins now report Final emission.
   
   Plans with a bounded build side and an unbounded probe side are rejected 
instead of being accepted despite being unable to produce output.
   
   Results for bounded inputs are unchanged.


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