Skip to content

Dialects: implement identifier_quote_style for remaining dialect#2401

Open
takaebato wants to merge 2 commits into
apache:mainfrom
takaebato:cover-identifier-quote-style
Open

Dialects: implement identifier_quote_style for remaining dialect#2401
takaebato wants to merge 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.

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.

1 participant