Skip to content

feat: Add support for Redshift dialect#5537

Merged
max-sixty merged 2 commits intoPRQL:mainfrom
gosupersimple:add-redshift-support
Oct 31, 2025
Merged

feat: Add support for Redshift dialect#5537
max-sixty merged 2 commits intoPRQL:mainfrom
gosupersimple:add-redshift-support

Conversation

@priithaamer
Copy link
Copy Markdown
Contributor

Not 100% complete support, but solves major blockers using Redshift:

  1. Prevents DISTINCT ON being used for group ... take 1 deduplication.
  2. Escape keywords when used as column names.

let ident = ident.to_ascii_uppercase();

sql_keywords().contains(ident.as_str())
sql_keywords().contains(ident.as_str()) || dialect_keywords(dialect).contains(ident.as_str())
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm a bit unsure about this but does not seem to have any side-effects and opens the capability to selectively escape keywords when used as column names.

@priithaamer priithaamer changed the title Add support for Redshift dialect feat: Add support for Redshift dialect Oct 31, 2025
@max-sixty
Copy link
Copy Markdown
Member

nice!

@max-sixty max-sixty merged commit 922ad8e into PRQL:main Oct 31, 2025
36 of 37 checks passed
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