Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
max-muoto committed Sep 2, 2024
1 parent 1e9fb18 commit fc182cc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions sqlglot/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6535,20 +6535,15 @@ def _apply_cte_builder(
) -> E:
alias_expression = maybe_parse(alias, dialect=dialect, into=TableAlias, **opts)
as_expression = maybe_parse(as_, dialect=dialect, **opts)
cte = CTE(this=as_expression, alias=alias_expression)
if materialized is not None:
cte.set("materialized", materialized)

properties: dict[str, bool] = {"recursive": recursive or False}

cte = CTE(this=as_expression, alias=alias_expression, materialized=materialized)
return _apply_child_list_builder(
cte,
instance=instance,
arg="with",
append=append,
copy=copy,
into=With,
properties=properties,
properties={"recursive": recursive or False},
)


Expand Down

0 comments on commit fc182cc

Please sign in to comment.