1
0
Fork 0

Merging upstream version 16.7.3.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 20:21:40 +01:00
parent 331a760a3d
commit 088f137198
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
75 changed files with 33866 additions and 31988 deletions

View file

@ -1013,7 +1013,7 @@ class Pragma(Expression):
class Set(Expression):
arg_types = {"expressions": False}
arg_types = {"expressions": False, "unset": False, "tag": False}
class SetItem(Expression):
@ -1168,10 +1168,6 @@ class RenameTable(Expression):
pass
class SetTag(Expression):
arg_types = {"expressions": True, "unset": False}
class Comment(Expression):
arg_types = {"this": True, "kind": True, "expression": True, "exists": False}
@ -1934,6 +1930,11 @@ class LanguageProperty(Property):
arg_types = {"this": True}
# spark ddl
class ClusteredByProperty(Property):
arg_types = {"expressions": True, "sorted_by": False, "buckets": True}
class DictProperty(Property):
arg_types = {"this": True, "kind": True, "settings": False}
@ -2074,6 +2075,7 @@ class Properties(Expression):
"ALGORITHM": AlgorithmProperty,
"AUTO_INCREMENT": AutoIncrementProperty,
"CHARACTER SET": CharacterSetProperty,
"CLUSTERED_BY": ClusteredByProperty,
"COLLATE": CollateProperty,
"COMMENT": SchemaCommentProperty,
"DEFINER": DefinerProperty,
@ -2280,6 +2282,12 @@ class Table(Expression):
"system_time": False,
}
@property
def name(self) -> str:
if isinstance(self.this, Func):
return ""
return self.this.name
@property
def db(self) -> str:
return self.text("db")
@ -3716,6 +3724,10 @@ class Bracket(Condition):
arg_types = {"this": True, "expressions": True}
class SafeBracket(Bracket):
"""Represents array lookup where OOB index yields NULL instead of causing a failure."""
class Distinct(Expression):
arg_types = {"expressions": False, "on": False}
@ -3934,7 +3946,7 @@ class Case(Func):
class Cast(Func):
arg_types = {"this": True, "to": True}
arg_types = {"this": True, "to": True, "format": False}
@property
def name(self) -> str:
@ -4292,6 +4304,10 @@ class Map(Func):
arg_types = {"keys": False, "values": False}
class MapFromEntries(Func):
pass
class StarMap(Func):
pass