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

   ## Which issue does this PR close?
   
   - Closes #22457
   
   ## Rationale for this change
   
   `Operator::returns_null_on_null()` incorrectly claimed that the string 
concatenation operator (`||`) treats NULL input as the empty string; it does 
not. (Note that the `concat()` _function_ has the NULL->empty string behavior, 
but the operator does not.)
   
   While we're here, also teach `Operator::negate()` that 
`Operator::RegexMatch` and `Operator::RegexNotMatch` are pairs, and the same 
for the case-insensitive versions.
   
   ## What changes are included in this PR?
   
   * Teach `Operator::returns_null_on_null()` that `||` returns NULL on NULL 
inputs
   * Teach `Operator::negate()` that `Operator::RegexMatch` and 
`Operator::RegexNotMatch` are pairs; same for case-insensitive versions
   * Fix typos in comments
   * Add tests for new behavior
   
   ## Are these changes tested?
   
   Yes; new tests added.
   
   ## Are there any user-facing changes?
   
   Yes, but minor: expression simplification, outer join elimination, and other 
optimizer can take advantage of this to optimize queries a bit more effectively.
   


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