Skip to content

Commit 3224235

Browse files
committed
Fix!: make CTE builder produce AST consistent with parser closes #6503
1 parent ce5487e commit 3224235

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sqlglot/expressions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ def with_(
13531353
append: bool = True,
13541354
dialect: DialectType = None,
13551355
copy: bool = True,
1356-
scalar: bool = False,
1356+
scalar: t.Optional[bool] = None,
13571357
**opts,
13581358
) -> Q:
13591359
"""
@@ -8526,7 +8526,7 @@ def _apply_cte_builder(
85268526
append: bool = True,
85278527
dialect: DialectType = None,
85288528
copy: bool = True,
8529-
scalar: bool = False,
8529+
scalar: t.Optional[bool] = None,
85308530
**opts,
85318531
) -> E:
85328532
alias_expression = maybe_parse(alias, dialect=dialect, into=TableAlias, **opts)
@@ -8542,7 +8542,7 @@ def _apply_cte_builder(
85428542
append=append,
85438543
copy=copy,
85448544
into=With,
8545-
properties={"recursive": recursive or False},
8545+
properties={"recursive": recursive} if recursive else {},
85468546
)
85478547

85488548

0 commit comments

Comments
 (0)