-
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
Implement unparse ScalarVariable
to String
#10541
Conversation
datafusion/sql/src/unparser/expr.rs
Outdated
ast::Expr::Identifier(self.new_ident(ids[0].to_string())) | ||
} else { | ||
ast::Expr::CompoundIdentifier( | ||
ids.iter().map(|i| self.new_ident(i.to_string())).collect(), |
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.
self.new_ident
will add quote_style
to the ident. I'm not sure if ScalarVariable
need this quote or not.
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 think it needs the style -- otherwise the unparsed expr is "@var"
rather than @var
needs a rebase (I've merged a bunch of other unparse PRs). |
I took the liberty of merging up from main to resolve the conflicts |
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 this contribution @reswqa 🙏
I think other than the quote style this PR is ready to go 🚀
@alamb Thanks for the review 🙇 , have updated it to remove the quote style. |
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 to me -- thank you @reswqa 🙏
* Implement unparse `ScalarVariable` to String * remove quote_style --------- Co-authored-by: Andrew Lamb <[email protected]>
Which issue does this PR close?
Closes #10518.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?