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

    ## Which issue does this PR close?                                          
                                                                                
                      
      
     Related to: https://github.com/apache/datafusion/issues/13232              
                                                                                
           
                                                               
     ## Rationale for this change
   `EliminateOuterJoin` converts LEFT/RIGHT/FULL joins to INNER joins when 
WHERE clause predicates are null-rejecting. The `extract_non_nullable_columns` 
function recognizes specific expression types but was missing several common 
ones: `LIKE`, `IS TRUE`, `IS FALSE`, and `IS NOT UNKNOWN`.
   
     All of these are null-rejecting:
     - `NULL LIKE pattern` → NULL (filtered out)
     - `NULL IS TRUE` → false (filtered out)
     - `NULL IS FALSE` → false (filtered out)
     - `NULL IS NOT UNKNOWN` → false (filtered out)
   
     Note: `IS NOT TRUE`, `IS NOT FALSE`, and `IS UNKNOWN` are intentionally 
**not** added — they return true for NULL input, so they are not null-rejecting.
   
     ## What changes are included in this PR?
   
     Added match arms in `extract_non_nullable_columns` for:
     - `Expr::Like`
     - `Expr::IsTrue` / `Expr::IsFalse` / `Expr::IsNotUnknown`
   
     ## Are these changes tested?
   
     Yes — 7 new unit tests:
     - 5 positive cases verifying outer → inner conversion (Like, IsTrue, 
IsFalse, IsNotUnknown)
     - 2 negative cases verifying outer join is preserved (IsNotTrue, IsUnknown)
   
     ## Are there any user-facing changes?
   
     No API changes.


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