Skip to content
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

Fix(redshift): generate correct SQL VALUES clause alias #2298

Merged
merged 4 commits into from
Sep 22, 2023

Conversation

georgesittas
Copy link
Collaborator

We're currently using the raw alias name when converting VALUES to UNION ALL, so we drop any quotes:

>>> import sqlglot
>>> sqlglot.transpile('select * from (values (1)) as `t`(a)', 'spark', 'redshift')
['SELECT * FROM (SELECT 1 AS a) AS t']

@georgesittas georgesittas merged commit 8fe91e2 into main Sep 22, 2023
@georgesittas georgesittas deleted the jo/redshift_values_quote_fix branch September 22, 2023 21:44
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