Skip to content

Conversation

@andygrove
Copy link
Member

Summary

Continues the work from #2171 by replacing 12 more dialect_of! macro usages with proper Dialect trait methods. This allows user-defined dialects to customize parsing behavior and makes the differences between dialects more clearly documented in the trait.

New trait methods added:

Method Description Dialects
supports_select_wildcard_replace SELECT * REPLACE syntax BigQuery, ClickHouse, DuckDB, Snowflake
supports_select_wildcard_ilike SELECT * ILIKE syntax Snowflake
supports_select_wildcard_rename SELECT * RENAME syntax Snowflake
supports_optimize_table OPTIMIZE TABLE statement ClickHouse
supports_install INSTALL statement DuckDB
supports_detach DETACH statement DuckDB
supports_prewhere PREWHERE clause ClickHouse
supports_with_fill WITH FILL in ORDER BY ClickHouse
supports_limit_by LIMIT BY clause ClickHouse
supports_interpolate INTERPOLATE clause ClickHouse
supports_settings SETTINGS clause ClickHouse
supports_select_format FORMAT clause in SELECT ClickHouse

All methods are also implemented for GenericDialect (returning true).

Test plan

  • All existing tests pass
  • cargo clippy passes
  • cargo fmt passes

🤖 Generated with Claude Code

Continues the work from apache#2171 by replacing 12 more `dialect_of!` macro
usages with proper `Dialect` trait methods. This allows user-defined
dialects to customize parsing behavior and makes the differences between
dialects more clearly documented in the trait.

New trait methods added:
- `supports_select_wildcard_replace` - SELECT * REPLACE syntax
- `supports_select_wildcard_ilike` - SELECT * ILIKE syntax
- `supports_select_wildcard_rename` - SELECT * RENAME syntax
- `supports_optimize_table` - OPTIMIZE TABLE statement
- `supports_install` - INSTALL statement
- `supports_detach` - DETACH statement
- `supports_prewhere` - PREWHERE clause
- `supports_with_fill` - WITH FILL in ORDER BY
- `supports_limit_by` - LIMIT BY clause
- `supports_interpolate` - INTERPOLATE clause
- `supports_settings` - SETTINGS clause
- `supports_select_format` - FORMAT clause in SELECT

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@andygrove andygrove requested a review from iffyio January 23, 2026 14:54
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @andygrove!

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