Skip to content

Commit 187a701

Browse files
committed
Bump SQLGlot minimum version to 30.14
Signed-off-by: dvasdekis <dimitri.vasdekis@detsi.qld.gov.au>
1 parent 909ee91 commit 187a701

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies = [
2323
"requests",
2424
"rich[jupyter]",
2525
"ruamel.yaml",
26-
"sqlglot~=30.8.0",
26+
"sqlglot>=30.14.0,<31.0.0",
2727
"tenacity",
2828
"time-machine",
2929
"json-stream"

tests/core/test_dialect.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,3 +1231,12 @@ def test_extend_sqlglot_is_idempotent():
12311231
assert parse_one("SELECT CAST(1 AS INT)").sql() == "SELECT CAST(1 AS INT)"
12321232
# The class-level registries must not grow on repeated calls.
12331233
assert Generator.UNWRAPPED_INTERVAL_VALUES == before
1234+
1235+
1236+
def test_extend_sqlglot_supports_collated_types():
1237+
# SQLGlot calls Parser._parse_types with this keyword while parsing
1238+
# collated types. Keep the SQLMesh override compatible with that API.
1239+
assert (
1240+
parse_one("SELECT CAST('x' AS VARCHAR COLLATE utf8)", "spark").sql("spark")
1241+
== "SELECT CAST('x' AS STRING COLLATE utf8)"
1242+
)

0 commit comments

Comments
 (0)