-
Notifications
You must be signed in to change notification settings - Fork 616
feat: Convert IS TRUE|FALSE to expression #499
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
Conversation
Pull Request Test Coverage Report for Build 2370698249
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a huge fan of the growing number of Expr::Is*
variants, but that is not something introduced in this PR.
@@ -236,6 +236,10 @@ pub enum Expr { | |||
expr: Box<Expr>, | |||
key: Ident, | |||
}, | |||
/// `IS FALSE` operator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is somewhat unfortunate we don't have Expr::Is(Box<Expr>, Box<Expr>)
which would handle all these cases.
What do you think @ovr ? Should I file a ticket to try and reduce the duplication in Expr
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO: It's a breaking change, which doesn't give any advantages over this. Right now, it's really easy to implement a match pattern over this because names are really helpful.
@ovr github tells me there is a conflict to resolve in this PR -- I haven't been able to fix such issues in the past as I don't have the ability to push commits to your PR Can you please resolve the conflicts, and then I will merge this PR? Thank you! |
Rebased ✅ |
Thanks @ovr |
Hello!
Support for
IS TRUE|FALSE
operator was introduced in #474 by yuval-illumex, but it has a limitation.There is a difference between
IS TRUE|false
and= true|false
, it how it handles nulls:As you can see from the output, it handles
null
values differently.Thanks