Adding upstream version 25.32.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
ec2e441f55
commit
24751d63a1
74 changed files with 2284 additions and 1814 deletions
|
@ -295,7 +295,7 @@ class Expression(metaclass=_Expression):
|
|||
|
||||
return root
|
||||
|
||||
def copy(self):
|
||||
def copy(self) -> Self:
|
||||
"""
|
||||
Returns a deep copy of the expression.
|
||||
"""
|
||||
|
@ -1476,9 +1476,20 @@ class Describe(Expression):
|
|||
"kind": False,
|
||||
"expressions": False,
|
||||
"partition": False,
|
||||
"format": False,
|
||||
}
|
||||
|
||||
|
||||
# https://duckdb.org/docs/sql/statements/attach.html#attach
|
||||
class Attach(Expression):
|
||||
arg_types = {"this": True, "exists": False, "expressions": False}
|
||||
|
||||
|
||||
# https://duckdb.org/docs/sql/statements/attach.html#detach
|
||||
class Detach(Expression):
|
||||
arg_types = {"this": True, "exists": False}
|
||||
|
||||
|
||||
# https://duckdb.org/docs/guides/meta/summarize.html
|
||||
class Summarize(Expression):
|
||||
arg_types = {"this": True, "table": False}
|
||||
|
@ -1897,11 +1908,6 @@ class OnUpdateColumnConstraint(ColumnConstraintKind):
|
|||
pass
|
||||
|
||||
|
||||
# https://docs.snowflake.com/en/sql-reference/sql/create-table
|
||||
class TagColumnConstraint(ColumnConstraintKind):
|
||||
arg_types = {"expressions": True}
|
||||
|
||||
|
||||
# https://docs.snowflake.com/en/sql-reference/sql/create-external-table#optional-parameters
|
||||
class TransformColumnConstraint(ColumnConstraintKind):
|
||||
pass
|
||||
|
@ -1923,6 +1929,11 @@ class UppercaseColumnConstraint(ColumnConstraintKind):
|
|||
arg_types: t.Dict[str, t.Any] = {}
|
||||
|
||||
|
||||
# https://docs.risingwave.com/processing/watermarks#syntax
|
||||
class WatermarkColumnConstraint(Expression):
|
||||
arg_types = {"this": True, "expression": True}
|
||||
|
||||
|
||||
class PathColumnConstraint(ColumnConstraintKind):
|
||||
pass
|
||||
|
||||
|
@ -2966,6 +2977,11 @@ class SecureProperty(Property):
|
|||
arg_types = {}
|
||||
|
||||
|
||||
# https://docs.snowflake.com/en/sql-reference/sql/create-table
|
||||
class Tags(ColumnConstraintKind, Property):
|
||||
arg_types = {"expressions": True}
|
||||
|
||||
|
||||
class TransformModelProperty(Property):
|
||||
arg_types = {"expressions": True}
|
||||
|
||||
|
@ -3013,6 +3029,14 @@ class WithProcedureOptions(Property):
|
|||
arg_types = {"expressions": True}
|
||||
|
||||
|
||||
class EncodeProperty(Property):
|
||||
arg_types = {"this": True, "properties": False, "key": False}
|
||||
|
||||
|
||||
class IncludeProperty(Property):
|
||||
arg_types = {"this": True, "alias": False, "column_def": False}
|
||||
|
||||
|
||||
class Properties(Expression):
|
||||
arg_types = {"expressions": True}
|
||||
|
||||
|
@ -3037,6 +3061,8 @@ class Properties(Expression):
|
|||
"RETURNS": ReturnsProperty,
|
||||
"ROW_FORMAT": RowFormatProperty,
|
||||
"SORTKEY": SortKeyProperty,
|
||||
"ENCODE": EncodeProperty,
|
||||
"INCLUDE": IncludeProperty,
|
||||
}
|
||||
|
||||
PROPERTY_TO_NAME = {v: k for k, v in NAME_TO_PROPERTY.items()}
|
||||
|
@ -4662,6 +4688,10 @@ class AddConstraint(Expression):
|
|||
arg_types = {"expressions": True}
|
||||
|
||||
|
||||
class AttachOption(Expression):
|
||||
arg_types = {"this": True, "expression": False}
|
||||
|
||||
|
||||
class DropPartition(Expression):
|
||||
arg_types = {"expressions": True, "exists": False}
|
||||
|
||||
|
@ -5757,6 +5787,10 @@ class FromBase64(Func):
|
|||
pass
|
||||
|
||||
|
||||
class FeaturesAtTime(Func):
|
||||
arg_types = {"this": True, "time": False, "num_rows": False, "ignore_feature_nulls": False}
|
||||
|
||||
|
||||
class ToBase64(Func):
|
||||
pass
|
||||
|
||||
|
@ -6034,6 +6068,7 @@ class JSONExtract(Binary, Func):
|
|||
|
||||
class JSONExtractArray(Func):
|
||||
arg_types = {"this": True, "expression": False}
|
||||
_sql_names = ["JSON_EXTRACT_ARRAY"]
|
||||
|
||||
|
||||
class JSONExtractScalar(Binary, Func):
|
||||
|
@ -7832,6 +7867,7 @@ def cast(
|
|||
types_are_equivalent = type_mapping.get(
|
||||
existing_cast_type, existing_cast_type.value
|
||||
) == type_mapping.get(new_cast_type, new_cast_type.value)
|
||||
|
||||
if expr.is_type(data_type) or types_are_equivalent:
|
||||
return expr
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue