Skip to content

Add ability to configure SQL parser dialect in SessionState#23235

Open
Viicos wants to merge 1 commit into
apache:mainfrom
Viicos:vp/session-state-sql-dialect
Open

Add ability to configure SQL parser dialect in SessionState#23235
Viicos wants to merge 1 commit into
apache:mainfrom
Viicos:vp/session-state-sql-dialect

Conversation

@Viicos

@Viicos Viicos commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Fixes #23109.

Rationale for this change

What changes are included in this PR?

This is one approach that tries solving #23109, by allowing the SQL parser dialect to be configured at the SessionState level.

It's still a bit inconsistent, because it doesn't follow what is set at the config level (see issue), but I guess better than nothing?

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the core Core DataFusion crate label Jun 29, 2026
@adriangb

Copy link
Copy Markdown
Contributor

It's still a bit inconsistent, because it doesn't follow what is set at the config level (see issue), but I guess better than nothing?

What do you mean? That it's not possible to set a custom SQL dialect from a string name, e.g. SET datafusion.sql_parser.dialect = 'custom'? If so this seems like a non-issue to me. There's plenty of dyn APIs that are not configurable from SQL, I'd consider this a pretty advanced usage of DataFusion.

What does the config return once you set a custom dialect using these APIs (SHOW datafusion.sql_parser.dialect;)?

@Viicos

Viicos commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

What do you mean? That it's not possible to set a custom SQL dialect from a string name, e.g. SET datafusion.sql_parser.dialect = 'custom'? If so this seems like a non-issue to me. There's plenty of dyn APIs that are not configurable from SQL, I'd consider this a pretty advanced usage of DataFusion.

Makes sense, most likely it makes sense for users using this API to make sure they set their datafusion.sql_parser.dialect config to a custom value like 'my_custom_dialect' or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to configure custom SQL parser dialects on session config

2 participants