Skip to content

Conversation

@reswqa
Copy link
Member

@reswqa reswqa commented May 16, 2024

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?

@github-actions github-actions bot added the sql SQL Planner label May 16, 2024
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(),
Copy link
Member Author

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.

Copy link
Contributor

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

@reswqa reswqa marked this pull request as ready for review May 16, 2024 09:01
@crepererum
Copy link
Contributor

needs a rebase (I've merged a bunch of other unparse PRs).

@alamb
Copy link
Contributor

alamb commented May 16, 2024

I took the liberty of merging up from main to resolve the conflicts

Copy link
Contributor

@alamb alamb left a 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 🚀

@reswqa
Copy link
Member Author

reswqa commented May 17, 2024

@alamb Thanks for the review 🙇 , have updated it to remove the quote style.

Copy link
Contributor

@alamb alamb left a 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 🙏

@alamb alamb merged commit ea023e2 into apache:main May 17, 2024
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
* Implement unparse `ScalarVariable` to String

* remove quote_style

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sql SQL Planner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ScalarVariable Expr --> String Support

3 participants