Skip to content

Make sure that quoted identifiers remain quoted in formatter#17406

Open
v-jizhang wants to merge 1 commit intoprestodb:masterfrom
v-jizhang:fix-identifier-formatting
Open

Make sure that quoted identifiers remain quoted in formatter#17406
v-jizhang wants to merge 1 commit intoprestodb:masterfrom
v-jizhang:fix-identifier-formatting

Conversation

@v-jizhang
Copy link
Copy Markdown
Contributor

Cherry-pick of trinodb/trino#11171
The SqlFormatter effectively drops quotes from the quoted identifiers
when formatting 'SET SESSION' statement.
This causes valid queries to fail: e.g. SET SESSION
"name-suffix".property = 'value' PrestoException: Formatted query does
not parse even when identifier (name-suffix) is quoted.

Follow up #17186

Co-authored-by: Sergey Melnychuk sergey.melnychuk@starburstdata.com

Test plan - Added a test

== RELEASE NOTES ==

General Changes
* Make sure that quoted identifiers remain quoted in formatter

Cherry-pick of trinodb/trino#11171
The SqlFormatter effectively drops quotes from the quoted identifiers
when formatting 'SET SESSION' statement.
This causes valid queries to fail: e.g. SET SESSION
"name-suffix".property = 'value' PrestoException: Formatted query does
not parse even when identifier (name-suffix) is quoted.

Follow up prestodb#17186

Co-authored-by: Sergey Melnychuk <sergey.melnychuk@starburstdata.com>
@v-jizhang v-jizhang marked this pull request as draft March 10, 2022 19:16
@v-jizhang v-jizhang marked this pull request as ready for review September 13, 2022 22:28
@v-jizhang v-jizhang requested a review from a team as a code owner September 13, 2022 22:28
Copy link
Copy Markdown
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but the CI hasn't fired. Can someone kick it off? Or maybe rebasing to master and pushing would kick ti off?

@elharo elharo requested a review from tdcmeehan September 29, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants