-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Not expr to string #9802
feat: Not expr to string #9802
Conversation
Thanks @sebastian2296 -- if CI passes this PR looks great to me |
datafusion/sql/src/unparser/expr.rs
Outdated
@@ -711,6 +718,10 @@ mod tests { | |||
Expr::IsUnknown(Box::new((col("a") + col("b")).gt(lit(4)))), | |||
r#"(("a" + "b") > 4) IS UNKNOWN"#, | |||
), | |||
( | |||
Expr::Not(Box::new(col("a"))), |
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 think you could write this more concisely using https://docs.rs/datafusion/latest/datafusion/logical_expr/fn.not.html
So something like not(col(a))
Hi @alamb, clippy test is failing due to unused ´not´ import, but that's not true. I'm using it to perform the test. Any hints on what could be the issue here? |
Hey @sebastian2296 if you are using an import only for a test, you can import it within the mod tests {} block. E.g. use regular_dependency;
fn some_code(){
()
}
mod tests{
use test_dependency;
...
} Thank you for the work on this PR! 🙏 |
🚀 -- thanks again @sebastian2296 |
Thanks @sebastian2296 -- this PR needs to be merged up from main to resolve a conflct. Can you do so so that I can merge it in? Thanks again 🙏 |
Done! @alamb |
Thanks @sebastian2296 -- a very nice addition indeed |
* feat: Not expr to string * fix: use not logical expr * fix: format using fmt * fix: import within test mod * fix: format new import
Which issue does this PR close?
This PR adds support for Not expr in #9726
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?