Skip to content

Chore!: bump sqlglot[rs] to v26.8.0#3934

Merged
georgesittas merged 1 commit intomainfrom
jo/bump_sqlglot_to_v26_8_0
Mar 6, 2025
Merged

Chore!: bump sqlglot[rs] to v26.8.0#3934
georgesittas merged 1 commit intomainfrom
jo/bump_sqlglot_to_v26_8_0

Conversation

@georgesittas
Copy link
Contributor

@georgesittas georgesittas commented Mar 4, 2025

The generation for brackets in DuckDB changed after v26.6.0, in order to support the latest semantics, introduced in v1.2.0.

In order to allow folks to use both the old and the new semantics, we introduced a new dialect setting that controls the version of the dialect, e.g. dialect="duckdb, version=1.1.0".

Dialect settings aren't properly supported in SQLMesh right now, because we hard code dialect strings in various places, but most importantly in the engine adapters:

https://github.com/TobikoData/sqlmesh/blob/5fb2c818a720a823d3f8ef45d047bb33f92376fc/sqlmesh/core/engine_adapter/bigquery.py#L62

This means that even if someone includes some settings in the config's default dialect, I expect that they won't be used when generating ASTs within the adapter module, e.g. when executing code, which can lead to issues.

Granted, only the DuckDB dialect is affected by this change, so perhaps this doesn't need to be a blocker for merging this PR, assuming that we can suggest upgrading DuckDB to the latest version as a workaround. But it may be an issue for other dialects in the future, so I'll leave this be for a while until we discuss how we want to solve this internally.

EDIT: we discussed this internally and concluded that roundtripping DuckDB SQL should work regardless of the version. The issue would only arise if someone wanted to transpile to duckdb and the version of the latter was <v1.2.0. This tradeoff is fine for now, happy to revisit this if needed.

@georgesittas georgesittas requested a review from a team March 4, 2025 12:54
@georgesittas georgesittas merged commit 99d28a6 into main Mar 6, 2025
22 checks passed
@georgesittas georgesittas deleted the jo/bump_sqlglot_to_v26_8_0 branch March 6, 2025 18:46
afzaljasani pushed a commit that referenced this pull request Apr 8, 2025
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