Skip to content

Dialects: implement identifier_quote_style for remaining dialect#2401

Merged
iffyio merged 2 commits into
apache:mainfrom
takaebato:cover-identifier-quote-style
Jul 14, 2026
Merged

Dialects: implement identifier_quote_style for remaining dialect#2401
iffyio merged 2 commits into
apache:mainfrom
takaebato:cover-identifier-quote-style

Conversation

@takaebato

Copy link
Copy Markdown
Contributor

Dialect::identifier_quote_style returned the default None for most dialects even when the database has a documented identifier quote character.
For example SnowflakeDialect {}.identifier_quote_style("id") returned None, so downstream SQL generators could not tell how to quote identifiers for these dialects.

This PR implements the method for the remaining dialects: backticks for BigQuery, ClickHouse, Databricks, Hive and Spark, and double quotes for ANSI, DuckDB, Redshift and Snowflake, each with a reference to the database's documentation. GenericDialect intentionally keeps returning None since it does not assume any specific database.

The existing unit test in src/dialect/mod.rs is extended to cover all dialects.

@iffyio iffyio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thanks @takaebato!

@iffyio iffyio added this pull request to the merge queue Jul 14, 2026
Merged via the queue into apache:main with commit cadabb2 Jul 14, 2026
10 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