-
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: Between expr to sql string #9803
Conversation
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.
Thank you for the contribution @sebastian2296. Once CI passes this PR looks good to me
datafusion/sql/src/unparser/expr.rs
Outdated
@@ -711,6 +724,15 @@ mod tests { | |||
Expr::IsUnknown(Box::new((col("a") + col("b")).gt(lit(4)))), | |||
r#"(("a" + "b") > 4) IS UNKNOWN"#, | |||
), | |||
( | |||
Expr::Between(Between { |
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/enum.Expr.html#method.between
so like betwen(col("a:"), lit(1), lit(7))
Hi @sebastian2296 -- I think you need to run |
Beautiful -- thank you @sebastian2296 |
* feat: Between expr to sql string * fix: use between logical expr * fix: format using fmt * fix: remove redundant field name
Which issue does this PR close?
This PR adds support to convert Between Expr to SQL string #9726
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?