Skip to content

Commit bee4164

Browse files
authored
chore!: bump sqlglot to v30.8.0 (#5799)
Signed-off-by: Vincent Chan <vincent@tobikodata.com>
1 parent 58bed01 commit bee4164

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies = [
2424
"requests",
2525
"rich[jupyter]",
2626
"ruamel.yaml",
27-
"sqlglot~=30.4.2",
27+
"sqlglot~=30.8.0",
2828
"tenacity",
2929
"time-machine",
3030
"json-stream"

sqlmesh/core/dialect.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,14 @@ def _parse_types(
481481
check_func: bool = False,
482482
schema: bool = False,
483483
allow_identifiers: bool = True,
484+
with_collation: bool = False,
484485
) -> t.Optional[exp.Expr]:
485486
start = self._curr
486487
parsed_type = self.__parse_types( # type: ignore
487-
check_func=check_func, schema=schema, allow_identifiers=allow_identifiers
488+
check_func=check_func,
489+
schema=schema,
490+
allow_identifiers=allow_identifiers,
491+
with_collation=with_collation,
488492
)
489493

490494
if schema and parsed_type:

sqlmesh/core/macros.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from sqlglot import Generator, exp, parse_one
1616
from sqlglot.executor.env import ENV
1717
from sqlglot.executor.python import Python
18+
from sqlglot.generators.python import PythonGenerator
1819
from sqlglot.helper import csv, ensure_collection
1920
from sqlglot.optimizer.normalize_identifiers import normalize_identifiers
2021
from sqlglot.schema import MappingSchema
@@ -140,9 +141,9 @@ def get(self, key: str, default: t.Any = None, /) -> t.Any:
140141

141142

142143
class MacroDialect(Python):
143-
class Generator(Python.Generator):
144+
class Generator(PythonGenerator):
144145
TRANSFORMS = {
145-
**Python.Generator.TRANSFORMS, # type: ignore
146+
**PythonGenerator.TRANSFORMS,
146147
exp.Column: lambda self, e: f"exp.to_column('{self.sql(e, 'this')}')",
147148
exp.Lambda: lambda self, e: f"lambda {self.expressions(e)}: {self.sql(e, 'this')}",
148149
MacroFunc: _macro_func_sql,

0 commit comments

Comments
 (0)