Skip to content

Firebolt dialect should quote identifiers that need quoting#5106

Merged
mihaibudiu merged 1 commit into
apache:mainfrom
Samin061:firebolt-identifier-quote
Jul 23, 2026
Merged

Firebolt dialect should quote identifiers that need quoting#5106
mihaibudiu merged 1 commit into
apache:mainfrom
Samin061:firebolt-identifier-quote

Conversation

@Samin061

Copy link
Copy Markdown
Contributor

Jira Link

No Jira for this one yet. Happy to open a CALCITE issue if you want it tracked.

Changes Proposed

Inverted identifier quoting in the Firebolt dialect

identifierNeedsQuote returns the regex match, while ExasolSqlDialect and BigQuerySqlDialect, which carry the same regex and the same javadoc, return its negation. Firebolt quotes the identifiers that are already safe unquoted, and emits the ones that are not (spaces, $, backticks, embedded quotes) raw, so an alias carrying a double quote leaves its identifier and the remainder is parsed as SQL rather than as a name.

testIdentifier already pins this behaviour down for the other dialects, so I added Firebolt to it. Before the change that case gives 4 AS fo$ur and 6 AS si`x unquoted. The Firebolt expectations elsewhere in the test were written against the old output and now line up with Exasol, which is the behaviour the regex and the keyword list were there for.

@mihaibudiu
mihaibudiu merged commit 8c3696e into apache:main Jul 23, 2026
16 of 17 checks passed
@rubenada

Copy link
Copy Markdown
Contributor

I would have liked a Jira ticket for this.

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.

3 participants