Adding upstream version 23.7.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
f1aa09959c
commit
27c061b7af
187 changed files with 86502 additions and 71397 deletions
|
@ -447,7 +447,7 @@ def move_ctes_to_top_level(expression: exp.Expression) -> exp.Expression:
|
|||
if inner_with.recursive:
|
||||
top_level_with.set("recursive", True)
|
||||
|
||||
top_level_with.expressions.extend(inner_with.expressions)
|
||||
top_level_with.set("expressions", inner_with.expressions + top_level_with.expressions)
|
||||
|
||||
return expression
|
||||
|
||||
|
@ -464,7 +464,7 @@ def ensure_bools(expression: exp.Expression) -> exp.Expression:
|
|||
):
|
||||
node.replace(node.neq(0))
|
||||
|
||||
for node, *_ in expression.walk():
|
||||
for node in expression.walk():
|
||||
ensure_bools(node, _ensure_bool)
|
||||
|
||||
return expression
|
||||
|
@ -561,9 +561,7 @@ def move_partitioned_by_to_schema_columns(expression: exp.Expression) -> exp.Exp
|
|||
|
||||
|
||||
def struct_kv_to_alias(expression: exp.Expression) -> exp.Expression:
|
||||
"""
|
||||
Convert struct arguments to aliases: STRUCT(1 AS y) .
|
||||
"""
|
||||
"""Converts struct arguments to aliases, e.g. STRUCT(1 AS y)."""
|
||||
if isinstance(expression, exp.Struct):
|
||||
expression.set(
|
||||
"expressions",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue