chore(deps): Upgrade sqlglot from 27.15.2 to 28.10.0 (#37841)

This commit is contained in:
Michael S. Molina
2026-02-10 13:13:11 -03:00
committed by GitHub
parent ae8d671fea
commit c41942a38a
7 changed files with 28 additions and 9 deletions

View File

@@ -271,7 +271,7 @@ class RLSAsSubqueryTransformer(RLSTransformer):
this=exp.Select(
expressions=[exp.Star()],
where=exp.Where(this=predicate),
**{"from": exp.From(this=node.copy())},
from_=exp.From(this=node.copy()),
),
alias=alias,
)
@@ -816,7 +816,7 @@ class SQLStatement(BaseSQLStatement[exp.Expression]):
limit=exp.Limit(
expression=exp.Literal(this=str(limit), is_string=False)
),
**{"from": exp.From(this=exp.Subquery(this=self._parsed.copy()))},
from_=exp.From(this=exp.Subquery(this=self._parsed.copy())),
)
else: # method == LimitMethod.FETCH_MANY
pass
@@ -827,7 +827,7 @@ class SQLStatement(BaseSQLStatement[exp.Expression]):
:return: True if the statement has a CTE at the top level.
"""
return "with" in self._parsed.args
return bool(self._parsed.args.get("with_"))
def as_cte(self, alias: str = "__cte") -> SQLStatement:
"""
@@ -840,8 +840,8 @@ class SQLStatement(BaseSQLStatement[exp.Expression]):
:param alias: The alias to use for the CTE.
:return: A new SQLStatement with the CTE.
"""
existing_ctes = self._parsed.args["with"].expressions if self.has_cte() else []
self._parsed.args["with"] = None
existing_ctes = self._parsed.args["with_"].expressions if self.has_cte() else []
self._parsed.args["with_"] = None
new_cte = exp.CTE(
this=self._parsed.copy(),
alias=exp.TableAlias(this=exp.Identifier(this=alias)),