1
0
Fork 0

Merging upstream version 26.12.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-03-31 15:54:56 +02:00
parent d24d19e9ea
commit 69b6dd9501
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
70 changed files with 1134 additions and 340 deletions

View file

@ -51,7 +51,7 @@ UNESCAPED_SEQUENCES = {
}
def _annotate_with_type_lambda(data_type: exp.DataType.Type) -> t.Callable[[TypeAnnotator, E], E]:
def annotate_with_type_lambda(data_type: exp.DataType.Type) -> t.Callable[[TypeAnnotator, E], E]:
return lambda self, e: self._annotate_with_type(e, data_type)
@ -683,15 +683,15 @@ class Dialect(metaclass=_Dialect):
exp.ParseJSON,
},
exp.DataType.Type.TIME: {
exp.CurrentTime,
exp.Time,
exp.TimeAdd,
exp.TimeSub,
},
exp.DataType.Type.TIMESTAMP: {
exp.CurrentTime,
exp.CurrentTimestamp,
exp.StrToTime,
exp.TimeAdd,
exp.TimeStrToTime,
exp.TimeSub,
exp.TimestampAdd,
exp.TimestampSub,
exp.UnixToTime,
@ -733,7 +733,7 @@ class Dialect(metaclass=_Dialect):
for expr_type in subclasses(exp.__name__, exp.Binary)
},
**{
expr_type: _annotate_with_type_lambda(data_type)
expr_type: annotate_with_type_lambda(data_type)
for data_type, expressions in TYPE_TO_EXPRESSIONS.items()
for expr_type in expressions
},