-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Minor: Improve documentation in sql_to_plan example #10582
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
| let expr = col("a").lt(lit(5)).or(col("a").eq(lit(8))); | ||
| let ast = expr_to_sql(&expr)?; | ||
| let sql = format!("{}", ast); | ||
| let sql = expr_to_sql(&expr)?.to_string(); |
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 it makes it easier to use this example if we don't have to worry about the intermediate ast as much, so I combined it into a single statement
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 don't remember why I had to do it, that totally makes sense
edmondop
left a comment
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.
Looks good, thank you!
| let expr = col("a").lt(lit(5)).or(col("a").eq(lit(8))); | ||
| let ast = expr_to_sql(&expr)?; | ||
| let sql = format!("{}", ast); | ||
| let sql = expr_to_sql(&expr)?.to_string(); |
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 don't remember why I had to do it, that totally makes sense
edmondop
left a comment
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.
Looks good, thank you!
comphead
left a comment
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.
Which issue does this PR close?
Follow on to #10558 from @xinlifoobar (🙏 ) and @edmondop
Rationale for this change
I noticed a few potential improvements to the sql_to_plan examples
What changes are included in this PR?
Are these changes tested?
Existing CI
Are there any user-facing changes?