Edit on GitHub

sqlglot.typing

  1from __future__ import annotations
  2
  3import typing as t
  4
  5from sqlglot import exp
  6from sqlglot.helper import subclasses
  7from builtins import type as Type
  8
  9if t.TYPE_CHECKING:
 10    from sqlglot.optimizer.annotate_types import TypeAnnotator
 11
 12ExprMetadataType = dict[Type[exp.Expr], dict[str, t.Any]]
 13
 14
 15def annotate_by_numeric_arg(self: TypeAnnotator, expression: exp.Expr) -> exp.Expr:
 16    """
 17    Annotates math functions (e.g. FLOOR) that preserve numeric and unknown types, and return INT
 18    otherwise.
 19
 20    Assumes `this` is set, which holds for valid ASTs because it's a required argument.
 21    """
 22    this: exp.Expr = expression.this
 23
 24    self._set_type(
 25        expression,
 26        this.type
 27        if this.is_type(exp.DType.UNKNOWN, *exp.DataType.NUMERIC_TYPES)
 28        else exp.DType.INT,
 29    )
 30    return expression
 31
 32
 33def annotate_int_as_double(self: TypeAnnotator, expression: exp.Expr) -> exp.Expr:
 34    """
 35    Annotates math functions (e.g. FLOOR) that return DOUBLE for integers and strings, and the input
 36    type otherwise.
 37
 38    Assumes `this` is set, which holds for valid ASTs because it's a required argument.
 39    """
 40    this: exp.Expr = expression.this
 41
 42    self._set_type(
 43        expression,
 44        exp.DType.DOUBLE
 45        if this.is_type(*exp.DataType.INTEGER_TYPES, *exp.DataType.TEXT_TYPES)
 46        else this.type,
 47    )
 48    return expression
 49
 50
 51TIMESTAMP_EXPRESSIONS = {
 52    exp.CurrentTimestamp,
 53    exp.StrToTime,
 54    exp.TimeStrToTime,
 55    exp.TimestampAdd,
 56    exp.TimestampSub,
 57    exp.UnixToTime,
 58}
 59
 60EXPRESSION_METADATA: ExprMetadataType = {
 61    **{
 62        expr_type: {"annotator": lambda self, e: self._annotate_binary(e)}
 63        for expr_type in subclasses(exp.__name__, exp.Binary)
 64    },
 65    **{
 66        expr_type: {"annotator": lambda self, e: self._annotate_unary(e)}
 67        for expr_type in subclasses(
 68            exp.__name__, (exp.Unary, exp.Alias, exp.IgnoreNulls, exp.RespectNulls)
 69        )
 70    },
 71    **{
 72        expr_type: {"returns": exp.DType.BIGINT}
 73        for expr_type in {
 74            exp.ApproxDistinct,
 75            exp.ArraySize,
 76            exp.CountIf,
 77            exp.DenseRank,
 78            exp.Int64,
 79            exp.Ntile,
 80            exp.Rank,
 81            exp.RowNumber,
 82            exp.UnixSeconds,
 83            exp.UnixMicros,
 84            exp.UnixMillis,
 85        }
 86    },
 87    **{
 88        expr_type: {"returns": exp.DType.BINARY}
 89        for expr_type in {
 90            exp.FromBase32,
 91            exp.FromBase64,
 92        }
 93    },
 94    **{
 95        expr_type: {"returns": exp.DType.BOOLEAN}
 96        for expr_type in {
 97            exp.All,
 98            exp.Any,
 99            exp.Between,
100            exp.Boolean,
101            exp.Contains,
102            exp.EndsWith,
103            exp.Exists,
104            exp.In,
105            exp.IsInf,
106            exp.IsNan,
107            exp.LogicalAnd,
108            exp.LogicalOr,
109            exp.StartsWith,
110        }
111    },
112    **{
113        expr_type: {"returns": exp.DType.DATE}
114        for expr_type in {
115            exp.CurrentDate,
116            exp.Date,
117            exp.DateFromParts,
118            exp.DateStrToDate,
119            exp.DiToDate,
120            exp.LastDay,
121            exp.StrToDate,
122            exp.TimeStrToDate,
123            exp.TsOrDsToDate,
124        }
125    },
126    **{
127        expr_type: {"returns": exp.DType.DATETIME}
128        for expr_type in {
129            exp.CurrentDatetime,
130            exp.Datetime,
131            exp.DatetimeAdd,
132            exp.DatetimeSub,
133        }
134    },
135    **{
136        expr_type: {"returns": exp.DType.DOUBLE}
137        for expr_type in {
138            exp.Asin,
139            exp.Asinh,
140            exp.Acos,
141            exp.CovarPop,
142            exp.CovarSamp,
143            exp.Acosh,
144            exp.ApproxQuantile,
145            exp.Atan,
146            exp.Atanh,
147            exp.Avg,
148            exp.Cbrt,
149            exp.Cos,
150            exp.Cosh,
151            exp.Cot,
152            exp.Degrees,
153            exp.Exp,
154            exp.Kurtosis,
155            exp.Ln,
156            exp.Log,
157            exp.Pi,
158            exp.Pow,
159            exp.PercentileCont,
160            exp.Quantile,
161            exp.Radians,
162            exp.Round,
163            exp.SafeDivide,
164            exp.Sin,
165            exp.Sinh,
166            exp.Sqrt,
167            exp.Stddev,
168            exp.StddevPop,
169            exp.StddevSamp,
170            exp.Rand,
171            exp.Tan,
172            exp.Tanh,
173            exp.ToDouble,
174            exp.CumeDist,
175            exp.PercentRank,
176            exp.Variance,
177            exp.VariancePop,
178            exp.Skewness,
179        }
180    },
181    **{
182        expr_type: {"returns": exp.DType.INT}
183        for expr_type in {
184            exp.Ascii,
185            exp.BitLength,
186            exp.DatetimeDiff,
187            exp.DayOfMonth,
188            exp.DayOfWeek,
189            exp.DayOfYear,
190            exp.Getbit,
191            exp.Hour,
192            exp.TimestampDiff,
193            exp.TimeDiff,
194            exp.Unicode,
195            exp.DateToDi,
196            exp.Levenshtein,
197            exp.Length,
198            exp.Sign,
199            exp.StrPosition,
200            exp.TsOrDiToDi,
201            exp.Quarter,
202            exp.UnixDate,
203        }
204    },
205    **{
206        expr_type: {"returns": exp.DType.INTERVAL}
207        for expr_type in {
208            exp.Interval,
209            exp.JustifyDays,
210            exp.JustifyHours,
211            exp.JustifyInterval,
212            exp.MakeInterval,
213        }
214    },
215    **{
216        expr_type: {"returns": exp.DType.JSON}
217        for expr_type in {
218            exp.ParseJSON,
219        }
220    },
221    **{
222        expr_type: {"returns": exp.DType.TIME}
223        for expr_type in {
224            exp.CurrentTime,
225            exp.Localtime,
226            exp.Time,
227            exp.TimeAdd,
228            exp.TimeSub,
229        }
230    },
231    **{
232        expr_type: {"returns": exp.DType.TIMESTAMPLTZ}
233        for expr_type in {
234            exp.TimestampLtzFromParts,
235        }
236    },
237    **{
238        expr_type: {"returns": exp.DType.TIMESTAMPTZ}
239        for expr_type in {
240            exp.CurrentTimestampLTZ,
241            exp.TimestampTzFromParts,
242        }
243    },
244    **{expr_type: {"returns": exp.DType.TIMESTAMP} for expr_type in TIMESTAMP_EXPRESSIONS},
245    **{
246        expr_type: {"returns": exp.DType.TINYINT}
247        for expr_type in {
248            exp.Day,
249            exp.DayOfWeekIso,
250            exp.Month,
251            exp.Week,
252            exp.WeekOfYear,
253            exp.Year,
254            exp.YearOfWeek,
255            exp.YearOfWeekIso,
256        }
257    },
258    **{
259        expr_type: {"returns": exp.DType.VARCHAR}
260        for expr_type in {
261            exp.ArrayToString,
262            exp.Concat,
263            exp.ConcatWs,
264            exp.Chr,
265            exp.CurrentCatalog,
266            exp.CurrentRole,
267            exp.CurrentSchema,
268            exp.CurrentVersion,
269            exp.CurrentUser,
270            exp.Dayname,
271            exp.DateToDateStr,
272            exp.DPipe,
273            exp.GroupConcat,
274            exp.Initcap,
275            exp.Lower,
276            exp.MD5,
277            exp.Monthname,
278            exp.RawString,
279            exp.Repeat,
280            exp.SHA,
281            exp.SHA2,
282            exp.SessionUser,
283            exp.Space,
284            exp.String,
285            exp.Substring,
286            exp.TimeToStr,
287            exp.TimeToTimeStr,
288            exp.Trim,
289            exp.ToBase32,
290            exp.ToBase64,
291            exp.Translate,
292            exp.TsOrDsToDateStr,
293            exp.Typeof,
294            exp.UnixToStr,
295            exp.UnixToTimeStr,
296            exp.Upper,
297        }
298    },
299    **{
300        expr_type: {"annotator": annotate_by_numeric_arg}
301        for expr_type in {
302            exp.Ceil,
303            exp.Floor,
304        }
305    },
306    **{
307        expr_type: {"annotator": lambda self, e: self._annotate_by_args(e, "this")}
308        for expr_type in {
309            exp.Abs,
310            exp.AnyValue,
311            exp.ArrayConcatAgg,
312            exp.ArrayReverse,
313            exp.ArraySlice,
314            exp.Filter,
315            exp.FirstValue,
316            exp.HavingMax,
317            exp.LastValue,
318            exp.Limit,
319            exp.NthValue,
320            exp.Order,
321            exp.ArraySort,
322            exp.Window,
323        }
324    },
325    **{
326        expr_type: {"annotator": lambda self, e: self._annotate_by_args(e, "this", "expressions")}
327        for expr_type in {
328            exp.ArrayConcat,
329            exp.Coalesce,
330            exp.Greatest,
331            exp.Least,
332            exp.Max,
333            exp.Min,
334        }
335    },
336    **{
337        expr_type: {"annotator": lambda self, e: self._annotate_by_array_element(e)}
338        for expr_type in {
339            exp.ArrayFirst,
340            exp.ArrayLast,
341        }
342    },
343    exp.Anonymous: {"annotator": lambda self, e: self._set_type(e, self.schema.get_udf_type(e))},
344    **{
345        expr_type: {"annotator": lambda self, e: self._annotate_timeunit(e)}
346        for expr_type in {
347            exp.DateAdd,
348            exp.DateSub,
349            exp.DateTrunc,
350        }
351    },
352    **{
353        expr_type: {"annotator": lambda self, e: self._set_type(e, e.args["to"])}
354        for expr_type in {
355            exp.Cast,
356            exp.TryCast,
357        }
358    },
359    **{
360        expr_type: {"annotator": lambda self, e: self._annotate_map(e)}
361        for expr_type in {
362            exp.Map,
363            exp.VarMap,
364        }
365    },
366    exp.Array: {"annotator": lambda self, e: self._annotate_by_args(e, "expressions", array=True)},
367    exp.ArrayAgg: {"annotator": lambda self, e: self._annotate_by_args(e, "this", array=True)},
368    exp.Bracket: {"annotator": lambda self, e: self._annotate_bracket(e)},
369    exp.Case: {
370        "annotator": lambda self, e: self._annotate_by_args(
371            e, *[if_expr.args["true"] for if_expr in e.args["ifs"]], "default"
372        )
373    },
374    exp.Count: {
375        "annotator": lambda self, e: self._set_type(
376            e, exp.DType.BIGINT if e.args.get("big_int") else exp.DType.INT
377        )
378    },
379    exp.DateDiff: {
380        "annotator": lambda self, e: self._set_type(
381            e, exp.DType.BIGINT if e.args.get("big_int") else exp.DType.INT
382        )
383    },
384    exp.DataType: {"annotator": lambda _, e: e},
385    exp.Div: {"annotator": lambda self, e: self._annotate_div(e)},
386    exp.Distinct: {"annotator": lambda self, e: self._annotate_by_args(e, "expressions")},
387    exp.Dot: {"annotator": lambda self, e: self._annotate_dot(e)},
388    exp.Explode: {"annotator": lambda self, e: self._annotate_explode(e)},
389    exp.Extract: {"annotator": lambda self, e: self._annotate_extract(e)},
390    exp.HexString: {
391        "annotator": lambda self, e: self._set_type(
392            e,
393            exp.DType.BIGINT if e.args.get("is_integer") else exp.DType.BINARY,
394        )
395    },
396    exp.GenerateSeries: {
397        "annotator": lambda self, e: self._annotate_by_args(e, "start", "end", "step", array=True)
398    },
399    exp.GenerateDateArray: {
400        "annotator": lambda self, e: self._set_type(e, exp.DataType.from_str("ARRAY<DATE>"))
401    },
402    exp.GenerateTimestampArray: {
403        "annotator": lambda self, e: self._set_type(e, exp.DataType.from_str("ARRAY<TIMESTAMP>"))
404    },
405    exp.If: {"annotator": lambda self, e: self._annotate_by_args(e, "true", "false")},
406    exp.Lag: {"annotator": lambda self, e: self._annotate_by_args(e, "this", "default")},
407    exp.Lead: {"annotator": lambda self, e: self._annotate_by_args(e, "this", "default")},
408    exp.Literal: {"annotator": lambda self, e: self._annotate_literal(e)},
409    exp.Null: {"returns": exp.DType.NULL},
410    exp.Nullif: {"annotator": lambda self, e: self._annotate_by_args(e, "this", "expression")},
411    exp.PropertyEQ: {"annotator": lambda self, e: self._annotate_by_args(e, "expression")},
412    exp.Struct: {"annotator": lambda self, e: self._annotate_struct(e)},
413    exp.Sum: {
414        "annotator": lambda self, e: self._annotate_by_args(e, "this", "expressions", promote=True)
415    },
416    exp.Timestamp: {
417        "annotator": lambda self, e: self._set_type(
418            e,
419            exp.DType.TIMESTAMPTZ if e.args.get("with_tz") else exp.DType.TIMESTAMP,
420        )
421    },
422    exp.ToMap: {"annotator": lambda self, e: self._annotate_to_map(e)},
423    exp.Unnest: {"annotator": lambda self, e: self._annotate_unnest(e)},
424    exp.WithinGroup: {"annotator": lambda self, e: self._annotate_within_group(e)},
425    exp.Subquery: {"annotator": lambda self, e: self._annotate_subquery(e)},
426}
ExprMetadataType = dict[type[sqlglot.expressions.core.Expr], dict[str, typing.Any]]
def annotate_by_numeric_arg( self: sqlglot.optimizer.annotate_types.TypeAnnotator, expression: sqlglot.expressions.core.Expr) -> sqlglot.expressions.core.Expr:
16def annotate_by_numeric_arg(self: TypeAnnotator, expression: exp.Expr) -> exp.Expr:
17    """
18    Annotates math functions (e.g. FLOOR) that preserve numeric and unknown types, and return INT
19    otherwise.
20
21    Assumes `this` is set, which holds for valid ASTs because it's a required argument.
22    """
23    this: exp.Expr = expression.this
24
25    self._set_type(
26        expression,
27        this.type
28        if this.is_type(exp.DType.UNKNOWN, *exp.DataType.NUMERIC_TYPES)
29        else exp.DType.INT,
30    )
31    return expression

Annotates math functions (e.g. FLOOR) that preserve numeric and unknown types, and return INT otherwise.

Assumes this is set, which holds for valid ASTs because it's a required argument.

def annotate_int_as_double( self: sqlglot.optimizer.annotate_types.TypeAnnotator, expression: sqlglot.expressions.core.Expr) -> sqlglot.expressions.core.Expr:
34def annotate_int_as_double(self: TypeAnnotator, expression: exp.Expr) -> exp.Expr:
35    """
36    Annotates math functions (e.g. FLOOR) that return DOUBLE for integers and strings, and the input
37    type otherwise.
38
39    Assumes `this` is set, which holds for valid ASTs because it's a required argument.
40    """
41    this: exp.Expr = expression.this
42
43    self._set_type(
44        expression,
45        exp.DType.DOUBLE
46        if this.is_type(*exp.DataType.INTEGER_TYPES, *exp.DataType.TEXT_TYPES)
47        else this.type,
48    )
49    return expression

Annotates math functions (e.g. FLOOR) that return DOUBLE for integers and strings, and the input type otherwise.

Assumes this is set, which holds for valid ASTs because it's a required argument.

EXPRESSION_METADATA: dict[type[sqlglot.expressions.core.Expr], dict[str, typing.Any]] = {<class 'sqlglot.expressions.core.Add'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Adjacent'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.And'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayContainedBy'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayContains'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayContainsAll'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayOverlaps'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayPosition'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Binary'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.BitwiseAnd'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.BitwiseLeftShift'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.BitwiseOr'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.BitwiseRightShift'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.BitwiseXor'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.functions.Collate'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Connector'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.Corr'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.DPipe'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.core.Distance'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.DistanceNd'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Div'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.Dot'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.EQ'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Escape'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.ExtendsLeft'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.ExtendsRight'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.GT'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.GTE'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Glob'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.ILike'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.IntDiv'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Is'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONArrayContains'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBContains'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBContainsAllTopKeys'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBContainsAnyTopKeys'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBContainsTopKey'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBDeleteAtPath'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBExtract'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBExtractScalar'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBPathExists'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONExtract'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONExtractScalar'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Kwarg'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.LT'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.LTE'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Like'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Match'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Mod'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Mul'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.NEQ'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.NestedJSONSelect'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.NullSafeEQ'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.NullSafeNEQ'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Operator'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Or'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Overlaps'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Pow'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.core.PropertyEQ'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.string.RegexpFullMatch'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.string.RegexpILike'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.RegexpLike'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.SimilarTo'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Sub'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Xor'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Alias'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.BitwiseNot'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.IgnoreNulls'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Neg'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Not'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Paren'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.PivotAlias'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.RespectNulls'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Unary'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.CountIf'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.aggregate.DenseRank'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.functions.Int64'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.aggregate.Rank'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.core.ApproxDistinct'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.temporal.UnixSeconds'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.array.ArraySize'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.aggregate.Ntile'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.aggregate.RowNumber'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.temporal.UnixMillis'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.temporal.UnixMicros'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.string.FromBase64'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.FromBase32'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.core.Boolean'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.string.EndsWith'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.core.In'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.string.Contains'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.core.Between'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.functions.Exists'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.string.StartsWith'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.aggregate.LogicalOr'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.core.Any'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.aggregate.LogicalAnd'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.core.All'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.math.IsNan'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.math.IsInf'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.temporal.CurrentDate'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.DateStrToDate'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.LastDay'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.DateFromParts'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.TimeStrToDate'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.Date'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.DiToDate'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.TsOrDsToDate'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.StrToDate'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.DatetimeSub'>: {'returns': <DType.DATETIME: 'DATETIME'>}, <class 'sqlglot.expressions.temporal.CurrentDatetime'>: {'returns': <DType.DATETIME: 'DATETIME'>}, <class 'sqlglot.expressions.temporal.DatetimeAdd'>: {'returns': <DType.DATETIME: 'DATETIME'>}, <class 'sqlglot.expressions.temporal.Datetime'>: {'returns': <DType.DATETIME: 'DATETIME'>}, <class 'sqlglot.expressions.math.Exp'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.CumeDist'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Cosh'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Log'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Tanh'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Cbrt'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.Quantile'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Sinh'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.CovarSamp'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.functions.Rand'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Radians'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.Variance'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.Skewness'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Atan'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Sqrt'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.StddevSamp'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.string.ToDouble'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Asin'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Round'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.Stddev'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Acos'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Pi'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Degrees'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Cot'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.ApproxQuantile'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Ln'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Tan'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.PercentRank'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Sin'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.PercentileCont'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.CovarPop'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Cos'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.SafeDivide'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Atanh'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.Avg'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Asinh'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.StddevPop'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.VariancePop'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Acosh'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.Kurtosis'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.temporal.DateToDi'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.Hour'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.Quarter'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.DayOfYear'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.DayOfWeek'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.string.Unicode'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.string.Levenshtein'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.UnixDate'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.string.Ascii'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.string.StrPosition'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.math.Getbit'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.TsOrDiToDi'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.string.BitLength'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.DayOfMonth'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.TimeDiff'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.TimestampDiff'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.string.Length'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.math.Sign'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.DatetimeDiff'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.MakeInterval'>: {'returns': <DType.INTERVAL: 'INTERVAL'>}, <class 'sqlglot.expressions.temporal.JustifyInterval'>: {'returns': <DType.INTERVAL: 'INTERVAL'>}, <class 'sqlglot.expressions.temporal.JustifyHours'>: {'returns': <DType.INTERVAL: 'INTERVAL'>}, <class 'sqlglot.expressions.temporal.JustifyDays'>: {'returns': <DType.INTERVAL: 'INTERVAL'>}, <class 'sqlglot.expressions.datatypes.Interval'>: {'returns': <DType.INTERVAL: 'INTERVAL'>}, <class 'sqlglot.expressions.json.ParseJSON'>: {'returns': <DType.JSON: 'JSON'>}, <class 'sqlglot.expressions.temporal.Localtime'>: {'returns': <DType.TIME: 'TIME'>}, <class 'sqlglot.expressions.temporal.Time'>: {'returns': <DType.TIME: 'TIME'>}, <class 'sqlglot.expressions.temporal.TimeSub'>: {'returns': <DType.TIME: 'TIME'>}, <class 'sqlglot.expressions.temporal.CurrentTime'>: {'returns': <DType.TIME: 'TIME'>}, <class 'sqlglot.expressions.temporal.TimeAdd'>: {'returns': <DType.TIME: 'TIME'>}, <class 'sqlglot.expressions.temporal.TimestampLtzFromParts'>: {'returns': <DType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>}, <class 'sqlglot.expressions.temporal.TimestampTzFromParts'>: {'returns': <DType.TIMESTAMPTZ: 'TIMESTAMPTZ'>}, <class 'sqlglot.expressions.temporal.CurrentTimestampLTZ'>: {'returns': <DType.TIMESTAMPTZ: 'TIMESTAMPTZ'>}, <class 'sqlglot.expressions.temporal.TimestampAdd'>: {'returns': <DType.TIMESTAMP: 'TIMESTAMP'>}, <class 'sqlglot.expressions.temporal.CurrentTimestamp'>: {'returns': <DType.TIMESTAMP: 'TIMESTAMP'>}, <class 'sqlglot.expressions.temporal.TimestampSub'>: {'returns': <DType.TIMESTAMP: 'TIMESTAMP'>}, <class 'sqlglot.expressions.temporal.TimeStrToTime'>: {'returns': <DType.TIMESTAMP: 'TIMESTAMP'>}, <class 'sqlglot.expressions.temporal.UnixToTime'>: {'returns': <DType.TIMESTAMP: 'TIMESTAMP'>}, <class 'sqlglot.expressions.temporal.StrToTime'>: {'returns': <DType.TIMESTAMP: 'TIMESTAMP'>}, <class 'sqlglot.expressions.temporal.WeekOfYear'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.Day'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.Week'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.YearOfWeekIso'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.DayOfWeekIso'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.YearOfWeek'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.Month'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.Year'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.functions.CurrentUser'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.ToBase64'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.query.RawString'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.core.Typeof'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Concat'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentSchema'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentRole'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Space'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.TimeToStr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.array.ArrayToString'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.UnixToStr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Translate'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.Monthname'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Substring'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Initcap'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.DateToDateStr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.String'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.ToBase32'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.ConcatWs'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.aggregate.GroupConcat'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.UnixToTimeStr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.Dayname'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.TsOrDsToDateStr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Chr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentCatalog'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.TimeToTimeStr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.SHA2'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Upper'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Lower'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.SHA'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.SessionUser'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Trim'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentVersion'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.MD5'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Repeat'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.math.Floor'>: {'annotator': <function annotate_by_numeric_arg>}, <class 'sqlglot.expressions.math.Ceil'>: {'annotator': <function annotate_by_numeric_arg>}, <class 'sqlglot.expressions.aggregate.LastValue'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.AnyValue'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.HavingMax'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.query.Limit'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.query.Window'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.query.Order'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Filter'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.NthValue'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.math.Abs'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArraySort'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArraySlice'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.ArrayConcatAgg'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayReverse'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.FirstValue'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.Min'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.functions.Least'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.functions.Greatest'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.Max'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayConcat'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.functions.Coalesce'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayLast'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayFirst'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Anonymous'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.DateAdd'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.temporal.DateTrunc'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.temporal.DateSub'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.functions.TryCast'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.functions.Cast'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.Map'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.VarMap'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.Array'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.aggregate.ArrayAgg'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.Bracket'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.functions.Case'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.aggregate.Count'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.DateDiff'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.datatypes.DataType'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.Distinct'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.array.Explode'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.Extract'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.query.HexString'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.array.GenerateSeries'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.GenerateDateArray'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.GenerateTimestampArray'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.functions.If'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.aggregate.Lag'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.aggregate.Lead'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.Literal'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.Null'>: {'returns': <DType.NULL: 'NULL'>}, <class 'sqlglot.expressions.functions.Nullif'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.array.Struct'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.aggregate.Sum'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.Timestamp'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.array.ToMap'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.array.Unnest'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.WithinGroup'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.query.Subquery'>: {'annotator': <function <lambda>>}}