mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore(deps): Upgrade sqlglot from 27.15.2 to 28.10.0 (#37841)
This commit is contained in:
committed by
GitHub
parent
ae8d671fea
commit
c41942a38a
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user