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

    ## Which issue does this PR close?                                          
                                                                                
                      
                                                                                
                                                                                
                       
     - [Closes](https://github.com/apache/datafusion/issues/21597)              
                                                                                
                                                          
                                                                                
                                                                                
                       
     ## Rationale for this change                                               
                                                                                
                       
   
   Today, `EliminateOuterJoin` uses `extract_non_nullable_columns()` with 
explicit pattern matching for each `Expr` variant to determine if a WHERE 
predicate rejects NULL rows.  Every new expression type (LIKE, IS TRUE, etc.) 
must be added manually to this function. This is brittle and doesn't scale.
   
   This PR introduces `is_null` and `is_not_true` trait methods on 
`PhysicalExpr`, so each expression type defines its own null-rejection 
behavior. This also enables future use in  parquet pruning at the physical 
layer.
                                                                                
                                                                                
                       
     ## What changes are included in this PR?                                   
                                                                                
                       
      
     **New trait methods on `PhysicalExpr`:**                                   
                                                                                
                       
     - `is_null(null_columns) -> Option<bool>`: returns whether the expression 
is guaranteed to evaluate to NULL when the given columns are NULL
     - `is_not_true(null_columns) -> Option<bool>`: returns whether the 
expression is guaranteed to evaluate to NULL or FALSE when the given columns 
are NULL                                        
                                                                                
                                                                                
                       
     ## Are these changes tested?                                               
                                                                                
                       
                                                                                
                                                                                
                       
     Yes, with UT
                                                                                
                                                                                
                       
     ## Are there any user-facing changes?                                      
                                                                                
                       
                                                                                
                                                                                
                       
     No


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