blinding-pixels opened a new pull request, #24244:
URL: https://github.com/apache/datafusion/pull/24244

   ## Which issue does this PR close?
   
   - Closes #24096
   
   ## Rationale for this change
   
   When aggregate CSE extracts a repeated truth check, the logical and physical 
plans assign different nullability metadata to it, causing planning to fail. 
Since these truth checks always return either true or false, the physical plan 
should mark them as non-nullable.
   
   ## What changes are included in this PR?
   
   This PR updates physical `BinaryExpr` nullability so `IS DISTINCT FROM` and 
`IS NOT DISTINCT FROM` are always reported as non-nullable.
   
   It also adds a focused unit-test matrix and a SQL logic regression covering 
the aggregate CSE path reported in the issue.
   
   ## Are these changes tested?
   
   Yes. The tests cover both distinctness operators, ordinary equality as a 
control, and the reported aggregate query.
   
   Formatting, Clippy, focused tests, and the extended workspace test suite all 
pass.
   
   ## Are there any user-facing changes?
   
   Yes. Affected queries using repeated truth checks on nullable Boolean values 
now plan and execute instead of failing with a logical/physical schema mismatch.
   
   There are no public 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