Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(frontend/expr): boolean constant folding for (Is, IsNot) x (True, False, Null) #2265

Merged
merged 7 commits into from
May 3, 2022

Conversation

Enter-tainer
Copy link
Contributor

What's changed and what's your intention?

  • Summarize your change (mandatory)

Add constant folding for IsTrue, IsFalse, IsNull, IsNotTrue, IsNotFalse, IsNotNull. NULL is taken into account as well. For example, NULL IS NOT TRUE will become True.

Checklist

  • I have written the necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

@codecov
Copy link

codecov bot commented May 3, 2022

Codecov Report

Merging #2265 (5084ca5) into main (d75b905) will increase coverage by 0.00%.
The diff coverage is 80.43%.

@@           Coverage Diff           @@
##             main    #2265   +/-   ##
=======================================
  Coverage   71.24%   71.25%           
=======================================
  Files         655      655           
  Lines       83502    83538   +36     
=======================================
+ Hits        59488    59521   +33     
- Misses      24014    24017    +3     
Flag Coverage Δ
rust 71.25% <80.43%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/frontend/src/expr/utils.rs 97.73% <80.43%> (-0.89%) ⬇️
src/common/src/types/ordered_float.rs 24.30% <0.00%> (+0.19%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Contributor

@neverchanje neverchanje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Enter-tainer Enter-tainer enabled auto-merge (squash) May 3, 2022 05:39
@Enter-tainer Enter-tainer merged commit 59c3332 into main May 3, 2022
@Enter-tainer Enter-tainer deleted the lwz/fold-nulls branch May 3, 2022 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants