fix: preserve NULL semantics in log and power simplification - #24247
Open
lyne7-sc wants to merge 1 commit into
Open
fix: preserve NULL semantics in log and power simplification#24247lyne7-sc wants to merge 1 commit into
log and power simplification#24247lyne7-sc wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #24247 +/- ##
==========================================
- Coverage 81.06% 81.01% -0.05%
==========================================
Files 1106 1106
Lines 382252 383982 +1730
Branches 382252 383982 +1730
==========================================
+ Hits 309861 311080 +1219
- Misses 54083 54561 +478
- Partials 18308 18341 +33 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
alamb
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
logandpowersimplifications removed a nullable base expression, which could incorrectly produce a non-NULL result when the base was NULL.For example:
These expressions should both return NULL, but simplification could replace them with 0.0 and 1.0.
What changes are included in this PR?
only apply these simplifications when the removed base expression is non-nullable.
Are these changes tested?
Yes. Added sqllogictests covering results and plans.
Are there any user-facing changes?
Yes. log and power expressions with nullable bases now correctly preserve NULLs.