1
0
Fork 0

Merging upstream version 25.0.3.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:37:40 +01:00
parent 03b67e2ec9
commit 021892b3ff
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
84 changed files with 33016 additions and 31040 deletions

View file

@ -3977,6 +3977,7 @@ class DataType(Expression):
IPV6 = auto()
JSON = auto()
JSONB = auto()
LIST = auto()
LONGBLOB = auto()
LONGTEXT = auto()
LOWCARDINALITY = auto()
@ -4768,6 +4769,12 @@ class ToArray(Func):
pass
# https://materialize.com/docs/sql/types/list/
class List(Func):
arg_types = {"expressions": False}
is_var_len_args = True
# https://docs.snowflake.com/en/sql-reference/functions/to_char
# https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/TO_CHAR-number.html
class ToChar(Func):
@ -5245,6 +5252,18 @@ class ToBase64(Func):
pass
class GapFill(Func):
arg_types = {
"this": True,
"ts_column": True,
"bucket_width": True,
"partitioning_columns": False,
"value_columns": False,
"origin": False,
"ignore_nulls": False,
}
class GenerateDateArray(Func):
arg_types = {"start": True, "end": True, "interval": False}
@ -6175,6 +6194,8 @@ def _apply_child_list_builder(
):
instance = maybe_copy(instance, copy)
parsed = []
properties = {} if properties is None else properties
for expression in expressions:
if expression is not None:
if _is_wrong_expression(expression, into):
@ -6187,14 +6208,18 @@ def _apply_child_list_builder(
prefix=prefix,
**opts,
)
parsed.extend(expression.expressions)
for k, v in expression.args.items():
if k == "expressions":
parsed.extend(v)
else:
properties[k] = v
existing = instance.args.get(arg)
if append and existing:
parsed = existing.expressions + parsed
child = into(expressions=parsed)
for k, v in (properties or {}).items():
for k, v in properties.items():
child.set(k, v)
instance.set(arg, child)