Edit on GitHub

sqlglot.dialects.clickhouse

  1from __future__ import annotations
  2
  3import typing as t
  4
  5from sqlglot import exp, generator, parser, tokens, transforms
  6from sqlglot.dialects.dialect import (
  7    Dialect,
  8    arg_max_or_min_no_count,
  9    build_date_delta,
 10    build_formatted_time,
 11    inline_array_sql,
 12    json_extract_segments,
 13    json_path_key_only_name,
 14    no_pivot_sql,
 15    build_json_extract_path,
 16    rename_func,
 17    sha256_sql,
 18    var_map_sql,
 19    timestamptrunc_sql,
 20    unit_to_var,
 21)
 22from sqlglot.generator import Generator
 23from sqlglot.helper import is_int, seq_get
 24from sqlglot.tokens import Token, TokenType
 25
 26DATEΤΙΜΕ_DELTA = t.Union[exp.DateAdd, exp.DateDiff, exp.DateSub, exp.TimestampSub, exp.TimestampAdd]
 27
 28
 29def _build_date_format(args: t.List) -> exp.TimeToStr:
 30    expr = build_formatted_time(exp.TimeToStr, "clickhouse")(args)
 31
 32    timezone = seq_get(args, 2)
 33    if timezone:
 34        expr.set("timezone", timezone)
 35
 36    return expr
 37
 38
 39def _unix_to_time_sql(self: ClickHouse.Generator, expression: exp.UnixToTime) -> str:
 40    scale = expression.args.get("scale")
 41    timestamp = expression.this
 42
 43    if scale in (None, exp.UnixToTime.SECONDS):
 44        return self.func("fromUnixTimestamp", exp.cast(timestamp, exp.DataType.Type.BIGINT))
 45    if scale == exp.UnixToTime.MILLIS:
 46        return self.func("fromUnixTimestamp64Milli", exp.cast(timestamp, exp.DataType.Type.BIGINT))
 47    if scale == exp.UnixToTime.MICROS:
 48        return self.func("fromUnixTimestamp64Micro", exp.cast(timestamp, exp.DataType.Type.BIGINT))
 49    if scale == exp.UnixToTime.NANOS:
 50        return self.func("fromUnixTimestamp64Nano", exp.cast(timestamp, exp.DataType.Type.BIGINT))
 51
 52    return self.func(
 53        "fromUnixTimestamp",
 54        exp.cast(
 55            exp.Div(this=timestamp, expression=exp.func("POW", 10, scale)), exp.DataType.Type.BIGINT
 56        ),
 57    )
 58
 59
 60def _lower_func(sql: str) -> str:
 61    index = sql.index("(")
 62    return sql[:index].lower() + sql[index:]
 63
 64
 65def _quantile_sql(self: ClickHouse.Generator, expression: exp.Quantile) -> str:
 66    quantile = expression.args["quantile"]
 67    args = f"({self.sql(expression, 'this')})"
 68
 69    if isinstance(quantile, exp.Array):
 70        func = self.func("quantiles", *quantile)
 71    else:
 72        func = self.func("quantile", quantile)
 73
 74    return func + args
 75
 76
 77def _build_count_if(args: t.List) -> exp.CountIf | exp.CombinedAggFunc:
 78    if len(args) == 1:
 79        return exp.CountIf(this=seq_get(args, 0))
 80
 81    return exp.CombinedAggFunc(this="countIf", expressions=args, parts=("count", "If"))
 82
 83
 84def _datetime_delta_sql(name: str) -> t.Callable[[Generator, DATEΤΙΜΕ_DELTA], str]:
 85    def _delta_sql(self: Generator, expression: DATEΤΙΜΕ_DELTA) -> str:
 86        if not expression.unit:
 87            return rename_func(name)(self, expression)
 88
 89        return self.func(
 90            name,
 91            unit_to_var(expression),
 92            expression.expression,
 93            expression.this,
 94        )
 95
 96    return _delta_sql
 97
 98
 99class ClickHouse(Dialect):
100    NORMALIZE_FUNCTIONS: bool | str = False
101    NULL_ORDERING = "nulls_are_last"
102    SUPPORTS_USER_DEFINED_TYPES = False
103    SAFE_DIVISION = True
104    LOG_BASE_FIRST: t.Optional[bool] = None
105    FORCE_EARLY_ALIAS_REF_EXPANSION = True
106
107    UNESCAPED_SEQUENCES = {
108        "\\0": "\0",
109    }
110
111    class Tokenizer(tokens.Tokenizer):
112        COMMENTS = ["--", "#", "#!", ("/*", "*/")]
113        IDENTIFIERS = ['"', "`"]
114        STRING_ESCAPES = ["'", "\\"]
115        BIT_STRINGS = [("0b", "")]
116        HEX_STRINGS = [("0x", ""), ("0X", "")]
117        HEREDOC_STRINGS = ["$"]
118
119        KEYWORDS = {
120            **tokens.Tokenizer.KEYWORDS,
121            "ATTACH": TokenType.COMMAND,
122            "DATE32": TokenType.DATE32,
123            "DATETIME64": TokenType.DATETIME64,
124            "DICTIONARY": TokenType.DICTIONARY,
125            "ENUM8": TokenType.ENUM8,
126            "ENUM16": TokenType.ENUM16,
127            "FINAL": TokenType.FINAL,
128            "FIXEDSTRING": TokenType.FIXEDSTRING,
129            "FLOAT32": TokenType.FLOAT,
130            "FLOAT64": TokenType.DOUBLE,
131            "GLOBAL": TokenType.GLOBAL,
132            "INT256": TokenType.INT256,
133            "LOWCARDINALITY": TokenType.LOWCARDINALITY,
134            "MAP": TokenType.MAP,
135            "NESTED": TokenType.NESTED,
136            "SAMPLE": TokenType.TABLE_SAMPLE,
137            "TUPLE": TokenType.STRUCT,
138            "UINT128": TokenType.UINT128,
139            "UINT16": TokenType.USMALLINT,
140            "UINT256": TokenType.UINT256,
141            "UINT32": TokenType.UINT,
142            "UINT64": TokenType.UBIGINT,
143            "UINT8": TokenType.UTINYINT,
144            "IPV4": TokenType.IPV4,
145            "IPV6": TokenType.IPV6,
146            "AGGREGATEFUNCTION": TokenType.AGGREGATEFUNCTION,
147            "SIMPLEAGGREGATEFUNCTION": TokenType.SIMPLEAGGREGATEFUNCTION,
148            "SYSTEM": TokenType.COMMAND,
149            "PREWHERE": TokenType.PREWHERE,
150        }
151        KEYWORDS.pop("/*+")
152
153        SINGLE_TOKENS = {
154            **tokens.Tokenizer.SINGLE_TOKENS,
155            "$": TokenType.HEREDOC_STRING,
156        }
157
158    class Parser(parser.Parser):
159        # Tested in ClickHouse's playground, it seems that the following two queries do the same thing
160        # * select x from t1 union all select x from t2 limit 1;
161        # * select x from t1 union all (select x from t2 limit 1);
162        MODIFIERS_ATTACHED_TO_SET_OP = False
163        INTERVAL_SPANS = False
164
165        FUNCTIONS = {
166            **parser.Parser.FUNCTIONS,
167            "ANY": exp.AnyValue.from_arg_list,
168            "ARRAYSUM": exp.ArraySum.from_arg_list,
169            "COUNTIF": _build_count_if,
170            "DATE_ADD": build_date_delta(exp.DateAdd, default_unit=None),
171            "DATEADD": build_date_delta(exp.DateAdd, default_unit=None),
172            "DATE_DIFF": build_date_delta(exp.DateDiff, default_unit=None),
173            "DATEDIFF": build_date_delta(exp.DateDiff, default_unit=None),
174            "DATE_FORMAT": _build_date_format,
175            "DATE_SUB": build_date_delta(exp.DateSub, default_unit=None),
176            "DATESUB": build_date_delta(exp.DateSub, default_unit=None),
177            "FORMATDATETIME": _build_date_format,
178            "JSONEXTRACTSTRING": build_json_extract_path(
179                exp.JSONExtractScalar, zero_based_indexing=False
180            ),
181            "MAP": parser.build_var_map,
182            "MATCH": exp.RegexpLike.from_arg_list,
183            "RANDCANONICAL": exp.Rand.from_arg_list,
184            "TUPLE": exp.Struct.from_arg_list,
185            "TIMESTAMP_SUB": build_date_delta(exp.TimestampSub, default_unit=None),
186            "TIMESTAMPSUB": build_date_delta(exp.TimestampSub, default_unit=None),
187            "TIMESTAMP_ADD": build_date_delta(exp.TimestampAdd, default_unit=None),
188            "TIMESTAMPADD": build_date_delta(exp.TimestampAdd, default_unit=None),
189            "UNIQ": exp.ApproxDistinct.from_arg_list,
190            "XOR": lambda args: exp.Xor(expressions=args),
191            "MD5": exp.MD5Digest.from_arg_list,
192            "SHA256": lambda args: exp.SHA2(this=seq_get(args, 0), length=exp.Literal.number(256)),
193            "SHA512": lambda args: exp.SHA2(this=seq_get(args, 0), length=exp.Literal.number(512)),
194        }
195
196        AGG_FUNCTIONS = {
197            "count",
198            "min",
199            "max",
200            "sum",
201            "avg",
202            "any",
203            "stddevPop",
204            "stddevSamp",
205            "varPop",
206            "varSamp",
207            "corr",
208            "covarPop",
209            "covarSamp",
210            "entropy",
211            "exponentialMovingAverage",
212            "intervalLengthSum",
213            "kolmogorovSmirnovTest",
214            "mannWhitneyUTest",
215            "median",
216            "rankCorr",
217            "sumKahan",
218            "studentTTest",
219            "welchTTest",
220            "anyHeavy",
221            "anyLast",
222            "boundingRatio",
223            "first_value",
224            "last_value",
225            "argMin",
226            "argMax",
227            "avgWeighted",
228            "topK",
229            "topKWeighted",
230            "deltaSum",
231            "deltaSumTimestamp",
232            "groupArray",
233            "groupArrayLast",
234            "groupUniqArray",
235            "groupArrayInsertAt",
236            "groupArrayMovingAvg",
237            "groupArrayMovingSum",
238            "groupArraySample",
239            "groupBitAnd",
240            "groupBitOr",
241            "groupBitXor",
242            "groupBitmap",
243            "groupBitmapAnd",
244            "groupBitmapOr",
245            "groupBitmapXor",
246            "sumWithOverflow",
247            "sumMap",
248            "minMap",
249            "maxMap",
250            "skewSamp",
251            "skewPop",
252            "kurtSamp",
253            "kurtPop",
254            "uniq",
255            "uniqExact",
256            "uniqCombined",
257            "uniqCombined64",
258            "uniqHLL12",
259            "uniqTheta",
260            "quantile",
261            "quantiles",
262            "quantileExact",
263            "quantilesExact",
264            "quantileExactLow",
265            "quantilesExactLow",
266            "quantileExactHigh",
267            "quantilesExactHigh",
268            "quantileExactWeighted",
269            "quantilesExactWeighted",
270            "quantileTiming",
271            "quantilesTiming",
272            "quantileTimingWeighted",
273            "quantilesTimingWeighted",
274            "quantileDeterministic",
275            "quantilesDeterministic",
276            "quantileTDigest",
277            "quantilesTDigest",
278            "quantileTDigestWeighted",
279            "quantilesTDigestWeighted",
280            "quantileBFloat16",
281            "quantilesBFloat16",
282            "quantileBFloat16Weighted",
283            "quantilesBFloat16Weighted",
284            "simpleLinearRegression",
285            "stochasticLinearRegression",
286            "stochasticLogisticRegression",
287            "categoricalInformationValue",
288            "contingency",
289            "cramersV",
290            "cramersVBiasCorrected",
291            "theilsU",
292            "maxIntersections",
293            "maxIntersectionsPosition",
294            "meanZTest",
295            "quantileInterpolatedWeighted",
296            "quantilesInterpolatedWeighted",
297            "quantileGK",
298            "quantilesGK",
299            "sparkBar",
300            "sumCount",
301            "largestTriangleThreeBuckets",
302            "histogram",
303            "sequenceMatch",
304            "sequenceCount",
305            "windowFunnel",
306            "retention",
307            "uniqUpTo",
308            "sequenceNextNode",
309            "exponentialTimeDecayedAvg",
310        }
311
312        AGG_FUNCTIONS_SUFFIXES = [
313            "If",
314            "Array",
315            "ArrayIf",
316            "Map",
317            "SimpleState",
318            "State",
319            "Merge",
320            "MergeState",
321            "ForEach",
322            "Distinct",
323            "OrDefault",
324            "OrNull",
325            "Resample",
326            "ArgMin",
327            "ArgMax",
328        ]
329
330        FUNC_TOKENS = {
331            *parser.Parser.FUNC_TOKENS,
332            TokenType.SET,
333        }
334
335        AGG_FUNC_MAPPING = (
336            lambda functions, suffixes: {
337                f"{f}{sfx}": (f, sfx) for sfx in (suffixes + [""]) for f in functions
338            }
339        )(AGG_FUNCTIONS, AGG_FUNCTIONS_SUFFIXES)
340
341        FUNCTIONS_WITH_ALIASED_ARGS = {*parser.Parser.FUNCTIONS_WITH_ALIASED_ARGS, "TUPLE"}
342
343        FUNCTION_PARSERS = {
344            **parser.Parser.FUNCTION_PARSERS,
345            "ARRAYJOIN": lambda self: self.expression(exp.Explode, this=self._parse_expression()),
346            "QUANTILE": lambda self: self._parse_quantile(),
347        }
348
349        FUNCTION_PARSERS.pop("MATCH")
350
351        NO_PAREN_FUNCTION_PARSERS = parser.Parser.NO_PAREN_FUNCTION_PARSERS.copy()
352        NO_PAREN_FUNCTION_PARSERS.pop("ANY")
353
354        RANGE_PARSERS = {
355            **parser.Parser.RANGE_PARSERS,
356            TokenType.GLOBAL: lambda self, this: self._match(TokenType.IN)
357            and self._parse_in(this, is_global=True),
358        }
359
360        # The PLACEHOLDER entry is popped because 1) it doesn't affect Clickhouse (it corresponds to
361        # the postgres-specific JSONBContains parser) and 2) it makes parsing the ternary op simpler.
362        COLUMN_OPERATORS = parser.Parser.COLUMN_OPERATORS.copy()
363        COLUMN_OPERATORS.pop(TokenType.PLACEHOLDER)
364
365        JOIN_KINDS = {
366            *parser.Parser.JOIN_KINDS,
367            TokenType.ANY,
368            TokenType.ASOF,
369            TokenType.ARRAY,
370        }
371
372        TABLE_ALIAS_TOKENS = parser.Parser.TABLE_ALIAS_TOKENS - {
373            TokenType.ANY,
374            TokenType.ARRAY,
375            TokenType.FINAL,
376            TokenType.FORMAT,
377            TokenType.SETTINGS,
378        }
379
380        ALIAS_TOKENS = parser.Parser.ALIAS_TOKENS - {
381            TokenType.FORMAT,
382        }
383
384        LOG_DEFAULTS_TO_LN = True
385
386        QUERY_MODIFIER_PARSERS = {
387            **parser.Parser.QUERY_MODIFIER_PARSERS,
388            TokenType.SETTINGS: lambda self: (
389                "settings",
390                self._advance() or self._parse_csv(self._parse_assignment),
391            ),
392            TokenType.FORMAT: lambda self: ("format", self._advance() or self._parse_id_var()),
393        }
394
395        CONSTRAINT_PARSERS = {
396            **parser.Parser.CONSTRAINT_PARSERS,
397            "INDEX": lambda self: self._parse_index_constraint(),
398            "CODEC": lambda self: self._parse_compress(),
399        }
400
401        ALTER_PARSERS = {
402            **parser.Parser.ALTER_PARSERS,
403            "REPLACE": lambda self: self._parse_alter_table_replace(),
404        }
405
406        SCHEMA_UNNAMED_CONSTRAINTS = {
407            *parser.Parser.SCHEMA_UNNAMED_CONSTRAINTS,
408            "INDEX",
409        }
410
411        def _parse_assignment(self) -> t.Optional[exp.Expression]:
412            this = super()._parse_assignment()
413
414            if self._match(TokenType.PLACEHOLDER):
415                return self.expression(
416                    exp.If,
417                    this=this,
418                    true=self._parse_assignment(),
419                    false=self._match(TokenType.COLON) and self._parse_assignment(),
420                )
421
422            return this
423
424        def _parse_placeholder(self) -> t.Optional[exp.Expression]:
425            """
426            Parse a placeholder expression like SELECT {abc: UInt32} or FROM {table: Identifier}
427            https://clickhouse.com/docs/en/sql-reference/syntax#defining-and-using-query-parameters
428            """
429            if not self._match(TokenType.L_BRACE):
430                return None
431
432            this = self._parse_id_var()
433            self._match(TokenType.COLON)
434            kind = self._parse_types(check_func=False, allow_identifiers=False) or (
435                self._match_text_seq("IDENTIFIER") and "Identifier"
436            )
437
438            if not kind:
439                self.raise_error("Expecting a placeholder type or 'Identifier' for tables")
440            elif not self._match(TokenType.R_BRACE):
441                self.raise_error("Expecting }")
442
443            return self.expression(exp.Placeholder, this=this, kind=kind)
444
445        def _parse_in(self, this: t.Optional[exp.Expression], is_global: bool = False) -> exp.In:
446            this = super()._parse_in(this)
447            this.set("is_global", is_global)
448            return this
449
450        def _parse_table(
451            self,
452            schema: bool = False,
453            joins: bool = False,
454            alias_tokens: t.Optional[t.Collection[TokenType]] = None,
455            parse_bracket: bool = False,
456            is_db_reference: bool = False,
457            parse_partition: bool = False,
458        ) -> t.Optional[exp.Expression]:
459            this = super()._parse_table(
460                schema=schema,
461                joins=joins,
462                alias_tokens=alias_tokens,
463                parse_bracket=parse_bracket,
464                is_db_reference=is_db_reference,
465            )
466
467            if self._match(TokenType.FINAL):
468                this = self.expression(exp.Final, this=this)
469
470            return this
471
472        def _parse_position(self, haystack_first: bool = False) -> exp.StrPosition:
473            return super()._parse_position(haystack_first=True)
474
475        # https://clickhouse.com/docs/en/sql-reference/statements/select/with/
476        def _parse_cte(self) -> exp.CTE:
477            # WITH <identifier> AS <subquery expression>
478            cte: t.Optional[exp.CTE] = self._try_parse(super()._parse_cte)
479
480            if not cte:
481                # WITH <expression> AS <identifier>
482                cte = self.expression(
483                    exp.CTE,
484                    this=self._parse_assignment(),
485                    alias=self._parse_table_alias(),
486                    scalar=True,
487                )
488
489            return cte
490
491        def _parse_join_parts(
492            self,
493        ) -> t.Tuple[t.Optional[Token], t.Optional[Token], t.Optional[Token]]:
494            is_global = self._match(TokenType.GLOBAL) and self._prev
495            kind_pre = self._match_set(self.JOIN_KINDS, advance=False) and self._prev
496
497            if kind_pre:
498                kind = self._match_set(self.JOIN_KINDS) and self._prev
499                side = self._match_set(self.JOIN_SIDES) and self._prev
500                return is_global, side, kind
501
502            return (
503                is_global,
504                self._match_set(self.JOIN_SIDES) and self._prev,
505                self._match_set(self.JOIN_KINDS) and self._prev,
506            )
507
508        def _parse_join(
509            self, skip_join_token: bool = False, parse_bracket: bool = False
510        ) -> t.Optional[exp.Join]:
511            join = super()._parse_join(skip_join_token=skip_join_token, parse_bracket=True)
512            if join:
513                join.set("global", join.args.pop("method", None))
514
515            return join
516
517        def _parse_function(
518            self,
519            functions: t.Optional[t.Dict[str, t.Callable]] = None,
520            anonymous: bool = False,
521            optional_parens: bool = True,
522            any_token: bool = False,
523        ) -> t.Optional[exp.Expression]:
524            expr = super()._parse_function(
525                functions=functions,
526                anonymous=anonymous,
527                optional_parens=optional_parens,
528                any_token=any_token,
529            )
530
531            func = expr.this if isinstance(expr, exp.Window) else expr
532
533            # Aggregate functions can be split in 2 parts: <func_name><suffix>
534            parts = (
535                self.AGG_FUNC_MAPPING.get(func.this) if isinstance(func, exp.Anonymous) else None
536            )
537
538            if parts:
539                params = self._parse_func_params(func)
540
541                kwargs = {
542                    "this": func.this,
543                    "expressions": func.expressions,
544                }
545                if parts[1]:
546                    kwargs["parts"] = parts
547                    exp_class = exp.CombinedParameterizedAgg if params else exp.CombinedAggFunc
548                else:
549                    exp_class = exp.ParameterizedAgg if params else exp.AnonymousAggFunc
550
551                kwargs["exp_class"] = exp_class
552                if params:
553                    kwargs["params"] = params
554
555                func = self.expression(**kwargs)
556
557                if isinstance(expr, exp.Window):
558                    # The window's func was parsed as Anonymous in base parser, fix its
559                    # type to be CH style CombinedAnonymousAggFunc / AnonymousAggFunc
560                    expr.set("this", func)
561                elif params:
562                    # Params have blocked super()._parse_function() from parsing the following window
563                    # (if that exists) as they're standing between the function call and the window spec
564                    expr = self._parse_window(func)
565                else:
566                    expr = func
567
568            return expr
569
570        def _parse_func_params(
571            self, this: t.Optional[exp.Func] = None
572        ) -> t.Optional[t.List[exp.Expression]]:
573            if self._match_pair(TokenType.R_PAREN, TokenType.L_PAREN):
574                return self._parse_csv(self._parse_lambda)
575
576            if self._match(TokenType.L_PAREN):
577                params = self._parse_csv(self._parse_lambda)
578                self._match_r_paren(this)
579                return params
580
581            return None
582
583        def _parse_quantile(self) -> exp.Quantile:
584            this = self._parse_lambda()
585            params = self._parse_func_params()
586            if params:
587                return self.expression(exp.Quantile, this=params[0], quantile=this)
588            return self.expression(exp.Quantile, this=this, quantile=exp.Literal.number(0.5))
589
590        def _parse_wrapped_id_vars(self, optional: bool = False) -> t.List[exp.Expression]:
591            return super()._parse_wrapped_id_vars(optional=True)
592
593        def _parse_primary_key(
594            self, wrapped_optional: bool = False, in_props: bool = False
595        ) -> exp.PrimaryKeyColumnConstraint | exp.PrimaryKey:
596            return super()._parse_primary_key(
597                wrapped_optional=wrapped_optional or in_props, in_props=in_props
598            )
599
600        def _parse_on_property(self) -> t.Optional[exp.Expression]:
601            index = self._index
602            if self._match_text_seq("CLUSTER"):
603                this = self._parse_id_var()
604                if this:
605                    return self.expression(exp.OnCluster, this=this)
606                else:
607                    self._retreat(index)
608            return None
609
610        def _parse_index_constraint(
611            self, kind: t.Optional[str] = None
612        ) -> exp.IndexColumnConstraint:
613            # INDEX name1 expr TYPE type1(args) GRANULARITY value
614            this = self._parse_id_var()
615            expression = self._parse_assignment()
616
617            index_type = self._match_text_seq("TYPE") and (
618                self._parse_function() or self._parse_var()
619            )
620
621            granularity = self._match_text_seq("GRANULARITY") and self._parse_term()
622
623            return self.expression(
624                exp.IndexColumnConstraint,
625                this=this,
626                expression=expression,
627                index_type=index_type,
628                granularity=granularity,
629            )
630
631        def _parse_partition(self) -> t.Optional[exp.Partition]:
632            # https://clickhouse.com/docs/en/sql-reference/statements/alter/partition#how-to-set-partition-expression
633            if not self._match(TokenType.PARTITION):
634                return None
635
636            if self._match_text_seq("ID"):
637                # Corresponds to the PARTITION ID <string_value> syntax
638                expressions: t.List[exp.Expression] = [
639                    self.expression(exp.PartitionId, this=self._parse_string())
640                ]
641            else:
642                expressions = self._parse_expressions()
643
644            return self.expression(exp.Partition, expressions=expressions)
645
646        def _parse_alter_table_replace(self) -> t.Optional[exp.Expression]:
647            partition = self._parse_partition()
648
649            if not partition or not self._match(TokenType.FROM):
650                return None
651
652            return self.expression(
653                exp.ReplacePartition, expression=partition, source=self._parse_table_parts()
654            )
655
656        def _parse_projection_def(self) -> t.Optional[exp.ProjectionDef]:
657            if not self._match_text_seq("PROJECTION"):
658                return None
659
660            return self.expression(
661                exp.ProjectionDef,
662                this=self._parse_id_var(),
663                expression=self._parse_wrapped(self._parse_statement),
664            )
665
666        def _parse_constraint(self) -> t.Optional[exp.Expression]:
667            return super()._parse_constraint() or self._parse_projection_def()
668
669    class Generator(generator.Generator):
670        QUERY_HINTS = False
671        STRUCT_DELIMITER = ("(", ")")
672        NVL2_SUPPORTED = False
673        TABLESAMPLE_REQUIRES_PARENS = False
674        TABLESAMPLE_SIZE_IS_ROWS = False
675        TABLESAMPLE_KEYWORDS = "SAMPLE"
676        LAST_DAY_SUPPORTS_DATE_PART = False
677        CAN_IMPLEMENT_ARRAY_ANY = True
678        SUPPORTS_TO_NUMBER = False
679        JOIN_HINTS = False
680        TABLE_HINTS = False
681        EXPLICIT_SET_OP = True
682        GROUPINGS_SEP = ""
683        SET_OP_MODIFIERS = False
684
685        STRING_TYPE_MAPPING = {
686            exp.DataType.Type.CHAR: "String",
687            exp.DataType.Type.LONGBLOB: "String",
688            exp.DataType.Type.LONGTEXT: "String",
689            exp.DataType.Type.MEDIUMBLOB: "String",
690            exp.DataType.Type.MEDIUMTEXT: "String",
691            exp.DataType.Type.TINYBLOB: "String",
692            exp.DataType.Type.TINYTEXT: "String",
693            exp.DataType.Type.TEXT: "String",
694            exp.DataType.Type.VARBINARY: "String",
695            exp.DataType.Type.VARCHAR: "String",
696        }
697
698        SUPPORTED_JSON_PATH_PARTS = {
699            exp.JSONPathKey,
700            exp.JSONPathRoot,
701            exp.JSONPathSubscript,
702        }
703
704        TYPE_MAPPING = {
705            **generator.Generator.TYPE_MAPPING,
706            **STRING_TYPE_MAPPING,
707            exp.DataType.Type.ARRAY: "Array",
708            exp.DataType.Type.BIGINT: "Int64",
709            exp.DataType.Type.DATE32: "Date32",
710            exp.DataType.Type.DATETIME64: "DateTime64",
711            exp.DataType.Type.DOUBLE: "Float64",
712            exp.DataType.Type.ENUM: "Enum",
713            exp.DataType.Type.ENUM8: "Enum8",
714            exp.DataType.Type.ENUM16: "Enum16",
715            exp.DataType.Type.FIXEDSTRING: "FixedString",
716            exp.DataType.Type.FLOAT: "Float32",
717            exp.DataType.Type.INT: "Int32",
718            exp.DataType.Type.MEDIUMINT: "Int32",
719            exp.DataType.Type.INT128: "Int128",
720            exp.DataType.Type.INT256: "Int256",
721            exp.DataType.Type.LOWCARDINALITY: "LowCardinality",
722            exp.DataType.Type.MAP: "Map",
723            exp.DataType.Type.NESTED: "Nested",
724            exp.DataType.Type.NULLABLE: "Nullable",
725            exp.DataType.Type.SMALLINT: "Int16",
726            exp.DataType.Type.STRUCT: "Tuple",
727            exp.DataType.Type.TINYINT: "Int8",
728            exp.DataType.Type.UBIGINT: "UInt64",
729            exp.DataType.Type.UINT: "UInt32",
730            exp.DataType.Type.UINT128: "UInt128",
731            exp.DataType.Type.UINT256: "UInt256",
732            exp.DataType.Type.USMALLINT: "UInt16",
733            exp.DataType.Type.UTINYINT: "UInt8",
734            exp.DataType.Type.IPV4: "IPv4",
735            exp.DataType.Type.IPV6: "IPv6",
736            exp.DataType.Type.AGGREGATEFUNCTION: "AggregateFunction",
737            exp.DataType.Type.SIMPLEAGGREGATEFUNCTION: "SimpleAggregateFunction",
738        }
739
740        TRANSFORMS = {
741            **generator.Generator.TRANSFORMS,
742            exp.AnyValue: rename_func("any"),
743            exp.ApproxDistinct: rename_func("uniq"),
744            exp.ArrayFilter: lambda self, e: self.func("arrayFilter", e.expression, e.this),
745            exp.ArraySize: rename_func("LENGTH"),
746            exp.ArraySum: rename_func("arraySum"),
747            exp.ArgMax: arg_max_or_min_no_count("argMax"),
748            exp.ArgMin: arg_max_or_min_no_count("argMin"),
749            exp.Array: inline_array_sql,
750            exp.CastToStrType: rename_func("CAST"),
751            exp.CountIf: rename_func("countIf"),
752            exp.CompressColumnConstraint: lambda self,
753            e: f"CODEC({self.expressions(e, key='this', flat=True)})",
754            exp.ComputedColumnConstraint: lambda self,
755            e: f"{'MATERIALIZED' if e.args.get('persisted') else 'ALIAS'} {self.sql(e, 'this')}",
756            exp.CurrentDate: lambda self, e: self.func("CURRENT_DATE"),
757            exp.DateAdd: _datetime_delta_sql("DATE_ADD"),
758            exp.DateDiff: _datetime_delta_sql("DATE_DIFF"),
759            exp.DateSub: _datetime_delta_sql("DATE_SUB"),
760            exp.Explode: rename_func("arrayJoin"),
761            exp.Final: lambda self, e: f"{self.sql(e, 'this')} FINAL",
762            exp.IsNan: rename_func("isNaN"),
763            exp.JSONExtract: json_extract_segments("JSONExtractString", quoted_index=False),
764            exp.JSONExtractScalar: json_extract_segments("JSONExtractString", quoted_index=False),
765            exp.JSONPathKey: json_path_key_only_name,
766            exp.JSONPathRoot: lambda *_: "",
767            exp.Map: lambda self, e: _lower_func(var_map_sql(self, e)),
768            exp.Nullif: rename_func("nullIf"),
769            exp.PartitionedByProperty: lambda self, e: f"PARTITION BY {self.sql(e, 'this')}",
770            exp.Pivot: no_pivot_sql,
771            exp.Quantile: _quantile_sql,
772            exp.RegexpLike: lambda self, e: self.func("match", e.this, e.expression),
773            exp.Rand: rename_func("randCanonical"),
774            exp.Select: transforms.preprocess([transforms.eliminate_qualify]),
775            exp.StartsWith: rename_func("startsWith"),
776            exp.StrPosition: lambda self, e: self.func(
777                "position", e.this, e.args.get("substr"), e.args.get("position")
778            ),
779            exp.TimeToStr: lambda self, e: self.func(
780                "DATE_FORMAT", e.this, self.format_time(e), e.args.get("timezone")
781            ),
782            exp.TimestampAdd: _datetime_delta_sql("TIMESTAMP_ADD"),
783            exp.TimestampSub: _datetime_delta_sql("TIMESTAMP_SUB"),
784            exp.VarMap: lambda self, e: _lower_func(var_map_sql(self, e)),
785            exp.Xor: lambda self, e: self.func("xor", e.this, e.expression, *e.expressions),
786            exp.MD5Digest: rename_func("MD5"),
787            exp.MD5: lambda self, e: self.func("LOWER", self.func("HEX", self.func("MD5", e.this))),
788            exp.SHA: rename_func("SHA1"),
789            exp.SHA2: sha256_sql,
790            exp.UnixToTime: _unix_to_time_sql,
791            exp.TimestampTrunc: timestamptrunc_sql(zone=True),
792            exp.Variance: rename_func("varSamp"),
793            exp.Stddev: rename_func("stddevSamp"),
794        }
795
796        PROPERTIES_LOCATION = {
797            **generator.Generator.PROPERTIES_LOCATION,
798            exp.VolatileProperty: exp.Properties.Location.UNSUPPORTED,
799            exp.PartitionedByProperty: exp.Properties.Location.POST_SCHEMA,
800            exp.OnCluster: exp.Properties.Location.POST_NAME,
801        }
802
803        # there's no list in docs, but it can be found in Clickhouse code
804        # see `ClickHouse/src/Parsers/ParserCreate*.cpp`
805        ON_CLUSTER_TARGETS = {
806            "DATABASE",
807            "TABLE",
808            "VIEW",
809            "DICTIONARY",
810            "INDEX",
811            "FUNCTION",
812            "NAMED COLLECTION",
813        }
814
815        def _jsonpathsubscript_sql(self, expression: exp.JSONPathSubscript) -> str:
816            this = self.json_path_part(expression.this)
817            return str(int(this) + 1) if is_int(this) else this
818
819        def likeproperty_sql(self, expression: exp.LikeProperty) -> str:
820            return f"AS {self.sql(expression, 'this')}"
821
822        def _any_to_has(
823            self,
824            expression: exp.EQ | exp.NEQ,
825            default: t.Callable[[t.Any], str],
826            prefix: str = "",
827        ) -> str:
828            if isinstance(expression.left, exp.Any):
829                arr = expression.left
830                this = expression.right
831            elif isinstance(expression.right, exp.Any):
832                arr = expression.right
833                this = expression.left
834            else:
835                return default(expression)
836
837            return prefix + self.func("has", arr.this.unnest(), this)
838
839        def eq_sql(self, expression: exp.EQ) -> str:
840            return self._any_to_has(expression, super().eq_sql)
841
842        def neq_sql(self, expression: exp.NEQ) -> str:
843            return self._any_to_has(expression, super().neq_sql, "NOT ")
844
845        def regexpilike_sql(self, expression: exp.RegexpILike) -> str:
846            # Manually add a flag to make the search case-insensitive
847            regex = self.func("CONCAT", "'(?i)'", expression.expression)
848            return self.func("match", expression.this, regex)
849
850        def datatype_sql(self, expression: exp.DataType) -> str:
851            # String is the standard ClickHouse type, every other variant is just an alias.
852            # Additionally, any supplied length parameter will be ignored.
853            #
854            # https://clickhouse.com/docs/en/sql-reference/data-types/string
855            if expression.this in self.STRING_TYPE_MAPPING:
856                return "String"
857
858            return super().datatype_sql(expression)
859
860        def cte_sql(self, expression: exp.CTE) -> str:
861            if expression.args.get("scalar"):
862                this = self.sql(expression, "this")
863                alias = self.sql(expression, "alias")
864                return f"{this} AS {alias}"
865
866            return super().cte_sql(expression)
867
868        def after_limit_modifiers(self, expression: exp.Expression) -> t.List[str]:
869            return super().after_limit_modifiers(expression) + [
870                (
871                    self.seg("SETTINGS ") + self.expressions(expression, key="settings", flat=True)
872                    if expression.args.get("settings")
873                    else ""
874                ),
875                (
876                    self.seg("FORMAT ") + self.sql(expression, "format")
877                    if expression.args.get("format")
878                    else ""
879                ),
880            ]
881
882        def parameterizedagg_sql(self, expression: exp.ParameterizedAgg) -> str:
883            params = self.expressions(expression, key="params", flat=True)
884            return self.func(expression.name, *expression.expressions) + f"({params})"
885
886        def anonymousaggfunc_sql(self, expression: exp.AnonymousAggFunc) -> str:
887            return self.func(expression.name, *expression.expressions)
888
889        def combinedaggfunc_sql(self, expression: exp.CombinedAggFunc) -> str:
890            return self.anonymousaggfunc_sql(expression)
891
892        def combinedparameterizedagg_sql(self, expression: exp.CombinedParameterizedAgg) -> str:
893            return self.parameterizedagg_sql(expression)
894
895        def placeholder_sql(self, expression: exp.Placeholder) -> str:
896            return f"{{{expression.name}: {self.sql(expression, 'kind')}}}"
897
898        def oncluster_sql(self, expression: exp.OnCluster) -> str:
899            return f"ON CLUSTER {self.sql(expression, 'this')}"
900
901        def createable_sql(self, expression: exp.Create, locations: t.DefaultDict) -> str:
902            if expression.kind in self.ON_CLUSTER_TARGETS and locations.get(
903                exp.Properties.Location.POST_NAME
904            ):
905                this_name = self.sql(expression.this, "this")
906                this_properties = " ".join(
907                    [self.sql(prop) for prop in locations[exp.Properties.Location.POST_NAME]]
908                )
909                this_schema = self.schema_columns_sql(expression.this)
910                return f"{this_name}{self.sep()}{this_properties}{self.sep()}{this_schema}"
911
912            return super().createable_sql(expression, locations)
913
914        def prewhere_sql(self, expression: exp.PreWhere) -> str:
915            this = self.indent(self.sql(expression, "this"))
916            return f"{self.seg('PREWHERE')}{self.sep()}{this}"
917
918        def indexcolumnconstraint_sql(self, expression: exp.IndexColumnConstraint) -> str:
919            this = self.sql(expression, "this")
920            this = f" {this}" if this else ""
921            expr = self.sql(expression, "expression")
922            expr = f" {expr}" if expr else ""
923            index_type = self.sql(expression, "index_type")
924            index_type = f" TYPE {index_type}" if index_type else ""
925            granularity = self.sql(expression, "granularity")
926            granularity = f" GRANULARITY {granularity}" if granularity else ""
927
928            return f"INDEX{this}{expr}{index_type}{granularity}"
929
930        def partition_sql(self, expression: exp.Partition) -> str:
931            return f"PARTITION {self.expressions(expression, flat=True)}"
932
933        def partitionid_sql(self, expression: exp.PartitionId) -> str:
934            return f"ID {self.sql(expression.this)}"
935
936        def replacepartition_sql(self, expression: exp.ReplacePartition) -> str:
937            return (
938                f"REPLACE {self.sql(expression.expression)} FROM {self.sql(expression, 'source')}"
939            )
940
941        def projectiondef_sql(self, expression: exp.ProjectionDef) -> str:
942            return f"PROJECTION {self.sql(expression.this)} {self.wrap(expression.expression)}"
class ClickHouse(sqlglot.dialects.dialect.Dialect):
100class ClickHouse(Dialect):
101    NORMALIZE_FUNCTIONS: bool | str = False
102    NULL_ORDERING = "nulls_are_last"
103    SUPPORTS_USER_DEFINED_TYPES = False
104    SAFE_DIVISION = True
105    LOG_BASE_FIRST: t.Optional[bool] = None
106    FORCE_EARLY_ALIAS_REF_EXPANSION = True
107
108    UNESCAPED_SEQUENCES = {
109        "\\0": "\0",
110    }
111
112    class Tokenizer(tokens.Tokenizer):
113        COMMENTS = ["--", "#", "#!", ("/*", "*/")]
114        IDENTIFIERS = ['"', "`"]
115        STRING_ESCAPES = ["'", "\\"]
116        BIT_STRINGS = [("0b", "")]
117        HEX_STRINGS = [("0x", ""), ("0X", "")]
118        HEREDOC_STRINGS = ["$"]
119
120        KEYWORDS = {
121            **tokens.Tokenizer.KEYWORDS,
122            "ATTACH": TokenType.COMMAND,
123            "DATE32": TokenType.DATE32,
124            "DATETIME64": TokenType.DATETIME64,
125            "DICTIONARY": TokenType.DICTIONARY,
126            "ENUM8": TokenType.ENUM8,
127            "ENUM16": TokenType.ENUM16,
128            "FINAL": TokenType.FINAL,
129            "FIXEDSTRING": TokenType.FIXEDSTRING,
130            "FLOAT32": TokenType.FLOAT,
131            "FLOAT64": TokenType.DOUBLE,
132            "GLOBAL": TokenType.GLOBAL,
133            "INT256": TokenType.INT256,
134            "LOWCARDINALITY": TokenType.LOWCARDINALITY,
135            "MAP": TokenType.MAP,
136            "NESTED": TokenType.NESTED,
137            "SAMPLE": TokenType.TABLE_SAMPLE,
138            "TUPLE": TokenType.STRUCT,
139            "UINT128": TokenType.UINT128,
140            "UINT16": TokenType.USMALLINT,
141            "UINT256": TokenType.UINT256,
142            "UINT32": TokenType.UINT,
143            "UINT64": TokenType.UBIGINT,
144            "UINT8": TokenType.UTINYINT,
145            "IPV4": TokenType.IPV4,
146            "IPV6": TokenType.IPV6,
147            "AGGREGATEFUNCTION": TokenType.AGGREGATEFUNCTION,
148            "SIMPLEAGGREGATEFUNCTION": TokenType.SIMPLEAGGREGATEFUNCTION,
149            "SYSTEM": TokenType.COMMAND,
150            "PREWHERE": TokenType.PREWHERE,
151        }
152        KEYWORDS.pop("/*+")
153
154        SINGLE_TOKENS = {
155            **tokens.Tokenizer.SINGLE_TOKENS,
156            "$": TokenType.HEREDOC_STRING,
157        }
158
159    class Parser(parser.Parser):
160        # Tested in ClickHouse's playground, it seems that the following two queries do the same thing
161        # * select x from t1 union all select x from t2 limit 1;
162        # * select x from t1 union all (select x from t2 limit 1);
163        MODIFIERS_ATTACHED_TO_SET_OP = False
164        INTERVAL_SPANS = False
165
166        FUNCTIONS = {
167            **parser.Parser.FUNCTIONS,
168            "ANY": exp.AnyValue.from_arg_list,
169            "ARRAYSUM": exp.ArraySum.from_arg_list,
170            "COUNTIF": _build_count_if,
171            "DATE_ADD": build_date_delta(exp.DateAdd, default_unit=None),
172            "DATEADD": build_date_delta(exp.DateAdd, default_unit=None),
173            "DATE_DIFF": build_date_delta(exp.DateDiff, default_unit=None),
174            "DATEDIFF": build_date_delta(exp.DateDiff, default_unit=None),
175            "DATE_FORMAT": _build_date_format,
176            "DATE_SUB": build_date_delta(exp.DateSub, default_unit=None),
177            "DATESUB": build_date_delta(exp.DateSub, default_unit=None),
178            "FORMATDATETIME": _build_date_format,
179            "JSONEXTRACTSTRING": build_json_extract_path(
180                exp.JSONExtractScalar, zero_based_indexing=False
181            ),
182            "MAP": parser.build_var_map,
183            "MATCH": exp.RegexpLike.from_arg_list,
184            "RANDCANONICAL": exp.Rand.from_arg_list,
185            "TUPLE": exp.Struct.from_arg_list,
186            "TIMESTAMP_SUB": build_date_delta(exp.TimestampSub, default_unit=None),
187            "TIMESTAMPSUB": build_date_delta(exp.TimestampSub, default_unit=None),
188            "TIMESTAMP_ADD": build_date_delta(exp.TimestampAdd, default_unit=None),
189            "TIMESTAMPADD": build_date_delta(exp.TimestampAdd, default_unit=None),
190            "UNIQ": exp.ApproxDistinct.from_arg_list,
191            "XOR": lambda args: exp.Xor(expressions=args),
192            "MD5": exp.MD5Digest.from_arg_list,
193            "SHA256": lambda args: exp.SHA2(this=seq_get(args, 0), length=exp.Literal.number(256)),
194            "SHA512": lambda args: exp.SHA2(this=seq_get(args, 0), length=exp.Literal.number(512)),
195        }
196
197        AGG_FUNCTIONS = {
198            "count",
199            "min",
200            "max",
201            "sum",
202            "avg",
203            "any",
204            "stddevPop",
205            "stddevSamp",
206            "varPop",
207            "varSamp",
208            "corr",
209            "covarPop",
210            "covarSamp",
211            "entropy",
212            "exponentialMovingAverage",
213            "intervalLengthSum",
214            "kolmogorovSmirnovTest",
215            "mannWhitneyUTest",
216            "median",
217            "rankCorr",
218            "sumKahan",
219            "studentTTest",
220            "welchTTest",
221            "anyHeavy",
222            "anyLast",
223            "boundingRatio",
224            "first_value",
225            "last_value",
226            "argMin",
227            "argMax",
228            "avgWeighted",
229            "topK",
230            "topKWeighted",
231            "deltaSum",
232            "deltaSumTimestamp",
233            "groupArray",
234            "groupArrayLast",
235            "groupUniqArray",
236            "groupArrayInsertAt",
237            "groupArrayMovingAvg",
238            "groupArrayMovingSum",
239            "groupArraySample",
240            "groupBitAnd",
241            "groupBitOr",
242            "groupBitXor",
243            "groupBitmap",
244            "groupBitmapAnd",
245            "groupBitmapOr",
246            "groupBitmapXor",
247            "sumWithOverflow",
248            "sumMap",
249            "minMap",
250            "maxMap",
251            "skewSamp",
252            "skewPop",
253            "kurtSamp",
254            "kurtPop",
255            "uniq",
256            "uniqExact",
257            "uniqCombined",
258            "uniqCombined64",
259            "uniqHLL12",
260            "uniqTheta",
261            "quantile",
262            "quantiles",
263            "quantileExact",
264            "quantilesExact",
265            "quantileExactLow",
266            "quantilesExactLow",
267            "quantileExactHigh",
268            "quantilesExactHigh",
269            "quantileExactWeighted",
270            "quantilesExactWeighted",
271            "quantileTiming",
272            "quantilesTiming",
273            "quantileTimingWeighted",
274            "quantilesTimingWeighted",
275            "quantileDeterministic",
276            "quantilesDeterministic",
277            "quantileTDigest",
278            "quantilesTDigest",
279            "quantileTDigestWeighted",
280            "quantilesTDigestWeighted",
281            "quantileBFloat16",
282            "quantilesBFloat16",
283            "quantileBFloat16Weighted",
284            "quantilesBFloat16Weighted",
285            "simpleLinearRegression",
286            "stochasticLinearRegression",
287            "stochasticLogisticRegression",
288            "categoricalInformationValue",
289            "contingency",
290            "cramersV",
291            "cramersVBiasCorrected",
292            "theilsU",
293            "maxIntersections",
294            "maxIntersectionsPosition",
295            "meanZTest",
296            "quantileInterpolatedWeighted",
297            "quantilesInterpolatedWeighted",
298            "quantileGK",
299            "quantilesGK",
300            "sparkBar",
301            "sumCount",
302            "largestTriangleThreeBuckets",
303            "histogram",
304            "sequenceMatch",
305            "sequenceCount",
306            "windowFunnel",
307            "retention",
308            "uniqUpTo",
309            "sequenceNextNode",
310            "exponentialTimeDecayedAvg",
311        }
312
313        AGG_FUNCTIONS_SUFFIXES = [
314            "If",
315            "Array",
316            "ArrayIf",
317            "Map",
318            "SimpleState",
319            "State",
320            "Merge",
321            "MergeState",
322            "ForEach",
323            "Distinct",
324            "OrDefault",
325            "OrNull",
326            "Resample",
327            "ArgMin",
328            "ArgMax",
329        ]
330
331        FUNC_TOKENS = {
332            *parser.Parser.FUNC_TOKENS,
333            TokenType.SET,
334        }
335
336        AGG_FUNC_MAPPING = (
337            lambda functions, suffixes: {
338                f"{f}{sfx}": (f, sfx) for sfx in (suffixes + [""]) for f in functions
339            }
340        )(AGG_FUNCTIONS, AGG_FUNCTIONS_SUFFIXES)
341
342        FUNCTIONS_WITH_ALIASED_ARGS = {*parser.Parser.FUNCTIONS_WITH_ALIASED_ARGS, "TUPLE"}
343
344        FUNCTION_PARSERS = {
345            **parser.Parser.FUNCTION_PARSERS,
346            "ARRAYJOIN": lambda self: self.expression(exp.Explode, this=self._parse_expression()),
347            "QUANTILE": lambda self: self._parse_quantile(),
348        }
349
350        FUNCTION_PARSERS.pop("MATCH")
351
352        NO_PAREN_FUNCTION_PARSERS = parser.Parser.NO_PAREN_FUNCTION_PARSERS.copy()
353        NO_PAREN_FUNCTION_PARSERS.pop("ANY")
354
355        RANGE_PARSERS = {
356            **parser.Parser.RANGE_PARSERS,
357            TokenType.GLOBAL: lambda self, this: self._match(TokenType.IN)
358            and self._parse_in(this, is_global=True),
359        }
360
361        # The PLACEHOLDER entry is popped because 1) it doesn't affect Clickhouse (it corresponds to
362        # the postgres-specific JSONBContains parser) and 2) it makes parsing the ternary op simpler.
363        COLUMN_OPERATORS = parser.Parser.COLUMN_OPERATORS.copy()
364        COLUMN_OPERATORS.pop(TokenType.PLACEHOLDER)
365
366        JOIN_KINDS = {
367            *parser.Parser.JOIN_KINDS,
368            TokenType.ANY,
369            TokenType.ASOF,
370            TokenType.ARRAY,
371        }
372
373        TABLE_ALIAS_TOKENS = parser.Parser.TABLE_ALIAS_TOKENS - {
374            TokenType.ANY,
375            TokenType.ARRAY,
376            TokenType.FINAL,
377            TokenType.FORMAT,
378            TokenType.SETTINGS,
379        }
380
381        ALIAS_TOKENS = parser.Parser.ALIAS_TOKENS - {
382            TokenType.FORMAT,
383        }
384
385        LOG_DEFAULTS_TO_LN = True
386
387        QUERY_MODIFIER_PARSERS = {
388            **parser.Parser.QUERY_MODIFIER_PARSERS,
389            TokenType.SETTINGS: lambda self: (
390                "settings",
391                self._advance() or self._parse_csv(self._parse_assignment),
392            ),
393            TokenType.FORMAT: lambda self: ("format", self._advance() or self._parse_id_var()),
394        }
395
396        CONSTRAINT_PARSERS = {
397            **parser.Parser.CONSTRAINT_PARSERS,
398            "INDEX": lambda self: self._parse_index_constraint(),
399            "CODEC": lambda self: self._parse_compress(),
400        }
401
402        ALTER_PARSERS = {
403            **parser.Parser.ALTER_PARSERS,
404            "REPLACE": lambda self: self._parse_alter_table_replace(),
405        }
406
407        SCHEMA_UNNAMED_CONSTRAINTS = {
408            *parser.Parser.SCHEMA_UNNAMED_CONSTRAINTS,
409            "INDEX",
410        }
411
412        def _parse_assignment(self) -> t.Optional[exp.Expression]:
413            this = super()._parse_assignment()
414
415            if self._match(TokenType.PLACEHOLDER):
416                return self.expression(
417                    exp.If,
418                    this=this,
419                    true=self._parse_assignment(),
420                    false=self._match(TokenType.COLON) and self._parse_assignment(),
421                )
422
423            return this
424
425        def _parse_placeholder(self) -> t.Optional[exp.Expression]:
426            """
427            Parse a placeholder expression like SELECT {abc: UInt32} or FROM {table: Identifier}
428            https://clickhouse.com/docs/en/sql-reference/syntax#defining-and-using-query-parameters
429            """
430            if not self._match(TokenType.L_BRACE):
431                return None
432
433            this = self._parse_id_var()
434            self._match(TokenType.COLON)
435            kind = self._parse_types(check_func=False, allow_identifiers=False) or (
436                self._match_text_seq("IDENTIFIER") and "Identifier"
437            )
438
439            if not kind:
440                self.raise_error("Expecting a placeholder type or 'Identifier' for tables")
441            elif not self._match(TokenType.R_BRACE):
442                self.raise_error("Expecting }")
443
444            return self.expression(exp.Placeholder, this=this, kind=kind)
445
446        def _parse_in(self, this: t.Optional[exp.Expression], is_global: bool = False) -> exp.In:
447            this = super()._parse_in(this)
448            this.set("is_global", is_global)
449            return this
450
451        def _parse_table(
452            self,
453            schema: bool = False,
454            joins: bool = False,
455            alias_tokens: t.Optional[t.Collection[TokenType]] = None,
456            parse_bracket: bool = False,
457            is_db_reference: bool = False,
458            parse_partition: bool = False,
459        ) -> t.Optional[exp.Expression]:
460            this = super()._parse_table(
461                schema=schema,
462                joins=joins,
463                alias_tokens=alias_tokens,
464                parse_bracket=parse_bracket,
465                is_db_reference=is_db_reference,
466            )
467
468            if self._match(TokenType.FINAL):
469                this = self.expression(exp.Final, this=this)
470
471            return this
472
473        def _parse_position(self, haystack_first: bool = False) -> exp.StrPosition:
474            return super()._parse_position(haystack_first=True)
475
476        # https://clickhouse.com/docs/en/sql-reference/statements/select/with/
477        def _parse_cte(self) -> exp.CTE:
478            # WITH <identifier> AS <subquery expression>
479            cte: t.Optional[exp.CTE] = self._try_parse(super()._parse_cte)
480
481            if not cte:
482                # WITH <expression> AS <identifier>
483                cte = self.expression(
484                    exp.CTE,
485                    this=self._parse_assignment(),
486                    alias=self._parse_table_alias(),
487                    scalar=True,
488                )
489
490            return cte
491
492        def _parse_join_parts(
493            self,
494        ) -> t.Tuple[t.Optional[Token], t.Optional[Token], t.Optional[Token]]:
495            is_global = self._match(TokenType.GLOBAL) and self._prev
496            kind_pre = self._match_set(self.JOIN_KINDS, advance=False) and self._prev
497
498            if kind_pre:
499                kind = self._match_set(self.JOIN_KINDS) and self._prev
500                side = self._match_set(self.JOIN_SIDES) and self._prev
501                return is_global, side, kind
502
503            return (
504                is_global,
505                self._match_set(self.JOIN_SIDES) and self._prev,
506                self._match_set(self.JOIN_KINDS) and self._prev,
507            )
508
509        def _parse_join(
510            self, skip_join_token: bool = False, parse_bracket: bool = False
511        ) -> t.Optional[exp.Join]:
512            join = super()._parse_join(skip_join_token=skip_join_token, parse_bracket=True)
513            if join:
514                join.set("global", join.args.pop("method", None))
515
516            return join
517
518        def _parse_function(
519            self,
520            functions: t.Optional[t.Dict[str, t.Callable]] = None,
521            anonymous: bool = False,
522            optional_parens: bool = True,
523            any_token: bool = False,
524        ) -> t.Optional[exp.Expression]:
525            expr = super()._parse_function(
526                functions=functions,
527                anonymous=anonymous,
528                optional_parens=optional_parens,
529                any_token=any_token,
530            )
531
532            func = expr.this if isinstance(expr, exp.Window) else expr
533
534            # Aggregate functions can be split in 2 parts: <func_name><suffix>
535            parts = (
536                self.AGG_FUNC_MAPPING.get(func.this) if isinstance(func, exp.Anonymous) else None
537            )
538
539            if parts:
540                params = self._parse_func_params(func)
541
542                kwargs = {
543                    "this": func.this,
544                    "expressions": func.expressions,
545                }
546                if parts[1]:
547                    kwargs["parts"] = parts
548                    exp_class = exp.CombinedParameterizedAgg if params else exp.CombinedAggFunc
549                else:
550                    exp_class = exp.ParameterizedAgg if params else exp.AnonymousAggFunc
551
552                kwargs["exp_class"] = exp_class
553                if params:
554                    kwargs["params"] = params
555
556                func = self.expression(**kwargs)
557
558                if isinstance(expr, exp.Window):
559                    # The window's func was parsed as Anonymous in base parser, fix its
560                    # type to be CH style CombinedAnonymousAggFunc / AnonymousAggFunc
561                    expr.set("this", func)
562                elif params:
563                    # Params have blocked super()._parse_function() from parsing the following window
564                    # (if that exists) as they're standing between the function call and the window spec
565                    expr = self._parse_window(func)
566                else:
567                    expr = func
568
569            return expr
570
571        def _parse_func_params(
572            self, this: t.Optional[exp.Func] = None
573        ) -> t.Optional[t.List[exp.Expression]]:
574            if self._match_pair(TokenType.R_PAREN, TokenType.L_PAREN):
575                return self._parse_csv(self._parse_lambda)
576
577            if self._match(TokenType.L_PAREN):
578                params = self._parse_csv(self._parse_lambda)
579                self._match_r_paren(this)
580                return params
581
582            return None
583
584        def _parse_quantile(self) -> exp.Quantile:
585            this = self._parse_lambda()
586            params = self._parse_func_params()
587            if params:
588                return self.expression(exp.Quantile, this=params[0], quantile=this)
589            return self.expression(exp.Quantile, this=this, quantile=exp.Literal.number(0.5))
590
591        def _parse_wrapped_id_vars(self, optional: bool = False) -> t.List[exp.Expression]:
592            return super()._parse_wrapped_id_vars(optional=True)
593
594        def _parse_primary_key(
595            self, wrapped_optional: bool = False, in_props: bool = False
596        ) -> exp.PrimaryKeyColumnConstraint | exp.PrimaryKey:
597            return super()._parse_primary_key(
598                wrapped_optional=wrapped_optional or in_props, in_props=in_props
599            )
600
601        def _parse_on_property(self) -> t.Optional[exp.Expression]:
602            index = self._index
603            if self._match_text_seq("CLUSTER"):
604                this = self._parse_id_var()
605                if this:
606                    return self.expression(exp.OnCluster, this=this)
607                else:
608                    self._retreat(index)
609            return None
610
611        def _parse_index_constraint(
612            self, kind: t.Optional[str] = None
613        ) -> exp.IndexColumnConstraint:
614            # INDEX name1 expr TYPE type1(args) GRANULARITY value
615            this = self._parse_id_var()
616            expression = self._parse_assignment()
617
618            index_type = self._match_text_seq("TYPE") and (
619                self._parse_function() or self._parse_var()
620            )
621
622            granularity = self._match_text_seq("GRANULARITY") and self._parse_term()
623
624            return self.expression(
625                exp.IndexColumnConstraint,
626                this=this,
627                expression=expression,
628                index_type=index_type,
629                granularity=granularity,
630            )
631
632        def _parse_partition(self) -> t.Optional[exp.Partition]:
633            # https://clickhouse.com/docs/en/sql-reference/statements/alter/partition#how-to-set-partition-expression
634            if not self._match(TokenType.PARTITION):
635                return None
636
637            if self._match_text_seq("ID"):
638                # Corresponds to the PARTITION ID <string_value> syntax
639                expressions: t.List[exp.Expression] = [
640                    self.expression(exp.PartitionId, this=self._parse_string())
641                ]
642            else:
643                expressions = self._parse_expressions()
644
645            return self.expression(exp.Partition, expressions=expressions)
646
647        def _parse_alter_table_replace(self) -> t.Optional[exp.Expression]:
648            partition = self._parse_partition()
649
650            if not partition or not self._match(TokenType.FROM):
651                return None
652
653            return self.expression(
654                exp.ReplacePartition, expression=partition, source=self._parse_table_parts()
655            )
656
657        def _parse_projection_def(self) -> t.Optional[exp.ProjectionDef]:
658            if not self._match_text_seq("PROJECTION"):
659                return None
660
661            return self.expression(
662                exp.ProjectionDef,
663                this=self._parse_id_var(),
664                expression=self._parse_wrapped(self._parse_statement),
665            )
666
667        def _parse_constraint(self) -> t.Optional[exp.Expression]:
668            return super()._parse_constraint() or self._parse_projection_def()
669
670    class Generator(generator.Generator):
671        QUERY_HINTS = False
672        STRUCT_DELIMITER = ("(", ")")
673        NVL2_SUPPORTED = False
674        TABLESAMPLE_REQUIRES_PARENS = False
675        TABLESAMPLE_SIZE_IS_ROWS = False
676        TABLESAMPLE_KEYWORDS = "SAMPLE"
677        LAST_DAY_SUPPORTS_DATE_PART = False
678        CAN_IMPLEMENT_ARRAY_ANY = True
679        SUPPORTS_TO_NUMBER = False
680        JOIN_HINTS = False
681        TABLE_HINTS = False
682        EXPLICIT_SET_OP = True
683        GROUPINGS_SEP = ""
684        SET_OP_MODIFIERS = False
685
686        STRING_TYPE_MAPPING = {
687            exp.DataType.Type.CHAR: "String",
688            exp.DataType.Type.LONGBLOB: "String",
689            exp.DataType.Type.LONGTEXT: "String",
690            exp.DataType.Type.MEDIUMBLOB: "String",
691            exp.DataType.Type.MEDIUMTEXT: "String",
692            exp.DataType.Type.TINYBLOB: "String",
693            exp.DataType.Type.TINYTEXT: "String",
694            exp.DataType.Type.TEXT: "String",
695            exp.DataType.Type.VARBINARY: "String",
696            exp.DataType.Type.VARCHAR: "String",
697        }
698
699        SUPPORTED_JSON_PATH_PARTS = {
700            exp.JSONPathKey,
701            exp.JSONPathRoot,
702            exp.JSONPathSubscript,
703        }
704
705        TYPE_MAPPING = {
706            **generator.Generator.TYPE_MAPPING,
707            **STRING_TYPE_MAPPING,
708            exp.DataType.Type.ARRAY: "Array",
709            exp.DataType.Type.BIGINT: "Int64",
710            exp.DataType.Type.DATE32: "Date32",
711            exp.DataType.Type.DATETIME64: "DateTime64",
712            exp.DataType.Type.DOUBLE: "Float64",
713            exp.DataType.Type.ENUM: "Enum",
714            exp.DataType.Type.ENUM8: "Enum8",
715            exp.DataType.Type.ENUM16: "Enum16",
716            exp.DataType.Type.FIXEDSTRING: "FixedString",
717            exp.DataType.Type.FLOAT: "Float32",
718            exp.DataType.Type.INT: "Int32",
719            exp.DataType.Type.MEDIUMINT: "Int32",
720            exp.DataType.Type.INT128: "Int128",
721            exp.DataType.Type.INT256: "Int256",
722            exp.DataType.Type.LOWCARDINALITY: "LowCardinality",
723            exp.DataType.Type.MAP: "Map",
724            exp.DataType.Type.NESTED: "Nested",
725            exp.DataType.Type.NULLABLE: "Nullable",
726            exp.DataType.Type.SMALLINT: "Int16",
727            exp.DataType.Type.STRUCT: "Tuple",
728            exp.DataType.Type.TINYINT: "Int8",
729            exp.DataType.Type.UBIGINT: "UInt64",
730            exp.DataType.Type.UINT: "UInt32",
731            exp.DataType.Type.UINT128: "UInt128",
732            exp.DataType.Type.UINT256: "UInt256",
733            exp.DataType.Type.USMALLINT: "UInt16",
734            exp.DataType.Type.UTINYINT: "UInt8",
735            exp.DataType.Type.IPV4: "IPv4",
736            exp.DataType.Type.IPV6: "IPv6",
737            exp.DataType.Type.AGGREGATEFUNCTION: "AggregateFunction",
738            exp.DataType.Type.SIMPLEAGGREGATEFUNCTION: "SimpleAggregateFunction",
739        }
740
741        TRANSFORMS = {
742            **generator.Generator.TRANSFORMS,
743            exp.AnyValue: rename_func("any"),
744            exp.ApproxDistinct: rename_func("uniq"),
745            exp.ArrayFilter: lambda self, e: self.func("arrayFilter", e.expression, e.this),
746            exp.ArraySize: rename_func("LENGTH"),
747            exp.ArraySum: rename_func("arraySum"),
748            exp.ArgMax: arg_max_or_min_no_count("argMax"),
749            exp.ArgMin: arg_max_or_min_no_count("argMin"),
750            exp.Array: inline_array_sql,
751            exp.CastToStrType: rename_func("CAST"),
752            exp.CountIf: rename_func("countIf"),
753            exp.CompressColumnConstraint: lambda self,
754            e: f"CODEC({self.expressions(e, key='this', flat=True)})",
755            exp.ComputedColumnConstraint: lambda self,
756            e: f"{'MATERIALIZED' if e.args.get('persisted') else 'ALIAS'} {self.sql(e, 'this')}",
757            exp.CurrentDate: lambda self, e: self.func("CURRENT_DATE"),
758            exp.DateAdd: _datetime_delta_sql("DATE_ADD"),
759            exp.DateDiff: _datetime_delta_sql("DATE_DIFF"),
760            exp.DateSub: _datetime_delta_sql("DATE_SUB"),
761            exp.Explode: rename_func("arrayJoin"),
762            exp.Final: lambda self, e: f"{self.sql(e, 'this')} FINAL",
763            exp.IsNan: rename_func("isNaN"),
764            exp.JSONExtract: json_extract_segments("JSONExtractString", quoted_index=False),
765            exp.JSONExtractScalar: json_extract_segments("JSONExtractString", quoted_index=False),
766            exp.JSONPathKey: json_path_key_only_name,
767            exp.JSONPathRoot: lambda *_: "",
768            exp.Map: lambda self, e: _lower_func(var_map_sql(self, e)),
769            exp.Nullif: rename_func("nullIf"),
770            exp.PartitionedByProperty: lambda self, e: f"PARTITION BY {self.sql(e, 'this')}",
771            exp.Pivot: no_pivot_sql,
772            exp.Quantile: _quantile_sql,
773            exp.RegexpLike: lambda self, e: self.func("match", e.this, e.expression),
774            exp.Rand: rename_func("randCanonical"),
775            exp.Select: transforms.preprocess([transforms.eliminate_qualify]),
776            exp.StartsWith: rename_func("startsWith"),
777            exp.StrPosition: lambda self, e: self.func(
778                "position", e.this, e.args.get("substr"), e.args.get("position")
779            ),
780            exp.TimeToStr: lambda self, e: self.func(
781                "DATE_FORMAT", e.this, self.format_time(e), e.args.get("timezone")
782            ),
783            exp.TimestampAdd: _datetime_delta_sql("TIMESTAMP_ADD"),
784            exp.TimestampSub: _datetime_delta_sql("TIMESTAMP_SUB"),
785            exp.VarMap: lambda self, e: _lower_func(var_map_sql(self, e)),
786            exp.Xor: lambda self, e: self.func("xor", e.this, e.expression, *e.expressions),
787            exp.MD5Digest: rename_func("MD5"),
788            exp.MD5: lambda self, e: self.func("LOWER", self.func("HEX", self.func("MD5", e.this))),
789            exp.SHA: rename_func("SHA1"),
790            exp.SHA2: sha256_sql,
791            exp.UnixToTime: _unix_to_time_sql,
792            exp.TimestampTrunc: timestamptrunc_sql(zone=True),
793            exp.Variance: rename_func("varSamp"),
794            exp.Stddev: rename_func("stddevSamp"),
795        }
796
797        PROPERTIES_LOCATION = {
798            **generator.Generator.PROPERTIES_LOCATION,
799            exp.VolatileProperty: exp.Properties.Location.UNSUPPORTED,
800            exp.PartitionedByProperty: exp.Properties.Location.POST_SCHEMA,
801            exp.OnCluster: exp.Properties.Location.POST_NAME,
802        }
803
804        # there's no list in docs, but it can be found in Clickhouse code
805        # see `ClickHouse/src/Parsers/ParserCreate*.cpp`
806        ON_CLUSTER_TARGETS = {
807            "DATABASE",
808            "TABLE",
809            "VIEW",
810            "DICTIONARY",
811            "INDEX",
812            "FUNCTION",
813            "NAMED COLLECTION",
814        }
815
816        def _jsonpathsubscript_sql(self, expression: exp.JSONPathSubscript) -> str:
817            this = self.json_path_part(expression.this)
818            return str(int(this) + 1) if is_int(this) else this
819
820        def likeproperty_sql(self, expression: exp.LikeProperty) -> str:
821            return f"AS {self.sql(expression, 'this')}"
822
823        def _any_to_has(
824            self,
825            expression: exp.EQ | exp.NEQ,
826            default: t.Callable[[t.Any], str],
827            prefix: str = "",
828        ) -> str:
829            if isinstance(expression.left, exp.Any):
830                arr = expression.left
831                this = expression.right
832            elif isinstance(expression.right, exp.Any):
833                arr = expression.right
834                this = expression.left
835            else:
836                return default(expression)
837
838            return prefix + self.func("has", arr.this.unnest(), this)
839
840        def eq_sql(self, expression: exp.EQ) -> str:
841            return self._any_to_has(expression, super().eq_sql)
842
843        def neq_sql(self, expression: exp.NEQ) -> str:
844            return self._any_to_has(expression, super().neq_sql, "NOT ")
845
846        def regexpilike_sql(self, expression: exp.RegexpILike) -> str:
847            # Manually add a flag to make the search case-insensitive
848            regex = self.func("CONCAT", "'(?i)'", expression.expression)
849            return self.func("match", expression.this, regex)
850
851        def datatype_sql(self, expression: exp.DataType) -> str:
852            # String is the standard ClickHouse type, every other variant is just an alias.
853            # Additionally, any supplied length parameter will be ignored.
854            #
855            # https://clickhouse.com/docs/en/sql-reference/data-types/string
856            if expression.this in self.STRING_TYPE_MAPPING:
857                return "String"
858
859            return super().datatype_sql(expression)
860
861        def cte_sql(self, expression: exp.CTE) -> str:
862            if expression.args.get("scalar"):
863                this = self.sql(expression, "this")
864                alias = self.sql(expression, "alias")
865                return f"{this} AS {alias}"
866
867            return super().cte_sql(expression)
868
869        def after_limit_modifiers(self, expression: exp.Expression) -> t.List[str]:
870            return super().after_limit_modifiers(expression) + [
871                (
872                    self.seg("SETTINGS ") + self.expressions(expression, key="settings", flat=True)
873                    if expression.args.get("settings")
874                    else ""
875                ),
876                (
877                    self.seg("FORMAT ") + self.sql(expression, "format")
878                    if expression.args.get("format")
879                    else ""
880                ),
881            ]
882
883        def parameterizedagg_sql(self, expression: exp.ParameterizedAgg) -> str:
884            params = self.expressions(expression, key="params", flat=True)
885            return self.func(expression.name, *expression.expressions) + f"({params})"
886
887        def anonymousaggfunc_sql(self, expression: exp.AnonymousAggFunc) -> str:
888            return self.func(expression.name, *expression.expressions)
889
890        def combinedaggfunc_sql(self, expression: exp.CombinedAggFunc) -> str:
891            return self.anonymousaggfunc_sql(expression)
892
893        def combinedparameterizedagg_sql(self, expression: exp.CombinedParameterizedAgg) -> str:
894            return self.parameterizedagg_sql(expression)
895
896        def placeholder_sql(self, expression: exp.Placeholder) -> str:
897            return f"{{{expression.name}: {self.sql(expression, 'kind')}}}"
898
899        def oncluster_sql(self, expression: exp.OnCluster) -> str:
900            return f"ON CLUSTER {self.sql(expression, 'this')}"
901
902        def createable_sql(self, expression: exp.Create, locations: t.DefaultDict) -> str:
903            if expression.kind in self.ON_CLUSTER_TARGETS and locations.get(
904                exp.Properties.Location.POST_NAME
905            ):
906                this_name = self.sql(expression.this, "this")
907                this_properties = " ".join(
908                    [self.sql(prop) for prop in locations[exp.Properties.Location.POST_NAME]]
909                )
910                this_schema = self.schema_columns_sql(expression.this)
911                return f"{this_name}{self.sep()}{this_properties}{self.sep()}{this_schema}"
912
913            return super().createable_sql(expression, locations)
914
915        def prewhere_sql(self, expression: exp.PreWhere) -> str:
916            this = self.indent(self.sql(expression, "this"))
917            return f"{self.seg('PREWHERE')}{self.sep()}{this}"
918
919        def indexcolumnconstraint_sql(self, expression: exp.IndexColumnConstraint) -> str:
920            this = self.sql(expression, "this")
921            this = f" {this}" if this else ""
922            expr = self.sql(expression, "expression")
923            expr = f" {expr}" if expr else ""
924            index_type = self.sql(expression, "index_type")
925            index_type = f" TYPE {index_type}" if index_type else ""
926            granularity = self.sql(expression, "granularity")
927            granularity = f" GRANULARITY {granularity}" if granularity else ""
928
929            return f"INDEX{this}{expr}{index_type}{granularity}"
930
931        def partition_sql(self, expression: exp.Partition) -> str:
932            return f"PARTITION {self.expressions(expression, flat=True)}"
933
934        def partitionid_sql(self, expression: exp.PartitionId) -> str:
935            return f"ID {self.sql(expression.this)}"
936
937        def replacepartition_sql(self, expression: exp.ReplacePartition) -> str:
938            return (
939                f"REPLACE {self.sql(expression.expression)} FROM {self.sql(expression, 'source')}"
940            )
941
942        def projectiondef_sql(self, expression: exp.ProjectionDef) -> str:
943            return f"PROJECTION {self.sql(expression.this)} {self.wrap(expression.expression)}"
NORMALIZE_FUNCTIONS: bool | str = False

Determines how function names are going to be normalized.

Possible values:

"upper" or True: Convert names to uppercase. "lower": Convert names to lowercase. False: Disables function name normalization.

NULL_ORDERING = 'nulls_are_last'

Default NULL ordering method to use if not explicitly set. Possible values: "nulls_are_small", "nulls_are_large", "nulls_are_last"

SUPPORTS_USER_DEFINED_TYPES = False

Whether user-defined data types are supported.

SAFE_DIVISION = True

Whether division by zero throws an error (False) or returns NULL (True).

LOG_BASE_FIRST: Optional[bool] = None

Whether the base comes first in the LOG function. Possible values: True, False, None (two arguments are not supported by LOG)

FORCE_EARLY_ALIAS_REF_EXPANSION = True

Whether alias reference expansion (_expand_alias_refs()) should run before column qualification (_qualify_columns()).

For example:

WITH data AS ( SELECT 1 AS id, 2 AS my_id ) SELECT id AS my_id FROM data WHERE my_id = 1 GROUP BY my_id, HAVING my_id = 1

In most dialects "my_id" would refer to "data.my_id" (which is done in _qualify_columns()) across the query, except: - BigQuery, which will forward the alias to GROUP BY + HAVING clauses i.e it resolves to "WHERE my_id = 1 GROUP BY id HAVING id = 1" - Clickhouse, which will forward the alias across the query i.e it resolves to "WHERE id = 1 GROUP BY id HAVING id = 1"

UNESCAPED_SEQUENCES = {'\\a': '\x07', '\\b': '\x08', '\\f': '\x0c', '\\n': '\n', '\\r': '\r', '\\t': '\t', '\\v': '\x0b', '\\\\': '\\', '\\0': '\x00'}

Mapping of an escaped sequence (\n) to its unescaped version ( ).

SUPPORTS_COLUMN_JOIN_MARKS = False

Whether the old-style outer join (+) syntax is supported.

tokenizer_class = <class 'ClickHouse.Tokenizer'>
jsonpath_tokenizer_class = <class 'sqlglot.tokens.JSONPathTokenizer'>
parser_class = <class 'ClickHouse.Parser'>
generator_class = <class 'ClickHouse.Generator'>
TIME_TRIE: Dict = {}
FORMAT_TRIE: Dict = {}
INVERSE_TIME_MAPPING: Dict[str, str] = {}
INVERSE_TIME_TRIE: Dict = {}
ESCAPED_SEQUENCES: Dict[str, str] = {'\x07': '\\a', '\x08': '\\b', '\x0c': '\\f', '\n': '\\n', '\r': '\\r', '\t': '\\t', '\x0b': '\\v', '\\': '\\\\', '\x00': '\\0'}
QUOTE_START = "'"
QUOTE_END = "'"
IDENTIFIER_START = '"'
IDENTIFIER_END = '"'
BIT_START: Optional[str] = '0b'
BIT_END: Optional[str] = ''
HEX_START: Optional[str] = '0x'
HEX_END: Optional[str] = ''
BYTE_START: Optional[str] = None
BYTE_END: Optional[str] = None
UNICODE_START: Optional[str] = None
UNICODE_END: Optional[str] = None
class ClickHouse.Tokenizer(sqlglot.tokens.Tokenizer):
112    class Tokenizer(tokens.Tokenizer):
113        COMMENTS = ["--", "#", "#!", ("/*", "*/")]
114        IDENTIFIERS = ['"', "`"]
115        STRING_ESCAPES = ["'", "\\"]
116        BIT_STRINGS = [("0b", "")]
117        HEX_STRINGS = [("0x", ""), ("0X", "")]
118        HEREDOC_STRINGS = ["$"]
119
120        KEYWORDS = {
121            **tokens.Tokenizer.KEYWORDS,
122            "ATTACH": TokenType.COMMAND,
123            "DATE32": TokenType.DATE32,
124            "DATETIME64": TokenType.DATETIME64,
125            "DICTIONARY": TokenType.DICTIONARY,
126            "ENUM8": TokenType.ENUM8,
127            "ENUM16": TokenType.ENUM16,
128            "FINAL": TokenType.FINAL,
129            "FIXEDSTRING": TokenType.FIXEDSTRING,
130            "FLOAT32": TokenType.FLOAT,
131            "FLOAT64": TokenType.DOUBLE,
132            "GLOBAL": TokenType.GLOBAL,
133            "INT256": TokenType.INT256,
134            "LOWCARDINALITY": TokenType.LOWCARDINALITY,
135            "MAP": TokenType.MAP,
136            "NESTED": TokenType.NESTED,
137            "SAMPLE": TokenType.TABLE_SAMPLE,
138            "TUPLE": TokenType.STRUCT,
139            "UINT128": TokenType.UINT128,
140            "UINT16": TokenType.USMALLINT,
141            "UINT256": TokenType.UINT256,
142            "UINT32": TokenType.UINT,
143            "UINT64": TokenType.UBIGINT,
144            "UINT8": TokenType.UTINYINT,
145            "IPV4": TokenType.IPV4,
146            "IPV6": TokenType.IPV6,
147            "AGGREGATEFUNCTION": TokenType.AGGREGATEFUNCTION,
148            "SIMPLEAGGREGATEFUNCTION": TokenType.SIMPLEAGGREGATEFUNCTION,
149            "SYSTEM": TokenType.COMMAND,
150            "PREWHERE": TokenType.PREWHERE,
151        }
152        KEYWORDS.pop("/*+")
153
154        SINGLE_TOKENS = {
155            **tokens.Tokenizer.SINGLE_TOKENS,
156            "$": TokenType.HEREDOC_STRING,
157        }
COMMENTS = ['--', '#', '#!', ('/*', '*/')]
IDENTIFIERS = ['"', '`']
STRING_ESCAPES = ["'", '\\']
BIT_STRINGS = [('0b', '')]
HEX_STRINGS = [('0x', ''), ('0X', '')]
HEREDOC_STRINGS = ['$']
KEYWORDS = {'{%': <TokenType.BLOCK_START: 'BLOCK_START'>, '{%+': <TokenType.BLOCK_START: 'BLOCK_START'>, '{%-': <TokenType.BLOCK_START: 'BLOCK_START'>, '%}': <TokenType.BLOCK_END: 'BLOCK_END'>, '+%}': <TokenType.BLOCK_END: 'BLOCK_END'>, '-%}': <TokenType.BLOCK_END: 'BLOCK_END'>, '{{+': <TokenType.BLOCK_START: 'BLOCK_START'>, '{{-': <TokenType.BLOCK_START: 'BLOCK_START'>, '+}}': <TokenType.BLOCK_END: 'BLOCK_END'>, '-}}': <TokenType.BLOCK_END: 'BLOCK_END'>, '==': <TokenType.EQ: 'EQ'>, '::': <TokenType.DCOLON: 'DCOLON'>, '||': <TokenType.DPIPE: 'DPIPE'>, '>=': <TokenType.GTE: 'GTE'>, '<=': <TokenType.LTE: 'LTE'>, '<>': <TokenType.NEQ: 'NEQ'>, '!=': <TokenType.NEQ: 'NEQ'>, ':=': <TokenType.COLON_EQ: 'COLON_EQ'>, '<=>': <TokenType.NULLSAFE_EQ: 'NULLSAFE_EQ'>, '->': <TokenType.ARROW: 'ARROW'>, '->>': <TokenType.DARROW: 'DARROW'>, '=>': <TokenType.FARROW: 'FARROW'>, '#>': <TokenType.HASH_ARROW: 'HASH_ARROW'>, '#>>': <TokenType.DHASH_ARROW: 'DHASH_ARROW'>, '<->': <TokenType.LR_ARROW: 'LR_ARROW'>, '&&': <TokenType.DAMP: 'DAMP'>, '??': <TokenType.DQMARK: 'DQMARK'>, 'ALL': <TokenType.ALL: 'ALL'>, 'ALWAYS': <TokenType.ALWAYS: 'ALWAYS'>, 'AND': <TokenType.AND: 'AND'>, 'ANTI': <TokenType.ANTI: 'ANTI'>, 'ANY': <TokenType.ANY: 'ANY'>, 'ASC': <TokenType.ASC: 'ASC'>, 'AS': <TokenType.ALIAS: 'ALIAS'>, 'ASOF': <TokenType.ASOF: 'ASOF'>, 'AUTOINCREMENT': <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, 'AUTO_INCREMENT': <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, 'BEGIN': <TokenType.BEGIN: 'BEGIN'>, 'BETWEEN': <TokenType.BETWEEN: 'BETWEEN'>, 'CACHE': <TokenType.CACHE: 'CACHE'>, 'UNCACHE': <TokenType.UNCACHE: 'UNCACHE'>, 'CASE': <TokenType.CASE: 'CASE'>, 'CHARACTER SET': <TokenType.CHARACTER_SET: 'CHARACTER_SET'>, 'CLUSTER BY': <TokenType.CLUSTER_BY: 'CLUSTER_BY'>, 'COLLATE': <TokenType.COLLATE: 'COLLATE'>, 'COLUMN': <TokenType.COLUMN: 'COLUMN'>, 'COMMIT': <TokenType.COMMIT: 'COMMIT'>, 'CONNECT BY': <TokenType.CONNECT_BY: 'CONNECT_BY'>, 'CONSTRAINT': <TokenType.CONSTRAINT: 'CONSTRAINT'>, 'COPY': <TokenType.COPY: 'COPY'>, 'CREATE': <TokenType.CREATE: 'CREATE'>, 'CROSS': <TokenType.CROSS: 'CROSS'>, 'CUBE': <TokenType.CUBE: 'CUBE'>, 'CURRENT_DATE': <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, 'CURRENT_TIME': <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, 'CURRENT_TIMESTAMP': <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, 'CURRENT_USER': <TokenType.CURRENT_USER: 'CURRENT_USER'>, 'DATABASE': <TokenType.DATABASE: 'DATABASE'>, 'DEFAULT': <TokenType.DEFAULT: 'DEFAULT'>, 'DELETE': <TokenType.DELETE: 'DELETE'>, 'DESC': <TokenType.DESC: 'DESC'>, 'DESCRIBE': <TokenType.DESCRIBE: 'DESCRIBE'>, 'DISTINCT': <TokenType.DISTINCT: 'DISTINCT'>, 'DISTRIBUTE BY': <TokenType.DISTRIBUTE_BY: 'DISTRIBUTE_BY'>, 'DIV': <TokenType.DIV: 'DIV'>, 'DROP': <TokenType.DROP: 'DROP'>, 'ELSE': <TokenType.ELSE: 'ELSE'>, 'END': <TokenType.END: 'END'>, 'ENUM': <TokenType.ENUM: 'ENUM'>, 'ESCAPE': <TokenType.ESCAPE: 'ESCAPE'>, 'EXCEPT': <TokenType.EXCEPT: 'EXCEPT'>, 'EXECUTE': <TokenType.EXECUTE: 'EXECUTE'>, 'EXISTS': <TokenType.EXISTS: 'EXISTS'>, 'FALSE': <TokenType.FALSE: 'FALSE'>, 'FETCH': <TokenType.FETCH: 'FETCH'>, 'FILTER': <TokenType.FILTER: 'FILTER'>, 'FIRST': <TokenType.FIRST: 'FIRST'>, 'FULL': <TokenType.FULL: 'FULL'>, 'FUNCTION': <TokenType.FUNCTION: 'FUNCTION'>, 'FOR': <TokenType.FOR: 'FOR'>, 'FOREIGN KEY': <TokenType.FOREIGN_KEY: 'FOREIGN_KEY'>, 'FORMAT': <TokenType.FORMAT: 'FORMAT'>, 'FROM': <TokenType.FROM: 'FROM'>, 'GEOGRAPHY': <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, 'GEOMETRY': <TokenType.GEOMETRY: 'GEOMETRY'>, 'GLOB': <TokenType.GLOB: 'GLOB'>, 'GROUP BY': <TokenType.GROUP_BY: 'GROUP_BY'>, 'GROUPING SETS': <TokenType.GROUPING_SETS: 'GROUPING_SETS'>, 'HAVING': <TokenType.HAVING: 'HAVING'>, 'ILIKE': <TokenType.ILIKE: 'ILIKE'>, 'IN': <TokenType.IN: 'IN'>, 'INDEX': <TokenType.INDEX: 'INDEX'>, 'INET': <TokenType.INET: 'INET'>, 'INNER': <TokenType.INNER: 'INNER'>, 'INSERT': <TokenType.INSERT: 'INSERT'>, 'INTERVAL': <TokenType.INTERVAL: 'INTERVAL'>, 'INTERSECT': <TokenType.INTERSECT: 'INTERSECT'>, 'INTO': <TokenType.INTO: 'INTO'>, 'IS': <TokenType.IS: 'IS'>, 'ISNULL': <TokenType.ISNULL: 'ISNULL'>, 'JOIN': <TokenType.JOIN: 'JOIN'>, 'KEEP': <TokenType.KEEP: 'KEEP'>, 'KILL': <TokenType.KILL: 'KILL'>, 'LATERAL': <TokenType.LATERAL: 'LATERAL'>, 'LEFT': <TokenType.LEFT: 'LEFT'>, 'LIKE': <TokenType.LIKE: 'LIKE'>, 'LIMIT': <TokenType.LIMIT: 'LIMIT'>, 'LOAD': <TokenType.LOAD: 'LOAD'>, 'LOCK': <TokenType.LOCK: 'LOCK'>, 'MERGE': <TokenType.MERGE: 'MERGE'>, 'NATURAL': <TokenType.NATURAL: 'NATURAL'>, 'NEXT': <TokenType.NEXT: 'NEXT'>, 'NOT': <TokenType.NOT: 'NOT'>, 'NOTNULL': <TokenType.NOTNULL: 'NOTNULL'>, 'NULL': <TokenType.NULL: 'NULL'>, 'OBJECT': <TokenType.OBJECT: 'OBJECT'>, 'OFFSET': <TokenType.OFFSET: 'OFFSET'>, 'ON': <TokenType.ON: 'ON'>, 'OR': <TokenType.OR: 'OR'>, 'XOR': <TokenType.XOR: 'XOR'>, 'ORDER BY': <TokenType.ORDER_BY: 'ORDER_BY'>, 'ORDINALITY': <TokenType.ORDINALITY: 'ORDINALITY'>, 'OUTER': <TokenType.OUTER: 'OUTER'>, 'OVER': <TokenType.OVER: 'OVER'>, 'OVERLAPS': <TokenType.OVERLAPS: 'OVERLAPS'>, 'OVERWRITE': <TokenType.OVERWRITE: 'OVERWRITE'>, 'PARTITION': <TokenType.PARTITION: 'PARTITION'>, 'PARTITION BY': <TokenType.PARTITION_BY: 'PARTITION_BY'>, 'PARTITIONED BY': <TokenType.PARTITION_BY: 'PARTITION_BY'>, 'PARTITIONED_BY': <TokenType.PARTITION_BY: 'PARTITION_BY'>, 'PERCENT': <TokenType.PERCENT: 'PERCENT'>, 'PIVOT': <TokenType.PIVOT: 'PIVOT'>, 'PRAGMA': <TokenType.PRAGMA: 'PRAGMA'>, 'PRIMARY KEY': <TokenType.PRIMARY_KEY: 'PRIMARY_KEY'>, 'PROCEDURE': <TokenType.PROCEDURE: 'PROCEDURE'>, 'QUALIFY': <TokenType.QUALIFY: 'QUALIFY'>, 'RANGE': <TokenType.RANGE: 'RANGE'>, 'RECURSIVE': <TokenType.RECURSIVE: 'RECURSIVE'>, 'REGEXP': <TokenType.RLIKE: 'RLIKE'>, 'REPLACE': <TokenType.REPLACE: 'REPLACE'>, 'RETURNING': <TokenType.RETURNING: 'RETURNING'>, 'REFERENCES': <TokenType.REFERENCES: 'REFERENCES'>, 'RIGHT': <TokenType.RIGHT: 'RIGHT'>, 'RLIKE': <TokenType.RLIKE: 'RLIKE'>, 'ROLLBACK': <TokenType.ROLLBACK: 'ROLLBACK'>, 'ROLLUP': <TokenType.ROLLUP: 'ROLLUP'>, 'ROW': <TokenType.ROW: 'ROW'>, 'ROWS': <TokenType.ROWS: 'ROWS'>, 'SCHEMA': <TokenType.SCHEMA: 'SCHEMA'>, 'SELECT': <TokenType.SELECT: 'SELECT'>, 'SEMI': <TokenType.SEMI: 'SEMI'>, 'SET': <TokenType.SET: 'SET'>, 'SETTINGS': <TokenType.SETTINGS: 'SETTINGS'>, 'SHOW': <TokenType.SHOW: 'SHOW'>, 'SIMILAR TO': <TokenType.SIMILAR_TO: 'SIMILAR_TO'>, 'SOME': <TokenType.SOME: 'SOME'>, 'SORT BY': <TokenType.SORT_BY: 'SORT_BY'>, 'START WITH': <TokenType.START_WITH: 'START_WITH'>, 'STRAIGHT_JOIN': <TokenType.STRAIGHT_JOIN: 'STRAIGHT_JOIN'>, 'TABLE': <TokenType.TABLE: 'TABLE'>, 'TABLESAMPLE': <TokenType.TABLE_SAMPLE: 'TABLE_SAMPLE'>, 'TEMP': <TokenType.TEMPORARY: 'TEMPORARY'>, 'TEMPORARY': <TokenType.TEMPORARY: 'TEMPORARY'>, 'THEN': <TokenType.THEN: 'THEN'>, 'TRUE': <TokenType.TRUE: 'TRUE'>, 'TRUNCATE': <TokenType.TRUNCATE: 'TRUNCATE'>, 'UNION': <TokenType.UNION: 'UNION'>, 'UNKNOWN': <TokenType.UNKNOWN: 'UNKNOWN'>, 'UNNEST': <TokenType.UNNEST: 'UNNEST'>, 'UNPIVOT': <TokenType.UNPIVOT: 'UNPIVOT'>, 'UPDATE': <TokenType.UPDATE: 'UPDATE'>, 'USE': <TokenType.USE: 'USE'>, 'USING': <TokenType.USING: 'USING'>, 'UUID': <TokenType.UUID: 'UUID'>, 'VALUES': <TokenType.VALUES: 'VALUES'>, 'VIEW': <TokenType.VIEW: 'VIEW'>, 'VOLATILE': <TokenType.VOLATILE: 'VOLATILE'>, 'WHEN': <TokenType.WHEN: 'WHEN'>, 'WHERE': <TokenType.WHERE: 'WHERE'>, 'WINDOW': <TokenType.WINDOW: 'WINDOW'>, 'WITH': <TokenType.WITH: 'WITH'>, 'APPLY': <TokenType.APPLY: 'APPLY'>, 'ARRAY': <TokenType.ARRAY: 'ARRAY'>, 'BIT': <TokenType.BIT: 'BIT'>, 'BOOL': <TokenType.BOOLEAN: 'BOOLEAN'>, 'BOOLEAN': <TokenType.BOOLEAN: 'BOOLEAN'>, 'BYTE': <TokenType.TINYINT: 'TINYINT'>, 'MEDIUMINT': <TokenType.MEDIUMINT: 'MEDIUMINT'>, 'INT1': <TokenType.TINYINT: 'TINYINT'>, 'TINYINT': <TokenType.TINYINT: 'TINYINT'>, 'INT16': <TokenType.SMALLINT: 'SMALLINT'>, 'SHORT': <TokenType.SMALLINT: 'SMALLINT'>, 'SMALLINT': <TokenType.SMALLINT: 'SMALLINT'>, 'INT128': <TokenType.INT128: 'INT128'>, 'HUGEINT': <TokenType.INT128: 'INT128'>, 'INT2': <TokenType.SMALLINT: 'SMALLINT'>, 'INTEGER': <TokenType.INT: 'INT'>, 'INT': <TokenType.INT: 'INT'>, 'INT4': <TokenType.INT: 'INT'>, 'INT32': <TokenType.INT: 'INT'>, 'INT64': <TokenType.BIGINT: 'BIGINT'>, 'LONG': <TokenType.BIGINT: 'BIGINT'>, 'BIGINT': <TokenType.BIGINT: 'BIGINT'>, 'INT8': <TokenType.TINYINT: 'TINYINT'>, 'UINT': <TokenType.UINT: 'UINT'>, 'DEC': <TokenType.DECIMAL: 'DECIMAL'>, 'DECIMAL': <TokenType.DECIMAL: 'DECIMAL'>, 'BIGDECIMAL': <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, 'BIGNUMERIC': <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, 'LIST': <TokenType.LIST: 'LIST'>, 'MAP': <TokenType.MAP: 'MAP'>, 'NULLABLE': <TokenType.NULLABLE: 'NULLABLE'>, 'NUMBER': <TokenType.DECIMAL: 'DECIMAL'>, 'NUMERIC': <TokenType.DECIMAL: 'DECIMAL'>, 'FIXED': <TokenType.DECIMAL: 'DECIMAL'>, 'REAL': <TokenType.FLOAT: 'FLOAT'>, 'FLOAT': <TokenType.FLOAT: 'FLOAT'>, 'FLOAT4': <TokenType.FLOAT: 'FLOAT'>, 'FLOAT8': <TokenType.DOUBLE: 'DOUBLE'>, 'DOUBLE': <TokenType.DOUBLE: 'DOUBLE'>, 'DOUBLE PRECISION': <TokenType.DOUBLE: 'DOUBLE'>, 'JSON': <TokenType.JSON: 'JSON'>, 'JSONB': <TokenType.JSONB: 'JSONB'>, 'CHAR': <TokenType.CHAR: 'CHAR'>, 'CHARACTER': <TokenType.CHAR: 'CHAR'>, 'NCHAR': <TokenType.NCHAR: 'NCHAR'>, 'VARCHAR': <TokenType.VARCHAR: 'VARCHAR'>, 'VARCHAR2': <TokenType.VARCHAR: 'VARCHAR'>, 'NVARCHAR': <TokenType.NVARCHAR: 'NVARCHAR'>, 'NVARCHAR2': <TokenType.NVARCHAR: 'NVARCHAR'>, 'BPCHAR': <TokenType.BPCHAR: 'BPCHAR'>, 'STR': <TokenType.TEXT: 'TEXT'>, 'STRING': <TokenType.TEXT: 'TEXT'>, 'TEXT': <TokenType.TEXT: 'TEXT'>, 'LONGTEXT': <TokenType.LONGTEXT: 'LONGTEXT'>, 'MEDIUMTEXT': <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, 'TINYTEXT': <TokenType.TINYTEXT: 'TINYTEXT'>, 'CLOB': <TokenType.TEXT: 'TEXT'>, 'LONGVARCHAR': <TokenType.TEXT: 'TEXT'>, 'BINARY': <TokenType.BINARY: 'BINARY'>, 'BLOB': <TokenType.VARBINARY: 'VARBINARY'>, 'LONGBLOB': <TokenType.LONGBLOB: 'LONGBLOB'>, 'MEDIUMBLOB': <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, 'TINYBLOB': <TokenType.TINYBLOB: 'TINYBLOB'>, 'BYTEA': <TokenType.VARBINARY: 'VARBINARY'>, 'VARBINARY': <TokenType.VARBINARY: 'VARBINARY'>, 'TIME': <TokenType.TIME: 'TIME'>, 'TIMETZ': <TokenType.TIMETZ: 'TIMETZ'>, 'TIMESTAMP': <TokenType.TIMESTAMP: 'TIMESTAMP'>, 'TIMESTAMPTZ': <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, 'TIMESTAMPLTZ': <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, 'TIMESTAMP_LTZ': <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, 'TIMESTAMPNTZ': <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, 'TIMESTAMP_NTZ': <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, 'DATE': <TokenType.DATE: 'DATE'>, 'DATETIME': <TokenType.DATETIME: 'DATETIME'>, 'INT4RANGE': <TokenType.INT4RANGE: 'INT4RANGE'>, 'INT4MULTIRANGE': <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, 'INT8RANGE': <TokenType.INT8RANGE: 'INT8RANGE'>, 'INT8MULTIRANGE': <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, 'NUMRANGE': <TokenType.NUMRANGE: 'NUMRANGE'>, 'NUMMULTIRANGE': <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, 'TSRANGE': <TokenType.TSRANGE: 'TSRANGE'>, 'TSMULTIRANGE': <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, 'TSTZRANGE': <TokenType.TSTZRANGE: 'TSTZRANGE'>, 'TSTZMULTIRANGE': <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, 'DATERANGE': <TokenType.DATERANGE: 'DATERANGE'>, 'DATEMULTIRANGE': <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, 'UNIQUE': <TokenType.UNIQUE: 'UNIQUE'>, 'STRUCT': <TokenType.STRUCT: 'STRUCT'>, 'SEQUENCE': <TokenType.SEQUENCE: 'SEQUENCE'>, 'VARIANT': <TokenType.VARIANT: 'VARIANT'>, 'ALTER': <TokenType.ALTER: 'ALTER'>, 'ANALYZE': <TokenType.COMMAND: 'COMMAND'>, 'CALL': <TokenType.COMMAND: 'COMMAND'>, 'COMMENT': <TokenType.COMMENT: 'COMMENT'>, 'EXPLAIN': <TokenType.COMMAND: 'COMMAND'>, 'GRANT': <TokenType.COMMAND: 'COMMAND'>, 'OPTIMIZE': <TokenType.COMMAND: 'COMMAND'>, 'PREPARE': <TokenType.COMMAND: 'COMMAND'>, 'VACUUM': <TokenType.COMMAND: 'COMMAND'>, 'USER-DEFINED': <TokenType.USERDEFINED: 'USERDEFINED'>, 'FOR VERSION': <TokenType.VERSION_SNAPSHOT: 'VERSION_SNAPSHOT'>, 'FOR TIMESTAMP': <TokenType.TIMESTAMP_SNAPSHOT: 'TIMESTAMP_SNAPSHOT'>, 'ATTACH': <TokenType.COMMAND: 'COMMAND'>, 'DATE32': <TokenType.DATE32: 'DATE32'>, 'DATETIME64': <TokenType.DATETIME64: 'DATETIME64'>, 'DICTIONARY': <TokenType.DICTIONARY: 'DICTIONARY'>, 'ENUM8': <TokenType.ENUM8: 'ENUM8'>, 'ENUM16': <TokenType.ENUM16: 'ENUM16'>, 'FINAL': <TokenType.FINAL: 'FINAL'>, 'FIXEDSTRING': <TokenType.FIXEDSTRING: 'FIXEDSTRING'>, 'FLOAT32': <TokenType.FLOAT: 'FLOAT'>, 'FLOAT64': <TokenType.DOUBLE: 'DOUBLE'>, 'GLOBAL': <TokenType.GLOBAL: 'GLOBAL'>, 'INT256': <TokenType.INT256: 'INT256'>, 'LOWCARDINALITY': <TokenType.LOWCARDINALITY: 'LOWCARDINALITY'>, 'NESTED': <TokenType.NESTED: 'NESTED'>, 'SAMPLE': <TokenType.TABLE_SAMPLE: 'TABLE_SAMPLE'>, 'TUPLE': <TokenType.STRUCT: 'STRUCT'>, 'UINT128': <TokenType.UINT128: 'UINT128'>, 'UINT16': <TokenType.USMALLINT: 'USMALLINT'>, 'UINT256': <TokenType.UINT256: 'UINT256'>, 'UINT32': <TokenType.UINT: 'UINT'>, 'UINT64': <TokenType.UBIGINT: 'UBIGINT'>, 'UINT8': <TokenType.UTINYINT: 'UTINYINT'>, 'IPV4': <TokenType.IPV4: 'IPV4'>, 'IPV6': <TokenType.IPV6: 'IPV6'>, 'AGGREGATEFUNCTION': <TokenType.AGGREGATEFUNCTION: 'AGGREGATEFUNCTION'>, 'SIMPLEAGGREGATEFUNCTION': <TokenType.SIMPLEAGGREGATEFUNCTION: 'SIMPLEAGGREGATEFUNCTION'>, 'SYSTEM': <TokenType.COMMAND: 'COMMAND'>, 'PREWHERE': <TokenType.PREWHERE: 'PREWHERE'>}
SINGLE_TOKENS = {'(': <TokenType.L_PAREN: 'L_PAREN'>, ')': <TokenType.R_PAREN: 'R_PAREN'>, '[': <TokenType.L_BRACKET: 'L_BRACKET'>, ']': <TokenType.R_BRACKET: 'R_BRACKET'>, '{': <TokenType.L_BRACE: 'L_BRACE'>, '}': <TokenType.R_BRACE: 'R_BRACE'>, '&': <TokenType.AMP: 'AMP'>, '^': <TokenType.CARET: 'CARET'>, ':': <TokenType.COLON: 'COLON'>, ',': <TokenType.COMMA: 'COMMA'>, '.': <TokenType.DOT: 'DOT'>, '-': <TokenType.DASH: 'DASH'>, '=': <TokenType.EQ: 'EQ'>, '>': <TokenType.GT: 'GT'>, '<': <TokenType.LT: 'LT'>, '%': <TokenType.MOD: 'MOD'>, '!': <TokenType.NOT: 'NOT'>, '|': <TokenType.PIPE: 'PIPE'>, '+': <TokenType.PLUS: 'PLUS'>, ';': <TokenType.SEMICOLON: 'SEMICOLON'>, '/': <TokenType.SLASH: 'SLASH'>, '\\': <TokenType.BACKSLASH: 'BACKSLASH'>, '*': <TokenType.STAR: 'STAR'>, '~': <TokenType.TILDA: 'TILDA'>, '?': <TokenType.PLACEHOLDER: 'PLACEHOLDER'>, '@': <TokenType.PARAMETER: 'PARAMETER'>, '#': <TokenType.HASH: 'HASH'>, "'": <TokenType.UNKNOWN: 'UNKNOWN'>, '`': <TokenType.UNKNOWN: 'UNKNOWN'>, '"': <TokenType.UNKNOWN: 'UNKNOWN'>, '$': <TokenType.HEREDOC_STRING: 'HEREDOC_STRING'>}
class ClickHouse.Parser(sqlglot.parser.Parser):
159    class Parser(parser.Parser):
160        # Tested in ClickHouse's playground, it seems that the following two queries do the same thing
161        # * select x from t1 union all select x from t2 limit 1;
162        # * select x from t1 union all (select x from t2 limit 1);
163        MODIFIERS_ATTACHED_TO_SET_OP = False
164        INTERVAL_SPANS = False
165
166        FUNCTIONS = {
167            **parser.Parser.FUNCTIONS,
168            "ANY": exp.AnyValue.from_arg_list,
169            "ARRAYSUM": exp.ArraySum.from_arg_list,
170            "COUNTIF": _build_count_if,
171            "DATE_ADD": build_date_delta(exp.DateAdd, default_unit=None),
172            "DATEADD": build_date_delta(exp.DateAdd, default_unit=None),
173            "DATE_DIFF": build_date_delta(exp.DateDiff, default_unit=None),
174            "DATEDIFF": build_date_delta(exp.DateDiff, default_unit=None),
175            "DATE_FORMAT": _build_date_format,
176            "DATE_SUB": build_date_delta(exp.DateSub, default_unit=None),
177            "DATESUB": build_date_delta(exp.DateSub, default_unit=None),
178            "FORMATDATETIME": _build_date_format,
179            "JSONEXTRACTSTRING": build_json_extract_path(
180                exp.JSONExtractScalar, zero_based_indexing=False
181            ),
182            "MAP": parser.build_var_map,
183            "MATCH": exp.RegexpLike.from_arg_list,
184            "RANDCANONICAL": exp.Rand.from_arg_list,
185            "TUPLE": exp.Struct.from_arg_list,
186            "TIMESTAMP_SUB": build_date_delta(exp.TimestampSub, default_unit=None),
187            "TIMESTAMPSUB": build_date_delta(exp.TimestampSub, default_unit=None),
188            "TIMESTAMP_ADD": build_date_delta(exp.TimestampAdd, default_unit=None),
189            "TIMESTAMPADD": build_date_delta(exp.TimestampAdd, default_unit=None),
190            "UNIQ": exp.ApproxDistinct.from_arg_list,
191            "XOR": lambda args: exp.Xor(expressions=args),
192            "MD5": exp.MD5Digest.from_arg_list,
193            "SHA256": lambda args: exp.SHA2(this=seq_get(args, 0), length=exp.Literal.number(256)),
194            "SHA512": lambda args: exp.SHA2(this=seq_get(args, 0), length=exp.Literal.number(512)),
195        }
196
197        AGG_FUNCTIONS = {
198            "count",
199            "min",
200            "max",
201            "sum",
202            "avg",
203            "any",
204            "stddevPop",
205            "stddevSamp",
206            "varPop",
207            "varSamp",
208            "corr",
209            "covarPop",
210            "covarSamp",
211            "entropy",
212            "exponentialMovingAverage",
213            "intervalLengthSum",
214            "kolmogorovSmirnovTest",
215            "mannWhitneyUTest",
216            "median",
217            "rankCorr",
218            "sumKahan",
219            "studentTTest",
220            "welchTTest",
221            "anyHeavy",
222            "anyLast",
223            "boundingRatio",
224            "first_value",
225            "last_value",
226            "argMin",
227            "argMax",
228            "avgWeighted",
229            "topK",
230            "topKWeighted",
231            "deltaSum",
232            "deltaSumTimestamp",
233            "groupArray",
234            "groupArrayLast",
235            "groupUniqArray",
236            "groupArrayInsertAt",
237            "groupArrayMovingAvg",
238            "groupArrayMovingSum",
239            "groupArraySample",
240            "groupBitAnd",
241            "groupBitOr",
242            "groupBitXor",
243            "groupBitmap",
244            "groupBitmapAnd",
245            "groupBitmapOr",
246            "groupBitmapXor",
247            "sumWithOverflow",
248            "sumMap",
249            "minMap",
250            "maxMap",
251            "skewSamp",
252            "skewPop",
253            "kurtSamp",
254            "kurtPop",
255            "uniq",
256            "uniqExact",
257            "uniqCombined",
258            "uniqCombined64",
259            "uniqHLL12",
260            "uniqTheta",
261            "quantile",
262            "quantiles",
263            "quantileExact",
264            "quantilesExact",
265            "quantileExactLow",
266            "quantilesExactLow",
267            "quantileExactHigh",
268            "quantilesExactHigh",
269            "quantileExactWeighted",
270            "quantilesExactWeighted",
271            "quantileTiming",
272            "quantilesTiming",
273            "quantileTimingWeighted",
274            "quantilesTimingWeighted",
275            "quantileDeterministic",
276            "quantilesDeterministic",
277            "quantileTDigest",
278            "quantilesTDigest",
279            "quantileTDigestWeighted",
280            "quantilesTDigestWeighted",
281            "quantileBFloat16",
282            "quantilesBFloat16",
283            "quantileBFloat16Weighted",
284            "quantilesBFloat16Weighted",
285            "simpleLinearRegression",
286            "stochasticLinearRegression",
287            "stochasticLogisticRegression",
288            "categoricalInformationValue",
289            "contingency",
290            "cramersV",
291            "cramersVBiasCorrected",
292            "theilsU",
293            "maxIntersections",
294            "maxIntersectionsPosition",
295            "meanZTest",
296            "quantileInterpolatedWeighted",
297            "quantilesInterpolatedWeighted",
298            "quantileGK",
299            "quantilesGK",
300            "sparkBar",
301            "sumCount",
302            "largestTriangleThreeBuckets",
303            "histogram",
304            "sequenceMatch",
305            "sequenceCount",
306            "windowFunnel",
307            "retention",
308            "uniqUpTo",
309            "sequenceNextNode",
310            "exponentialTimeDecayedAvg",
311        }
312
313        AGG_FUNCTIONS_SUFFIXES = [
314            "If",
315            "Array",
316            "ArrayIf",
317            "Map",
318            "SimpleState",
319            "State",
320            "Merge",
321            "MergeState",
322            "ForEach",
323            "Distinct",
324            "OrDefault",
325            "OrNull",
326            "Resample",
327            "ArgMin",
328            "ArgMax",
329        ]
330
331        FUNC_TOKENS = {
332            *parser.Parser.FUNC_TOKENS,
333            TokenType.SET,
334        }
335
336        AGG_FUNC_MAPPING = (
337            lambda functions, suffixes: {
338                f"{f}{sfx}": (f, sfx) for sfx in (suffixes + [""]) for f in functions
339            }
340        )(AGG_FUNCTIONS, AGG_FUNCTIONS_SUFFIXES)
341
342        FUNCTIONS_WITH_ALIASED_ARGS = {*parser.Parser.FUNCTIONS_WITH_ALIASED_ARGS, "TUPLE"}
343
344        FUNCTION_PARSERS = {
345            **parser.Parser.FUNCTION_PARSERS,
346            "ARRAYJOIN": lambda self: self.expression(exp.Explode, this=self._parse_expression()),
347            "QUANTILE": lambda self: self._parse_quantile(),
348        }
349
350        FUNCTION_PARSERS.pop("MATCH")
351
352        NO_PAREN_FUNCTION_PARSERS = parser.Parser.NO_PAREN_FUNCTION_PARSERS.copy()
353        NO_PAREN_FUNCTION_PARSERS.pop("ANY")
354
355        RANGE_PARSERS = {
356            **parser.Parser.RANGE_PARSERS,
357            TokenType.GLOBAL: lambda self, this: self._match(TokenType.IN)
358            and self._parse_in(this, is_global=True),
359        }
360
361        # The PLACEHOLDER entry is popped because 1) it doesn't affect Clickhouse (it corresponds to
362        # the postgres-specific JSONBContains parser) and 2) it makes parsing the ternary op simpler.
363        COLUMN_OPERATORS = parser.Parser.COLUMN_OPERATORS.copy()
364        COLUMN_OPERATORS.pop(TokenType.PLACEHOLDER)
365
366        JOIN_KINDS = {
367            *parser.Parser.JOIN_KINDS,
368            TokenType.ANY,
369            TokenType.ASOF,
370            TokenType.ARRAY,
371        }
372
373        TABLE_ALIAS_TOKENS = parser.Parser.TABLE_ALIAS_TOKENS - {
374            TokenType.ANY,
375            TokenType.ARRAY,
376            TokenType.FINAL,
377            TokenType.FORMAT,
378            TokenType.SETTINGS,
379        }
380
381        ALIAS_TOKENS = parser.Parser.ALIAS_TOKENS - {
382            TokenType.FORMAT,
383        }
384
385        LOG_DEFAULTS_TO_LN = True
386
387        QUERY_MODIFIER_PARSERS = {
388            **parser.Parser.QUERY_MODIFIER_PARSERS,
389            TokenType.SETTINGS: lambda self: (
390                "settings",
391                self._advance() or self._parse_csv(self._parse_assignment),
392            ),
393            TokenType.FORMAT: lambda self: ("format", self._advance() or self._parse_id_var()),
394        }
395
396        CONSTRAINT_PARSERS = {
397            **parser.Parser.CONSTRAINT_PARSERS,
398            "INDEX": lambda self: self._parse_index_constraint(),
399            "CODEC": lambda self: self._parse_compress(),
400        }
401
402        ALTER_PARSERS = {
403            **parser.Parser.ALTER_PARSERS,
404            "REPLACE": lambda self: self._parse_alter_table_replace(),
405        }
406
407        SCHEMA_UNNAMED_CONSTRAINTS = {
408            *parser.Parser.SCHEMA_UNNAMED_CONSTRAINTS,
409            "INDEX",
410        }
411
412        def _parse_assignment(self) -> t.Optional[exp.Expression]:
413            this = super()._parse_assignment()
414
415            if self._match(TokenType.PLACEHOLDER):
416                return self.expression(
417                    exp.If,
418                    this=this,
419                    true=self._parse_assignment(),
420                    false=self._match(TokenType.COLON) and self._parse_assignment(),
421                )
422
423            return this
424
425        def _parse_placeholder(self) -> t.Optional[exp.Expression]:
426            """
427            Parse a placeholder expression like SELECT {abc: UInt32} or FROM {table: Identifier}
428            https://clickhouse.com/docs/en/sql-reference/syntax#defining-and-using-query-parameters
429            """
430            if not self._match(TokenType.L_BRACE):
431                return None
432
433            this = self._parse_id_var()
434            self._match(TokenType.COLON)
435            kind = self._parse_types(check_func=False, allow_identifiers=False) or (
436                self._match_text_seq("IDENTIFIER") and "Identifier"
437            )
438
439            if not kind:
440                self.raise_error("Expecting a placeholder type or 'Identifier' for tables")
441            elif not self._match(TokenType.R_BRACE):
442                self.raise_error("Expecting }")
443
444            return self.expression(exp.Placeholder, this=this, kind=kind)
445
446        def _parse_in(self, this: t.Optional[exp.Expression], is_global: bool = False) -> exp.In:
447            this = super()._parse_in(this)
448            this.set("is_global", is_global)
449            return this
450
451        def _parse_table(
452            self,
453            schema: bool = False,
454            joins: bool = False,
455            alias_tokens: t.Optional[t.Collection[TokenType]] = None,
456            parse_bracket: bool = False,
457            is_db_reference: bool = False,
458            parse_partition: bool = False,
459        ) -> t.Optional[exp.Expression]:
460            this = super()._parse_table(
461                schema=schema,
462                joins=joins,
463                alias_tokens=alias_tokens,
464                parse_bracket=parse_bracket,
465                is_db_reference=is_db_reference,
466            )
467
468            if self._match(TokenType.FINAL):
469                this = self.expression(exp.Final, this=this)
470
471            return this
472
473        def _parse_position(self, haystack_first: bool = False) -> exp.StrPosition:
474            return super()._parse_position(haystack_first=True)
475
476        # https://clickhouse.com/docs/en/sql-reference/statements/select/with/
477        def _parse_cte(self) -> exp.CTE:
478            # WITH <identifier> AS <subquery expression>
479            cte: t.Optional[exp.CTE] = self._try_parse(super()._parse_cte)
480
481            if not cte:
482                # WITH <expression> AS <identifier>
483                cte = self.expression(
484                    exp.CTE,
485                    this=self._parse_assignment(),
486                    alias=self._parse_table_alias(),
487                    scalar=True,
488                )
489
490            return cte
491
492        def _parse_join_parts(
493            self,
494        ) -> t.Tuple[t.Optional[Token], t.Optional[Token], t.Optional[Token]]:
495            is_global = self._match(TokenType.GLOBAL) and self._prev
496            kind_pre = self._match_set(self.JOIN_KINDS, advance=False) and self._prev
497
498            if kind_pre:
499                kind = self._match_set(self.JOIN_KINDS) and self._prev
500                side = self._match_set(self.JOIN_SIDES) and self._prev
501                return is_global, side, kind
502
503            return (
504                is_global,
505                self._match_set(self.JOIN_SIDES) and self._prev,
506                self._match_set(self.JOIN_KINDS) and self._prev,
507            )
508
509        def _parse_join(
510            self, skip_join_token: bool = False, parse_bracket: bool = False
511        ) -> t.Optional[exp.Join]:
512            join = super()._parse_join(skip_join_token=skip_join_token, parse_bracket=True)
513            if join:
514                join.set("global", join.args.pop("method", None))
515
516            return join
517
518        def _parse_function(
519            self,
520            functions: t.Optional[t.Dict[str, t.Callable]] = None,
521            anonymous: bool = False,
522            optional_parens: bool = True,
523            any_token: bool = False,
524        ) -> t.Optional[exp.Expression]:
525            expr = super()._parse_function(
526                functions=functions,
527                anonymous=anonymous,
528                optional_parens=optional_parens,
529                any_token=any_token,
530            )
531
532            func = expr.this if isinstance(expr, exp.Window) else expr
533
534            # Aggregate functions can be split in 2 parts: <func_name><suffix>
535            parts = (
536                self.AGG_FUNC_MAPPING.get(func.this) if isinstance(func, exp.Anonymous) else None
537            )
538
539            if parts:
540                params = self._parse_func_params(func)
541
542                kwargs = {
543                    "this": func.this,
544                    "expressions": func.expressions,
545                }
546                if parts[1]:
547                    kwargs["parts"] = parts
548                    exp_class = exp.CombinedParameterizedAgg if params else exp.CombinedAggFunc
549                else:
550                    exp_class = exp.ParameterizedAgg if params else exp.AnonymousAggFunc
551
552                kwargs["exp_class"] = exp_class
553                if params:
554                    kwargs["params"] = params
555
556                func = self.expression(**kwargs)
557
558                if isinstance(expr, exp.Window):
559                    # The window's func was parsed as Anonymous in base parser, fix its
560                    # type to be CH style CombinedAnonymousAggFunc / AnonymousAggFunc
561                    expr.set("this", func)
562                elif params:
563                    # Params have blocked super()._parse_function() from parsing the following window
564                    # (if that exists) as they're standing between the function call and the window spec
565                    expr = self._parse_window(func)
566                else:
567                    expr = func
568
569            return expr
570
571        def _parse_func_params(
572            self, this: t.Optional[exp.Func] = None
573        ) -> t.Optional[t.List[exp.Expression]]:
574            if self._match_pair(TokenType.R_PAREN, TokenType.L_PAREN):
575                return self._parse_csv(self._parse_lambda)
576
577            if self._match(TokenType.L_PAREN):
578                params = self._parse_csv(self._parse_lambda)
579                self._match_r_paren(this)
580                return params
581
582            return None
583
584        def _parse_quantile(self) -> exp.Quantile:
585            this = self._parse_lambda()
586            params = self._parse_func_params()
587            if params:
588                return self.expression(exp.Quantile, this=params[0], quantile=this)
589            return self.expression(exp.Quantile, this=this, quantile=exp.Literal.number(0.5))
590
591        def _parse_wrapped_id_vars(self, optional: bool = False) -> t.List[exp.Expression]:
592            return super()._parse_wrapped_id_vars(optional=True)
593
594        def _parse_primary_key(
595            self, wrapped_optional: bool = False, in_props: bool = False
596        ) -> exp.PrimaryKeyColumnConstraint | exp.PrimaryKey:
597            return super()._parse_primary_key(
598                wrapped_optional=wrapped_optional or in_props, in_props=in_props
599            )
600
601        def _parse_on_property(self) -> t.Optional[exp.Expression]:
602            index = self._index
603            if self._match_text_seq("CLUSTER"):
604                this = self._parse_id_var()
605                if this:
606                    return self.expression(exp.OnCluster, this=this)
607                else:
608                    self._retreat(index)
609            return None
610
611        def _parse_index_constraint(
612            self, kind: t.Optional[str] = None
613        ) -> exp.IndexColumnConstraint:
614            # INDEX name1 expr TYPE type1(args) GRANULARITY value
615            this = self._parse_id_var()
616            expression = self._parse_assignment()
617
618            index_type = self._match_text_seq("TYPE") and (
619                self._parse_function() or self._parse_var()
620            )
621
622            granularity = self._match_text_seq("GRANULARITY") and self._parse_term()
623
624            return self.expression(
625                exp.IndexColumnConstraint,
626                this=this,
627                expression=expression,
628                index_type=index_type,
629                granularity=granularity,
630            )
631
632        def _parse_partition(self) -> t.Optional[exp.Partition]:
633            # https://clickhouse.com/docs/en/sql-reference/statements/alter/partition#how-to-set-partition-expression
634            if not self._match(TokenType.PARTITION):
635                return None
636
637            if self._match_text_seq("ID"):
638                # Corresponds to the PARTITION ID <string_value> syntax
639                expressions: t.List[exp.Expression] = [
640                    self.expression(exp.PartitionId, this=self._parse_string())
641                ]
642            else:
643                expressions = self._parse_expressions()
644
645            return self.expression(exp.Partition, expressions=expressions)
646
647        def _parse_alter_table_replace(self) -> t.Optional[exp.Expression]:
648            partition = self._parse_partition()
649
650            if not partition or not self._match(TokenType.FROM):
651                return None
652
653            return self.expression(
654                exp.ReplacePartition, expression=partition, source=self._parse_table_parts()
655            )
656
657        def _parse_projection_def(self) -> t.Optional[exp.ProjectionDef]:
658            if not self._match_text_seq("PROJECTION"):
659                return None
660
661            return self.expression(
662                exp.ProjectionDef,
663                this=self._parse_id_var(),
664                expression=self._parse_wrapped(self._parse_statement),
665            )
666
667        def _parse_constraint(self) -> t.Optional[exp.Expression]:
668            return super()._parse_constraint() or self._parse_projection_def()

Parser consumes a list of tokens produced by the Tokenizer and produces a parsed syntax tree.

Arguments:
  • error_level: The desired error level. Default: ErrorLevel.IMMEDIATE
  • error_message_context: The amount of context to capture from a query string when displaying the error message (in number of characters). Default: 100
  • max_errors: Maximum number of error messages to include in a raised ParseError. This is only relevant if error_level is ErrorLevel.RAISE. Default: 3
MODIFIERS_ATTACHED_TO_SET_OP = False
INTERVAL_SPANS = False
FUNCTIONS = {'ABS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Abs'>>, 'ADD_MONTHS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.AddMonths'>>, 'ANONYMOUS_AGG_FUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.AnonymousAggFunc'>>, 'ANY_VALUE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.AnyValue'>>, 'APPROX_DISTINCT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ApproxDistinct'>>, 'APPROX_COUNT_DISTINCT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ApproxDistinct'>>, 'APPROX_QUANTILE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ApproxQuantile'>>, 'APPROX_TOP_K': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ApproxTopK'>>, 'ARG_MAX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArgMax'>>, 'ARGMAX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArgMax'>>, 'MAX_BY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArgMax'>>, 'ARG_MIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArgMin'>>, 'ARGMIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArgMin'>>, 'MIN_BY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArgMin'>>, 'ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Array'>>, 'ARRAY_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayAgg'>>, 'ARRAY_ALL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayAll'>>, 'ARRAY_ANY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayAny'>>, 'ARRAY_CONCAT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayConcat'>>, 'ARRAY_CAT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayConcat'>>, 'ARRAY_CONSTRUCT_COMPACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayConstructCompact'>>, 'ARRAY_CONTAINS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayContains'>>, 'ARRAY_HAS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayContains'>>, 'ARRAY_CONTAINS_ALL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayContainsAll'>>, 'ARRAY_HAS_ALL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayContainsAll'>>, 'FILTER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayFilter'>>, 'ARRAY_FILTER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayFilter'>>, 'ARRAY_OVERLAPS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayOverlaps'>>, 'ARRAY_SIZE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArraySize'>>, 'ARRAY_LENGTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArraySize'>>, 'ARRAY_SORT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArraySort'>>, 'ARRAY_SUM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArraySum'>>, 'ARRAY_TO_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayToString'>>, 'ARRAY_JOIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayToString'>>, 'ARRAY_UNION_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayUnionAgg'>>, 'ARRAY_UNIQUE_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayUniqueAgg'>>, 'AVG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Avg'>>, 'CASE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Case'>>, 'CAST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Cast'>>, 'CAST_TO_STR_TYPE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.CastToStrType'>>, 'CBRT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Cbrt'>>, 'CEIL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Ceil'>>, 'CEILING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Ceil'>>, 'CHR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Chr'>>, 'CHAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Chr'>>, 'COALESCE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Coalesce'>>, 'IFNULL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Coalesce'>>, 'NVL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Coalesce'>>, 'COLLATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Collate'>>, 'COMBINED_AGG_FUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.CombinedAggFunc'>>, 'COMBINED_PARAMETERIZED_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.CombinedParameterizedAgg'>>, 'CONCAT': <function Parser.<lambda>>, 'CONCAT_WS': <function Parser.<lambda>>, 'CONNECT_BY_ROOT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ConnectByRoot'>>, 'CONVERT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Convert'>>, 'CORR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Corr'>>, 'COUNT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Count'>>, 'COUNT_IF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.CountIf'>>, 'COUNTIF': <function _build_count_if>, 'COVAR_POP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.CovarPop'>>, 'COVAR_SAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.CovarSamp'>>, 'CURRENT_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.CurrentDate'>>, 'CURRENT_DATETIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.CurrentDatetime'>>, 'CURRENT_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.CurrentTime'>>, 'CURRENT_TIMESTAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.CurrentTimestamp'>>, 'CURRENT_USER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.CurrentUser'>>, 'DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Date'>>, 'DATE_ADD': <function build_date_delta.<locals>._builder>, 'DATEDIFF': <function build_date_delta.<locals>._builder>, 'DATE_DIFF': <function build_date_delta.<locals>._builder>, 'DATE_FROM_PARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DateFromParts'>>, 'DATEFROMPARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DateFromParts'>>, 'DATE_STR_TO_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DateStrToDate'>>, 'DATE_SUB': <function build_date_delta.<locals>._builder>, 'DATE_TO_DATE_STR': <function Parser.<lambda>>, 'DATE_TO_DI': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DateToDi'>>, 'DATE_TRUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DateTrunc'>>, 'DATETIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Datetime'>>, 'DATETIME_ADD': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DatetimeAdd'>>, 'DATETIME_DIFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DatetimeDiff'>>, 'DATETIME_SUB': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DatetimeSub'>>, 'DATETIME_TRUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DatetimeTrunc'>>, 'DAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Day'>>, 'DAY_OF_MONTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DayOfMonth'>>, 'DAYOFMONTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DayOfMonth'>>, 'DAY_OF_WEEK': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DayOfWeek'>>, 'DAYOFWEEK': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DayOfWeek'>>, 'DAY_OF_YEAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DayOfYear'>>, 'DAYOFYEAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DayOfYear'>>, 'DECODE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Decode'>>, 'DI_TO_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DiToDate'>>, 'ENCODE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Encode'>>, 'EXP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Exp'>>, 'EXPLODE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Explode'>>, 'EXPLODE_OUTER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ExplodeOuter'>>, 'EXTRACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Extract'>>, 'FIRST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.First'>>, 'FIRST_VALUE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.FirstValue'>>, 'FLATTEN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Flatten'>>, 'FLOOR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Floor'>>, 'FROM_BASE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.FromBase'>>, 'FROM_BASE64': <bound method Func.from_arg_list of <class 'sqlglot.expressions.FromBase64'>>, 'GAP_FILL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.GapFill'>>, 'GENERATE_DATE_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.GenerateDateArray'>>, 'GENERATE_SERIES': <bound method Func.from_arg_list of <class 'sqlglot.expressions.GenerateSeries'>>, 'GREATEST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Greatest'>>, 'GROUP_CONCAT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.GroupConcat'>>, 'HEX': <function build_hex>, 'HLL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Hll'>>, 'IF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.If'>>, 'IIF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.If'>>, 'INITCAP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Initcap'>>, 'IS_INF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.IsInf'>>, 'ISINF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.IsInf'>>, 'IS_NAN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.IsNan'>>, 'ISNAN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.IsNan'>>, 'J_S_O_N_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.JSONArray'>>, 'J_S_O_N_ARRAY_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.JSONArrayAgg'>>, 'JSON_ARRAY_CONTAINS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.JSONArrayContains'>>, 'JSONB_CONTAINS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.JSONBContains'>>, 'JSONB_EXTRACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.JSONBExtract'>>, 'JSONB_EXTRACT_SCALAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.JSONBExtractScalar'>>, 'JSON_EXTRACT': <function build_extract_json_with_path.<locals>._builder>, 'JSON_EXTRACT_SCALAR': <function build_extract_json_with_path.<locals>._builder>, 'JSON_FORMAT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.JSONFormat'>>, 'J_S_O_N_OBJECT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.JSONObject'>>, 'J_S_O_N_OBJECT_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.JSONObjectAgg'>>, 'J_S_O_N_TABLE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.JSONTable'>>, 'LAG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Lag'>>, 'LAST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Last'>>, 'LAST_DAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.LastDay'>>, 'LAST_DAY_OF_MONTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.LastDay'>>, 'LAST_VALUE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.LastValue'>>, 'LEAD': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Lead'>>, 'LEAST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Least'>>, 'LEFT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Left'>>, 'LENGTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Length'>>, 'LEN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Length'>>, 'LEVENSHTEIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Levenshtein'>>, 'LIST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.List'>>, 'LN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Ln'>>, 'LOG': <function build_logarithm>, 'LOGICAL_AND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.LogicalAnd'>>, 'BOOL_AND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.LogicalAnd'>>, 'BOOLAND_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.LogicalAnd'>>, 'LOGICAL_OR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.LogicalOr'>>, 'BOOL_OR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.LogicalOr'>>, 'BOOLOR_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.LogicalOr'>>, 'LOWER': <function build_lower>, 'LCASE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Lower'>>, 'LOWER_HEX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.LowerHex'>>, 'MD5': <bound method Func.from_arg_list of <class 'sqlglot.expressions.MD5Digest'>>, 'MD5_DIGEST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.MD5Digest'>>, 'MAP': <function build_var_map>, 'MAP_FROM_ENTRIES': <bound method Func.from_arg_list of <class 'sqlglot.expressions.MapFromEntries'>>, 'MATCH_AGAINST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.MatchAgainst'>>, 'MAX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Max'>>, 'MIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Min'>>, 'MONTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Month'>>, 'MONTHS_BETWEEN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.MonthsBetween'>>, 'NEXT_VALUE_FOR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.NextValueFor'>>, 'NTH_VALUE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.NthValue'>>, 'NULLIF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Nullif'>>, 'NUMBER_TO_STR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.NumberToStr'>>, 'NVL2': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Nvl2'>>, 'OPEN_J_S_O_N': <bound method Func.from_arg_list of <class 'sqlglot.expressions.OpenJSON'>>, 'PARAMETERIZED_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ParameterizedAgg'>>, 'PARSE_JSON': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ParseJSON'>>, 'JSON_PARSE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ParseJSON'>>, 'PERCENTILE_CONT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.PercentileCont'>>, 'PERCENTILE_DISC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.PercentileDisc'>>, 'POSEXPLODE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Posexplode'>>, 'POSEXPLODE_OUTER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.PosexplodeOuter'>>, 'POWER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Pow'>>, 'POW': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Pow'>>, 'PREDICT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Predict'>>, 'QUANTILE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Quantile'>>, 'QUARTER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Quarter'>>, 'RAND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Rand'>>, 'RANDOM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Rand'>>, 'RANDN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Randn'>>, 'RANGE_N': <bound method Func.from_arg_list of <class 'sqlglot.expressions.RangeN'>>, 'READ_CSV': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ReadCSV'>>, 'REDUCE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Reduce'>>, 'REGEXP_EXTRACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.RegexpExtract'>>, 'REGEXP_I_LIKE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.RegexpILike'>>, 'REGEXP_LIKE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.RegexpLike'>>, 'REGEXP_REPLACE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.RegexpReplace'>>, 'REGEXP_SPLIT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.RegexpSplit'>>, 'REPEAT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Repeat'>>, 'RIGHT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Right'>>, 'ROUND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Round'>>, 'ROW_NUMBER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.RowNumber'>>, 'SHA': <bound method Func.from_arg_list of <class 'sqlglot.expressions.SHA'>>, 'SHA1': <bound method Func.from_arg_list of <class 'sqlglot.expressions.SHA'>>, 'SHA2': <bound method Func.from_arg_list of <class 'sqlglot.expressions.SHA2'>>, 'SAFE_DIVIDE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.SafeDivide'>>, 'SIGN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Sign'>>, 'SIGNUM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Sign'>>, 'SORT_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.SortArray'>>, 'SPLIT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Split'>>, 'SQRT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Sqrt'>>, 'STANDARD_HASH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StandardHash'>>, 'STAR_MAP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StarMap'>>, 'STARTS_WITH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StartsWith'>>, 'STARTSWITH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StartsWith'>>, 'STDDEV': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Stddev'>>, 'STDDEV_POP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StddevPop'>>, 'STDDEV_SAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StddevSamp'>>, 'STR_POSITION': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StrPosition'>>, 'STR_TO_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StrToDate'>>, 'STR_TO_MAP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StrToMap'>>, 'STR_TO_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StrToTime'>>, 'STR_TO_UNIX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StrToUnix'>>, 'STRING_TO_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StringToArray'>>, 'SPLIT_BY_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StringToArray'>>, 'STRUCT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Struct'>>, 'STRUCT_EXTRACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.StructExtract'>>, 'STUFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Stuff'>>, 'INSERT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Stuff'>>, 'SUBSTRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Substring'>>, 'SUM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Sum'>>, 'TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Time'>>, 'TIME_ADD': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimeAdd'>>, 'TIME_DIFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimeDiff'>>, 'TIME_FROM_PARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimeFromParts'>>, 'TIMEFROMPARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimeFromParts'>>, 'TIME_STR_TO_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimeStrToDate'>>, 'TIME_STR_TO_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimeStrToTime'>>, 'TIME_STR_TO_UNIX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimeStrToUnix'>>, 'TIME_SUB': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimeSub'>>, 'TIME_TO_STR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimeToStr'>>, 'TIME_TO_TIME_STR': <function Parser.<lambda>>, 'TIME_TO_UNIX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimeToUnix'>>, 'TIME_TRUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimeTrunc'>>, 'TIMESTAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Timestamp'>>, 'TIMESTAMP_ADD': <function build_date_delta.<locals>._builder>, 'TIMESTAMPDIFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimestampDiff'>>, 'TIMESTAMP_DIFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimestampDiff'>>, 'TIMESTAMP_FROM_PARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimestampFromParts'>>, 'TIMESTAMPFROMPARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimestampFromParts'>>, 'TIMESTAMP_SUB': <function build_date_delta.<locals>._builder>, 'TIMESTAMP_TRUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimestampTrunc'>>, 'TO_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ToArray'>>, 'TO_BASE64': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ToBase64'>>, 'TO_CHAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ToChar'>>, 'TO_DAYS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ToDays'>>, 'TO_MAP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ToMap'>>, 'TO_NUMBER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ToNumber'>>, 'TRANSFORM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Transform'>>, 'TRIM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Trim'>>, 'TRY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Try'>>, 'TRY_CAST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TryCast'>>, 'TS_OR_DI_TO_DI': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TsOrDiToDi'>>, 'TS_OR_DS_ADD': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TsOrDsAdd'>>, 'TS_OR_DS_DIFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TsOrDsDiff'>>, 'TS_OR_DS_TO_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TsOrDsToDate'>>, 'TS_OR_DS_TO_DATE_STR': <function Parser.<lambda>>, 'TS_OR_DS_TO_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TsOrDsToTime'>>, 'TS_OR_DS_TO_TIMESTAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TsOrDsToTimestamp'>>, 'UNHEX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Unhex'>>, 'UNIX_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.UnixDate'>>, 'UNIX_TO_STR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.UnixToStr'>>, 'UNIX_TO_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.UnixToTime'>>, 'UNIX_TO_TIME_STR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.UnixToTimeStr'>>, 'UNNEST': <function Parser.<lambda>>, 'UPPER': <function build_upper>, 'UCASE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Upper'>>, 'VAR_MAP': <function build_var_map>, 'VARIANCE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Variance'>>, 'VARIANCE_SAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Variance'>>, 'VAR_SAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Variance'>>, 'VARIANCE_POP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.VariancePop'>>, 'VAR_POP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.VariancePop'>>, 'WEEK': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Week'>>, 'WEEK_OF_YEAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.WeekOfYear'>>, 'WEEKOFYEAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.WeekOfYear'>>, 'WHEN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.When'>>, 'X_M_L_TABLE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.XMLTable'>>, 'XOR': <function ClickHouse.Parser.<lambda>>, 'YEAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Year'>>, 'GLOB': <function Parser.<lambda>>, 'JSON_EXTRACT_PATH_TEXT': <function build_extract_json_with_path.<locals>._builder>, 'LIKE': <function build_like>, 'LOG2': <function Parser.<lambda>>, 'LOG10': <function Parser.<lambda>>, 'MOD': <function build_mod>, 'SCOPE_RESOLUTION': <function Parser.<lambda>>, 'TO_HEX': <function build_hex>, 'ANY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.AnyValue'>>, 'ARRAYSUM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArraySum'>>, 'DATEADD': <function build_date_delta.<locals>._builder>, 'DATE_FORMAT': <function _build_date_format>, 'DATESUB': <function build_date_delta.<locals>._builder>, 'FORMATDATETIME': <function _build_date_format>, 'JSONEXTRACTSTRING': <function build_json_extract_path.<locals>._builder>, 'MATCH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.RegexpLike'>>, 'RANDCANONICAL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Rand'>>, 'TUPLE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Struct'>>, 'TIMESTAMPSUB': <function build_date_delta.<locals>._builder>, 'TIMESTAMPADD': <function build_date_delta.<locals>._builder>, 'UNIQ': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ApproxDistinct'>>, 'SHA256': <function ClickHouse.Parser.<lambda>>, 'SHA512': <function ClickHouse.Parser.<lambda>>}
AGG_FUNCTIONS = {'quantilesDeterministic', 'exponentialTimeDecayedAvg', 'groupArray', 'rankCorr', 'argMax', 'kurtSamp', 'mannWhitneyUTest', 'count', 'uniqHLL12', 'first_value', 'quantilesExactWeighted', 'boundingRatio', 'groupBitOr', 'groupArrayMovingSum', 'sumMap', 'covarPop', 'histogram', 'uniqExact', 'stddevSamp', 'quantileExactWeighted', 'quantileBFloat16Weighted', 'corr', 'median', 'contingency', 'groupArrayLast', 'quantileTimingWeighted', 'groupArrayMovingAvg', 'retention', 'studentTTest', 'quantilesExact', 'quantileTDigest', 'kolmogorovSmirnovTest', 'deltaSumTimestamp', 'anyLast', 'groupBitmapAnd', 'min', 'quantilesTDigestWeighted', 'quantilesTiming', 'groupArraySample', 'stddevPop', 'minMap', 'quantilesGK', 'quantilesBFloat16Weighted', 'quantilesBFloat16', 'cramersVBiasCorrected', 'intervalLengthSum', 'quantilesTimingWeighted', 'windowFunnel', 'categoricalInformationValue', 'quantileInterpolatedWeighted', 'quantilesInterpolatedWeighted', 'last_value', 'quantilesTDigest', 'sum', 'uniq', 'simpleLinearRegression', 'uniqCombined64', 'skewPop', 'maxIntersections', 'quantiles', 'quantileTDigestWeighted', 'quantileExactHigh', 'covarSamp', 'any', 'sumKahan', 'sequenceCount', 'uniqTheta', 'avg', 'quantilesExactLow', 'entropy', 'deltaSum', 'groupBitmapOr', 'skewSamp', 'quantile', 'groupUniqArray', 'meanZTest', 'quantileGK', 'max', 'groupBitmapXor', 'cramersV', 'quantilesExactHigh', 'sequenceNextNode', 'varSamp', 'avgWeighted', 'quantileExactLow', 'maxMap', 'topKWeighted', 'groupBitXor', 'quantileExact', 'groupArrayInsertAt', 'uniqCombined', 'groupBitAnd', 'exponentialMovingAverage', 'quantileBFloat16', 'quantileDeterministic', 'largestTriangleThreeBuckets', 'groupBitmap', 'varPop', 'sequenceMatch', 'argMin', 'sumCount', 'sparkBar', 'stochasticLinearRegression', 'stochasticLogisticRegression', 'kurtPop', 'quantileTiming', 'topK', 'sumWithOverflow', 'welchTTest', 'theilsU', 'maxIntersectionsPosition', 'anyHeavy', 'uniqUpTo'}
AGG_FUNCTIONS_SUFFIXES = ['If', 'Array', 'ArrayIf', 'Map', 'SimpleState', 'State', 'Merge', 'MergeState', 'ForEach', 'Distinct', 'OrDefault', 'OrNull', 'Resample', 'ArgMin', 'ArgMax']
FUNC_TOKENS = {<TokenType.REPLACE: 'REPLACE'>, <TokenType.TIMESTAMP: 'TIMESTAMP'>, <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, <TokenType.USERDEFINED: 'USERDEFINED'>, <TokenType.HSTORE: 'HSTORE'>, <TokenType.LEFT: 'LEFT'>, <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, <TokenType.VAR: 'VAR'>, <TokenType.TDIGEST: 'TDIGEST'>, <TokenType.IDENTIFIER: 'IDENTIFIER'>, <TokenType.WINDOW: 'WINDOW'>, <TokenType.INT: 'INT'>, <TokenType.MERGE: 'MERGE'>, <TokenType.ENUM: 'ENUM'>, <TokenType.TIMESTAMP_MS: 'TIMESTAMP_MS'>, <TokenType.DATETIME64: 'DATETIME64'>, <TokenType.DATETIME: 'DATETIME'>, <TokenType.JSON: 'JSON'>, <TokenType.NULL: 'NULL'>, <TokenType.ROW: 'ROW'>, <TokenType.UNIQUEIDENTIFIER: 'UNIQUEIDENTIFIER'>, <TokenType.NUMRANGE: 'NUMRANGE'>, <TokenType.TINYBLOB: 'TINYBLOB'>, <TokenType.INT128: 'INT128'>, <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, <TokenType.MONEY: 'MONEY'>, <TokenType.NVARCHAR: 'NVARCHAR'>, <TokenType.IPV4: 'IPV4'>, <TokenType.RANGE: 'RANGE'>, <TokenType.LIST: 'LIST'>, <TokenType.SUPER: 'SUPER'>, <TokenType.GLOB: 'GLOB'>, <TokenType.NCHAR: 'NCHAR'>, <TokenType.FLOAT: 'FLOAT'>, <TokenType.UUID: 'UUID'>, <TokenType.TEXT: 'TEXT'>, <TokenType.FORMAT: 'FORMAT'>, <TokenType.XOR: 'XOR'>, <TokenType.DATE: 'DATE'>, <TokenType.SMALLMONEY: 'SMALLMONEY'>, <TokenType.ALL: 'ALL'>, <TokenType.UNKNOWN: 'UNKNOWN'>, <TokenType.TIMESTAMP_S: 'TIMESTAMP_S'>, <TokenType.CHAR: 'CHAR'>, <TokenType.TINYTEXT: 'TINYTEXT'>, <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, <TokenType.DATERANGE: 'DATERANGE'>, <TokenType.TSTZRANGE: 'TSTZRANGE'>, <TokenType.GEOMETRY: 'GEOMETRY'>, <TokenType.NAME: 'NAME'>, <TokenType.MAP: 'MAP'>, <TokenType.BIT: 'BIT'>, <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, <TokenType.YEAR: 'YEAR'>, <TokenType.RLIKE: 'RLIKE'>, <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, <TokenType.CURRENT_DATETIME: 'CURRENT_DATETIME'>, <TokenType.CURRENT_USER: 'CURRENT_USER'>, <TokenType.INDEX: 'INDEX'>, <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, <TokenType.RIGHT: 'RIGHT'>, <TokenType.NESTED: 'NESTED'>, <TokenType.SMALLSERIAL: 'SMALLSERIAL'>, <TokenType.TINYINT: 'TINYINT'>, <TokenType.ANY: 'ANY'>, <TokenType.UINT: 'UINT'>, <TokenType.ILIKE: 'ILIKE'>, <TokenType.VARIANT: 'VARIANT'>, <TokenType.LONGBLOB: 'LONGBLOB'>, <TokenType.NULLABLE: 'NULLABLE'>, <TokenType.VARCHAR: 'VARCHAR'>, <TokenType.XML: 'XML'>, <TokenType.DECIMAL: 'DECIMAL'>, <TokenType.FIRST: 'FIRST'>, <TokenType.COLLATE: 'COLLATE'>, <TokenType.HLLSKETCH: 'HLLSKETCH'>, <TokenType.BPCHAR: 'BPCHAR'>, <TokenType.SEQUENCE: 'SEQUENCE'>, <TokenType.BINARY: 'BINARY'>, <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, <TokenType.LONGTEXT: 'LONGTEXT'>, <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, <TokenType.FILTER: 'FILTER'>, <TokenType.INT4RANGE: 'INT4RANGE'>, <TokenType.UDECIMAL: 'UDECIMAL'>, <TokenType.ROWVERSION: 'ROWVERSION'>, <TokenType.OBJECT_IDENTIFIER: 'OBJECT_IDENTIFIER'>, <TokenType.FIXEDSTRING: 'FIXEDSTRING'>, <TokenType.UBIGINT: 'UBIGINT'>, <TokenType.BIGINT: 'BIGINT'>, <TokenType.PRIMARY_KEY: 'PRIMARY_KEY'>, <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, <TokenType.UNNEST: 'UNNEST'>, <TokenType.DOUBLE: 'DOUBLE'>, <TokenType.JSONB: 'JSONB'>, <TokenType.INET: 'INET'>, <TokenType.COMMAND: 'COMMAND'>, <TokenType.SMALLINT: 'SMALLINT'>, <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, <TokenType.MEDIUMINT: 'MEDIUMINT'>, <TokenType.EXISTS: 'EXISTS'>, <TokenType.DATE32: 'DATE32'>, <TokenType.BOOLEAN: 'BOOLEAN'>, <TokenType.USMALLINT: 'USMALLINT'>, <TokenType.IPV6: 'IPV6'>, <TokenType.SET: 'SET'>, <TokenType.OFFSET: 'OFFSET'>, <TokenType.TIMESTAMP_NS: 'TIMESTAMP_NS'>, <TokenType.IPPREFIX: 'IPPREFIX'>, <TokenType.OBJECT: 'OBJECT'>, <TokenType.ENUM8: 'ENUM8'>, <TokenType.INT8RANGE: 'INT8RANGE'>, <TokenType.PSEUDO_TYPE: 'PSEUDO_TYPE'>, <TokenType.TSRANGE: 'TSRANGE'>, <TokenType.TIME: 'TIME'>, <TokenType.AGGREGATEFUNCTION: 'AGGREGATEFUNCTION'>, <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, <TokenType.LIKE: 'LIKE'>, <TokenType.TABLE: 'TABLE'>, <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, <TokenType.UTINYINT: 'UTINYINT'>, <TokenType.IMAGE: 'IMAGE'>, <TokenType.STRUCT: 'STRUCT'>, <TokenType.UMEDIUMINT: 'UMEDIUMINT'>, <TokenType.SERIAL: 'SERIAL'>, <TokenType.VARBINARY: 'VARBINARY'>, <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, <TokenType.SOME: 'SOME'>, <TokenType.ARRAY: 'ARRAY'>, <TokenType.ENUM16: 'ENUM16'>, <TokenType.UINT256: 'UINT256'>, <TokenType.TIMETZ: 'TIMETZ'>, <TokenType.IPADDRESS: 'IPADDRESS'>, <TokenType.BIGSERIAL: 'BIGSERIAL'>, <TokenType.INTERVAL: 'INTERVAL'>, <TokenType.TRUNCATE: 'TRUNCATE'>, <TokenType.SIMPLEAGGREGATEFUNCTION: 'SIMPLEAGGREGATEFUNCTION'>, <TokenType.LOWCARDINALITY: 'LOWCARDINALITY'>, <TokenType.INT256: 'INT256'>, <TokenType.UINT128: 'UINT128'>, <TokenType.ISNULL: 'ISNULL'>, <TokenType.INSERT: 'INSERT'>}
AGG_FUNC_MAPPING = {'quantilesDeterministicIf': ('quantilesDeterministic', 'If'), 'exponentialTimeDecayedAvgIf': ('exponentialTimeDecayedAvg', 'If'), 'groupArrayIf': ('groupArray', 'If'), 'rankCorrIf': ('rankCorr', 'If'), 'argMaxIf': ('argMax', 'If'), 'kurtSampIf': ('kurtSamp', 'If'), 'mannWhitneyUTestIf': ('mannWhitneyUTest', 'If'), 'countIf': ('count', 'If'), 'uniqHLL12If': ('uniqHLL12', 'If'), 'first_valueIf': ('first_value', 'If'), 'quantilesExactWeightedIf': ('quantilesExactWeighted', 'If'), 'boundingRatioIf': ('boundingRatio', 'If'), 'groupBitOrIf': ('groupBitOr', 'If'), 'groupArrayMovingSumIf': ('groupArrayMovingSum', 'If'), 'sumMapIf': ('sumMap', 'If'), 'covarPopIf': ('covarPop', 'If'), 'histogramIf': ('histogram', 'If'), 'uniqExactIf': ('uniqExact', 'If'), 'stddevSampIf': ('stddevSamp', 'If'), 'quantileExactWeightedIf': ('quantileExactWeighted', 'If'), 'quantileBFloat16WeightedIf': ('quantileBFloat16Weighted', 'If'), 'corrIf': ('corr', 'If'), 'medianIf': ('median', 'If'), 'contingencyIf': ('contingency', 'If'), 'groupArrayLastIf': ('groupArrayLast', 'If'), 'quantileTimingWeightedIf': ('quantileTimingWeighted', 'If'), 'groupArrayMovingAvgIf': ('groupArrayMovingAvg', 'If'), 'retentionIf': ('retention', 'If'), 'studentTTestIf': ('studentTTest', 'If'), 'quantilesExactIf': ('quantilesExact', 'If'), 'quantileTDigestIf': ('quantileTDigest', 'If'), 'kolmogorovSmirnovTestIf': ('kolmogorovSmirnovTest', 'If'), 'deltaSumTimestampIf': ('deltaSumTimestamp', 'If'), 'anyLastIf': ('anyLast', 'If'), 'groupBitmapAndIf': ('groupBitmapAnd', 'If'), 'minIf': ('min', 'If'), 'quantilesTDigestWeightedIf': ('quantilesTDigestWeighted', 'If'), 'quantilesTimingIf': ('quantilesTiming', 'If'), 'groupArraySampleIf': ('groupArraySample', 'If'), 'stddevPopIf': ('stddevPop', 'If'), 'minMapIf': ('minMap', 'If'), 'quantilesGKIf': ('quantilesGK', 'If'), 'quantilesBFloat16WeightedIf': ('quantilesBFloat16Weighted', 'If'), 'quantilesBFloat16If': ('quantilesBFloat16', 'If'), 'cramersVBiasCorrectedIf': ('cramersVBiasCorrected', 'If'), 'intervalLengthSumIf': ('intervalLengthSum', 'If'), 'quantilesTimingWeightedIf': ('quantilesTimingWeighted', 'If'), 'windowFunnelIf': ('windowFunnel', 'If'), 'categoricalInformationValueIf': ('categoricalInformationValue', 'If'), 'quantileInterpolatedWeightedIf': ('quantileInterpolatedWeighted', 'If'), 'quantilesInterpolatedWeightedIf': ('quantilesInterpolatedWeighted', 'If'), 'last_valueIf': ('last_value', 'If'), 'quantilesTDigestIf': ('quantilesTDigest', 'If'), 'sumIf': ('sum', 'If'), 'uniqIf': ('uniq', 'If'), 'simpleLinearRegressionIf': ('simpleLinearRegression', 'If'), 'uniqCombined64If': ('uniqCombined64', 'If'), 'skewPopIf': ('skewPop', 'If'), 'maxIntersectionsIf': ('maxIntersections', 'If'), 'quantilesIf': ('quantiles', 'If'), 'quantileTDigestWeightedIf': ('quantileTDigestWeighted', 'If'), 'quantileExactHighIf': ('quantileExactHigh', 'If'), 'covarSampIf': ('covarSamp', 'If'), 'anyIf': ('any', 'If'), 'sumKahanIf': ('sumKahan', 'If'), 'sequenceCountIf': ('sequenceCount', 'If'), 'uniqThetaIf': ('uniqTheta', 'If'), 'avgIf': ('avg', 'If'), 'quantilesExactLowIf': ('quantilesExactLow', 'If'), 'entropyIf': ('entropy', 'If'), 'deltaSumIf': ('deltaSum', 'If'), 'groupBitmapOrIf': ('groupBitmapOr', 'If'), 'skewSampIf': ('skewSamp', 'If'), 'quantileIf': ('quantile', 'If'), 'groupUniqArrayIf': ('groupUniqArray', 'If'), 'meanZTestIf': ('meanZTest', 'If'), 'quantileGKIf': ('quantileGK', 'If'), 'maxIf': ('max', 'If'), 'groupBitmapXorIf': ('groupBitmapXor', 'If'), 'cramersVIf': ('cramersV', 'If'), 'quantilesExactHighIf': ('quantilesExactHigh', 'If'), 'sequenceNextNodeIf': ('sequenceNextNode', 'If'), 'varSampIf': ('varSamp', 'If'), 'avgWeightedIf': ('avgWeighted', 'If'), 'quantileExactLowIf': ('quantileExactLow', 'If'), 'maxMapIf': ('maxMap', 'If'), 'topKWeightedIf': ('topKWeighted', 'If'), 'groupBitXorIf': ('groupBitXor', 'If'), 'quantileExactIf': ('quantileExact', 'If'), 'groupArrayInsertAtIf': ('groupArrayInsertAt', 'If'), 'uniqCombinedIf': ('uniqCombined', 'If'), 'groupBitAndIf': ('groupBitAnd', 'If'), 'exponentialMovingAverageIf': ('exponentialMovingAverage', 'If'), 'quantileBFloat16If': ('quantileBFloat16', 'If'), 'quantileDeterministicIf': ('quantileDeterministic', 'If'), 'largestTriangleThreeBucketsIf': ('largestTriangleThreeBuckets', 'If'), 'groupBitmapIf': ('groupBitmap', 'If'), 'varPopIf': ('varPop', 'If'), 'sequenceMatchIf': ('sequenceMatch', 'If'), 'argMinIf': ('argMin', 'If'), 'sumCountIf': ('sumCount', 'If'), 'sparkBarIf': ('sparkBar', 'If'), 'stochasticLinearRegressionIf': ('stochasticLinearRegression', 'If'), 'stochasticLogisticRegressionIf': ('stochasticLogisticRegression', 'If'), 'kurtPopIf': ('kurtPop', 'If'), 'quantileTimingIf': ('quantileTiming', 'If'), 'topKIf': ('topK', 'If'), 'sumWithOverflowIf': ('sumWithOverflow', 'If'), 'welchTTestIf': ('welchTTest', 'If'), 'theilsUIf': ('theilsU', 'If'), 'maxIntersectionsPositionIf': ('maxIntersectionsPosition', 'If'), 'anyHeavyIf': ('anyHeavy', 'If'), 'uniqUpToIf': ('uniqUpTo', 'If'), 'quantilesDeterministicArray': ('quantilesDeterministic', 'Array'), 'exponentialTimeDecayedAvgArray': ('exponentialTimeDecayedAvg', 'Array'), 'groupArrayArray': ('groupArray', 'Array'), 'rankCorrArray': ('rankCorr', 'Array'), 'argMaxArray': ('argMax', 'Array'), 'kurtSampArray': ('kurtSamp', 'Array'), 'mannWhitneyUTestArray': ('mannWhitneyUTest', 'Array'), 'countArray': ('count', 'Array'), 'uniqHLL12Array': ('uniqHLL12', 'Array'), 'first_valueArray': ('first_value', 'Array'), 'quantilesExactWeightedArray': ('quantilesExactWeighted', 'Array'), 'boundingRatioArray': ('boundingRatio', 'Array'), 'groupBitOrArray': ('groupBitOr', 'Array'), 'groupArrayMovingSumArray': ('groupArrayMovingSum', 'Array'), 'sumMapArray': ('sumMap', 'Array'), 'covarPopArray': ('covarPop', 'Array'), 'histogramArray': ('histogram', 'Array'), 'uniqExactArray': ('uniqExact', 'Array'), 'stddevSampArray': ('stddevSamp', 'Array'), 'quantileExactWeightedArray': ('quantileExactWeighted', 'Array'), 'quantileBFloat16WeightedArray': ('quantileBFloat16Weighted', 'Array'), 'corrArray': ('corr', 'Array'), 'medianArray': ('median', 'Array'), 'contingencyArray': ('contingency', 'Array'), 'groupArrayLastArray': ('groupArrayLast', 'Array'), 'quantileTimingWeightedArray': ('quantileTimingWeighted', 'Array'), 'groupArrayMovingAvgArray': ('groupArrayMovingAvg', 'Array'), 'retentionArray': ('retention', 'Array'), 'studentTTestArray': ('studentTTest', 'Array'), 'quantilesExactArray': ('quantilesExact', 'Array'), 'quantileTDigestArray': ('quantileTDigest', 'Array'), 'kolmogorovSmirnovTestArray': ('kolmogorovSmirnovTest', 'Array'), 'deltaSumTimestampArray': ('deltaSumTimestamp', 'Array'), 'anyLastArray': ('anyLast', 'Array'), 'groupBitmapAndArray': ('groupBitmapAnd', 'Array'), 'minArray': ('min', 'Array'), 'quantilesTDigestWeightedArray': ('quantilesTDigestWeighted', 'Array'), 'quantilesTimingArray': ('quantilesTiming', 'Array'), 'groupArraySampleArray': ('groupArraySample', 'Array'), 'stddevPopArray': ('stddevPop', 'Array'), 'minMapArray': ('minMap', 'Array'), 'quantilesGKArray': ('quantilesGK', 'Array'), 'quantilesBFloat16WeightedArray': ('quantilesBFloat16Weighted', 'Array'), 'quantilesBFloat16Array': ('quantilesBFloat16', 'Array'), 'cramersVBiasCorrectedArray': ('cramersVBiasCorrected', 'Array'), 'intervalLengthSumArray': ('intervalLengthSum', 'Array'), 'quantilesTimingWeightedArray': ('quantilesTimingWeighted', 'Array'), 'windowFunnelArray': ('windowFunnel', 'Array'), 'categoricalInformationValueArray': ('categoricalInformationValue', 'Array'), 'quantileInterpolatedWeightedArray': ('quantileInterpolatedWeighted', 'Array'), 'quantilesInterpolatedWeightedArray': ('quantilesInterpolatedWeighted', 'Array'), 'last_valueArray': ('last_value', 'Array'), 'quantilesTDigestArray': ('quantilesTDigest', 'Array'), 'sumArray': ('sum', 'Array'), 'uniqArray': ('uniq', 'Array'), 'simpleLinearRegressionArray': ('simpleLinearRegression', 'Array'), 'uniqCombined64Array': ('uniqCombined64', 'Array'), 'skewPopArray': ('skewPop', 'Array'), 'maxIntersectionsArray': ('maxIntersections', 'Array'), 'quantilesArray': ('quantiles', 'Array'), 'quantileTDigestWeightedArray': ('quantileTDigestWeighted', 'Array'), 'quantileExactHighArray': ('quantileExactHigh', 'Array'), 'covarSampArray': ('covarSamp', 'Array'), 'anyArray': ('any', 'Array'), 'sumKahanArray': ('sumKahan', 'Array'), 'sequenceCountArray': ('sequenceCount', 'Array'), 'uniqThetaArray': ('uniqTheta', 'Array'), 'avgArray': ('avg', 'Array'), 'quantilesExactLowArray': ('quantilesExactLow', 'Array'), 'entropyArray': ('entropy', 'Array'), 'deltaSumArray': ('deltaSum', 'Array'), 'groupBitmapOrArray': ('groupBitmapOr', 'Array'), 'skewSampArray': ('skewSamp', 'Array'), 'quantileArray': ('quantile', 'Array'), 'groupUniqArrayArray': ('groupUniqArray', 'Array'), 'meanZTestArray': ('meanZTest', 'Array'), 'quantileGKArray': ('quantileGK', 'Array'), 'maxArray': ('max', 'Array'), 'groupBitmapXorArray': ('groupBitmapXor', 'Array'), 'cramersVArray': ('cramersV', 'Array'), 'quantilesExactHighArray': ('quantilesExactHigh', 'Array'), 'sequenceNextNodeArray': ('sequenceNextNode', 'Array'), 'varSampArray': ('varSamp', 'Array'), 'avgWeightedArray': ('avgWeighted', 'Array'), 'quantileExactLowArray': ('quantileExactLow', 'Array'), 'maxMapArray': ('maxMap', 'Array'), 'topKWeightedArray': ('topKWeighted', 'Array'), 'groupBitXorArray': ('groupBitXor', 'Array'), 'quantileExactArray': ('quantileExact', 'Array'), 'groupArrayInsertAtArray': ('groupArrayInsertAt', 'Array'), 'uniqCombinedArray': ('uniqCombined', 'Array'), 'groupBitAndArray': ('groupBitAnd', 'Array'), 'exponentialMovingAverageArray': ('exponentialMovingAverage', 'Array'), 'quantileBFloat16Array': ('quantileBFloat16', 'Array'), 'quantileDeterministicArray': ('quantileDeterministic', 'Array'), 'largestTriangleThreeBucketsArray': ('largestTriangleThreeBuckets', 'Array'), 'groupBitmapArray': ('groupBitmap', 'Array'), 'varPopArray': ('varPop', 'Array'), 'sequenceMatchArray': ('sequenceMatch', 'Array'), 'argMinArray': ('argMin', 'Array'), 'sumCountArray': ('sumCount', 'Array'), 'sparkBarArray': ('sparkBar', 'Array'), 'stochasticLinearRegressionArray': ('stochasticLinearRegression', 'Array'), 'stochasticLogisticRegressionArray': ('stochasticLogisticRegression', 'Array'), 'kurtPopArray': ('kurtPop', 'Array'), 'quantileTimingArray': ('quantileTiming', 'Array'), 'topKArray': ('topK', 'Array'), 'sumWithOverflowArray': ('sumWithOverflow', 'Array'), 'welchTTestArray': ('welchTTest', 'Array'), 'theilsUArray': ('theilsU', 'Array'), 'maxIntersectionsPositionArray': ('maxIntersectionsPosition', 'Array'), 'anyHeavyArray': ('anyHeavy', 'Array'), 'uniqUpToArray': ('uniqUpTo', 'Array'), 'quantilesDeterministicArrayIf': ('quantilesDeterministic', 'ArrayIf'), 'exponentialTimeDecayedAvgArrayIf': ('exponentialTimeDecayedAvg', 'ArrayIf'), 'groupArrayArrayIf': ('groupArray', 'ArrayIf'), 'rankCorrArrayIf': ('rankCorr', 'ArrayIf'), 'argMaxArrayIf': ('argMax', 'ArrayIf'), 'kurtSampArrayIf': ('kurtSamp', 'ArrayIf'), 'mannWhitneyUTestArrayIf': ('mannWhitneyUTest', 'ArrayIf'), 'countArrayIf': ('count', 'ArrayIf'), 'uniqHLL12ArrayIf': ('uniqHLL12', 'ArrayIf'), 'first_valueArrayIf': ('first_value', 'ArrayIf'), 'quantilesExactWeightedArrayIf': ('quantilesExactWeighted', 'ArrayIf'), 'boundingRatioArrayIf': ('boundingRatio', 'ArrayIf'), 'groupBitOrArrayIf': ('groupBitOr', 'ArrayIf'), 'groupArrayMovingSumArrayIf': ('groupArrayMovingSum', 'ArrayIf'), 'sumMapArrayIf': ('sumMap', 'ArrayIf'), 'covarPopArrayIf': ('covarPop', 'ArrayIf'), 'histogramArrayIf': ('histogram', 'ArrayIf'), 'uniqExactArrayIf': ('uniqExact', 'ArrayIf'), 'stddevSampArrayIf': ('stddevSamp', 'ArrayIf'), 'quantileExactWeightedArrayIf': ('quantileExactWeighted', 'ArrayIf'), 'quantileBFloat16WeightedArrayIf': ('quantileBFloat16Weighted', 'ArrayIf'), 'corrArrayIf': ('corr', 'ArrayIf'), 'medianArrayIf': ('median', 'ArrayIf'), 'contingencyArrayIf': ('contingency', 'ArrayIf'), 'groupArrayLastArrayIf': ('groupArrayLast', 'ArrayIf'), 'quantileTimingWeightedArrayIf': ('quantileTimingWeighted', 'ArrayIf'), 'groupArrayMovingAvgArrayIf': ('groupArrayMovingAvg', 'ArrayIf'), 'retentionArrayIf': ('retention', 'ArrayIf'), 'studentTTestArrayIf': ('studentTTest', 'ArrayIf'), 'quantilesExactArrayIf': ('quantilesExact', 'ArrayIf'), 'quantileTDigestArrayIf': ('quantileTDigest', 'ArrayIf'), 'kolmogorovSmirnovTestArrayIf': ('kolmogorovSmirnovTest', 'ArrayIf'), 'deltaSumTimestampArrayIf': ('deltaSumTimestamp', 'ArrayIf'), 'anyLastArrayIf': ('anyLast', 'ArrayIf'), 'groupBitmapAndArrayIf': ('groupBitmapAnd', 'ArrayIf'), 'minArrayIf': ('min', 'ArrayIf'), 'quantilesTDigestWeightedArrayIf': ('quantilesTDigestWeighted', 'ArrayIf'), 'quantilesTimingArrayIf': ('quantilesTiming', 'ArrayIf'), 'groupArraySampleArrayIf': ('groupArraySample', 'ArrayIf'), 'stddevPopArrayIf': ('stddevPop', 'ArrayIf'), 'minMapArrayIf': ('minMap', 'ArrayIf'), 'quantilesGKArrayIf': ('quantilesGK', 'ArrayIf'), 'quantilesBFloat16WeightedArrayIf': ('quantilesBFloat16Weighted', 'ArrayIf'), 'quantilesBFloat16ArrayIf': ('quantilesBFloat16', 'ArrayIf'), 'cramersVBiasCorrectedArrayIf': ('cramersVBiasCorrected', 'ArrayIf'), 'intervalLengthSumArrayIf': ('intervalLengthSum', 'ArrayIf'), 'quantilesTimingWeightedArrayIf': ('quantilesTimingWeighted', 'ArrayIf'), 'windowFunnelArrayIf': ('windowFunnel', 'ArrayIf'), 'categoricalInformationValueArrayIf': ('categoricalInformationValue', 'ArrayIf'), 'quantileInterpolatedWeightedArrayIf': ('quantileInterpolatedWeighted', 'ArrayIf'), 'quantilesInterpolatedWeightedArrayIf': ('quantilesInterpolatedWeighted', 'ArrayIf'), 'last_valueArrayIf': ('last_value', 'ArrayIf'), 'quantilesTDigestArrayIf': ('quantilesTDigest', 'ArrayIf'), 'sumArrayIf': ('sum', 'ArrayIf'), 'uniqArrayIf': ('uniq', 'ArrayIf'), 'simpleLinearRegressionArrayIf': ('simpleLinearRegression', 'ArrayIf'), 'uniqCombined64ArrayIf': ('uniqCombined64', 'ArrayIf'), 'skewPopArrayIf': ('skewPop', 'ArrayIf'), 'maxIntersectionsArrayIf': ('maxIntersections', 'ArrayIf'), 'quantilesArrayIf': ('quantiles', 'ArrayIf'), 'quantileTDigestWeightedArrayIf': ('quantileTDigestWeighted', 'ArrayIf'), 'quantileExactHighArrayIf': ('quantileExactHigh', 'ArrayIf'), 'covarSampArrayIf': ('covarSamp', 'ArrayIf'), 'anyArrayIf': ('any', 'ArrayIf'), 'sumKahanArrayIf': ('sumKahan', 'ArrayIf'), 'sequenceCountArrayIf': ('sequenceCount', 'ArrayIf'), 'uniqThetaArrayIf': ('uniqTheta', 'ArrayIf'), 'avgArrayIf': ('avg', 'ArrayIf'), 'quantilesExactLowArrayIf': ('quantilesExactLow', 'ArrayIf'), 'entropyArrayIf': ('entropy', 'ArrayIf'), 'deltaSumArrayIf': ('deltaSum', 'ArrayIf'), 'groupBitmapOrArrayIf': ('groupBitmapOr', 'ArrayIf'), 'skewSampArrayIf': ('skewSamp', 'ArrayIf'), 'quantileArrayIf': ('quantile', 'ArrayIf'), 'groupUniqArrayArrayIf': ('groupUniqArray', 'ArrayIf'), 'meanZTestArrayIf': ('meanZTest', 'ArrayIf'), 'quantileGKArrayIf': ('quantileGK', 'ArrayIf'), 'maxArrayIf': ('max', 'ArrayIf'), 'groupBitmapXorArrayIf': ('groupBitmapXor', 'ArrayIf'), 'cramersVArrayIf': ('cramersV', 'ArrayIf'), 'quantilesExactHighArrayIf': ('quantilesExactHigh', 'ArrayIf'), 'sequenceNextNodeArrayIf': ('sequenceNextNode', 'ArrayIf'), 'varSampArrayIf': ('varSamp', 'ArrayIf'), 'avgWeightedArrayIf': ('avgWeighted', 'ArrayIf'), 'quantileExactLowArrayIf': ('quantileExactLow', 'ArrayIf'), 'maxMapArrayIf': ('maxMap', 'ArrayIf'), 'topKWeightedArrayIf': ('topKWeighted', 'ArrayIf'), 'groupBitXorArrayIf': ('groupBitXor', 'ArrayIf'), 'quantileExactArrayIf': ('quantileExact', 'ArrayIf'), 'groupArrayInsertAtArrayIf': ('groupArrayInsertAt', 'ArrayIf'), 'uniqCombinedArrayIf': ('uniqCombined', 'ArrayIf'), 'groupBitAndArrayIf': ('groupBitAnd', 'ArrayIf'), 'exponentialMovingAverageArrayIf': ('exponentialMovingAverage', 'ArrayIf'), 'quantileBFloat16ArrayIf': ('quantileBFloat16', 'ArrayIf'), 'quantileDeterministicArrayIf': ('quantileDeterministic', 'ArrayIf'), 'largestTriangleThreeBucketsArrayIf': ('largestTriangleThreeBuckets', 'ArrayIf'), 'groupBitmapArrayIf': ('groupBitmap', 'ArrayIf'), 'varPopArrayIf': ('varPop', 'ArrayIf'), 'sequenceMatchArrayIf': ('sequenceMatch', 'ArrayIf'), 'argMinArrayIf': ('argMin', 'ArrayIf'), 'sumCountArrayIf': ('sumCount', 'ArrayIf'), 'sparkBarArrayIf': ('sparkBar', 'ArrayIf'), 'stochasticLinearRegressionArrayIf': ('stochasticLinearRegression', 'ArrayIf'), 'stochasticLogisticRegressionArrayIf': ('stochasticLogisticRegression', 'ArrayIf'), 'kurtPopArrayIf': ('kurtPop', 'ArrayIf'), 'quantileTimingArrayIf': ('quantileTiming', 'ArrayIf'), 'topKArrayIf': ('topK', 'ArrayIf'), 'sumWithOverflowArrayIf': ('sumWithOverflow', 'ArrayIf'), 'welchTTestArrayIf': ('welchTTest', 'ArrayIf'), 'theilsUArrayIf': ('theilsU', 'ArrayIf'), 'maxIntersectionsPositionArrayIf': ('maxIntersectionsPosition', 'ArrayIf'), 'anyHeavyArrayIf': ('anyHeavy', 'ArrayIf'), 'uniqUpToArrayIf': ('uniqUpTo', 'ArrayIf'), 'quantilesDeterministicMap': ('quantilesDeterministic', 'Map'), 'exponentialTimeDecayedAvgMap': ('exponentialTimeDecayedAvg', 'Map'), 'groupArrayMap': ('groupArray', 'Map'), 'rankCorrMap': ('rankCorr', 'Map'), 'argMaxMap': ('argMax', 'Map'), 'kurtSampMap': ('kurtSamp', 'Map'), 'mannWhitneyUTestMap': ('mannWhitneyUTest', 'Map'), 'countMap': ('count', 'Map'), 'uniqHLL12Map': ('uniqHLL12', 'Map'), 'first_valueMap': ('first_value', 'Map'), 'quantilesExactWeightedMap': ('quantilesExactWeighted', 'Map'), 'boundingRatioMap': ('boundingRatio', 'Map'), 'groupBitOrMap': ('groupBitOr', 'Map'), 'groupArrayMovingSumMap': ('groupArrayMovingSum', 'Map'), 'sumMapMap': ('sumMap', 'Map'), 'covarPopMap': ('covarPop', 'Map'), 'histogramMap': ('histogram', 'Map'), 'uniqExactMap': ('uniqExact', 'Map'), 'stddevSampMap': ('stddevSamp', 'Map'), 'quantileExactWeightedMap': ('quantileExactWeighted', 'Map'), 'quantileBFloat16WeightedMap': ('quantileBFloat16Weighted', 'Map'), 'corrMap': ('corr', 'Map'), 'medianMap': ('median', 'Map'), 'contingencyMap': ('contingency', 'Map'), 'groupArrayLastMap': ('groupArrayLast', 'Map'), 'quantileTimingWeightedMap': ('quantileTimingWeighted', 'Map'), 'groupArrayMovingAvgMap': ('groupArrayMovingAvg', 'Map'), 'retentionMap': ('retention', 'Map'), 'studentTTestMap': ('studentTTest', 'Map'), 'quantilesExactMap': ('quantilesExact', 'Map'), 'quantileTDigestMap': ('quantileTDigest', 'Map'), 'kolmogorovSmirnovTestMap': ('kolmogorovSmirnovTest', 'Map'), 'deltaSumTimestampMap': ('deltaSumTimestamp', 'Map'), 'anyLastMap': ('anyLast', 'Map'), 'groupBitmapAndMap': ('groupBitmapAnd', 'Map'), 'minMap': ('minMap', ''), 'quantilesTDigestWeightedMap': ('quantilesTDigestWeighted', 'Map'), 'quantilesTimingMap': ('quantilesTiming', 'Map'), 'groupArraySampleMap': ('groupArraySample', 'Map'), 'stddevPopMap': ('stddevPop', 'Map'), 'minMapMap': ('minMap', 'Map'), 'quantilesGKMap': ('quantilesGK', 'Map'), 'quantilesBFloat16WeightedMap': ('quantilesBFloat16Weighted', 'Map'), 'quantilesBFloat16Map': ('quantilesBFloat16', 'Map'), 'cramersVBiasCorrectedMap': ('cramersVBiasCorrected', 'Map'), 'intervalLengthSumMap': ('intervalLengthSum', 'Map'), 'quantilesTimingWeightedMap': ('quantilesTimingWeighted', 'Map'), 'windowFunnelMap': ('windowFunnel', 'Map'), 'categoricalInformationValueMap': ('categoricalInformationValue', 'Map'), 'quantileInterpolatedWeightedMap': ('quantileInterpolatedWeighted', 'Map'), 'quantilesInterpolatedWeightedMap': ('quantilesInterpolatedWeighted', 'Map'), 'last_valueMap': ('last_value', 'Map'), 'quantilesTDigestMap': ('quantilesTDigest', 'Map'), 'sumMap': ('sumMap', ''), 'uniqMap': ('uniq', 'Map'), 'simpleLinearRegressionMap': ('simpleLinearRegression', 'Map'), 'uniqCombined64Map': ('uniqCombined64', 'Map'), 'skewPopMap': ('skewPop', 'Map'), 'maxIntersectionsMap': ('maxIntersections', 'Map'), 'quantilesMap': ('quantiles', 'Map'), 'quantileTDigestWeightedMap': ('quantileTDigestWeighted', 'Map'), 'quantileExactHighMap': ('quantileExactHigh', 'Map'), 'covarSampMap': ('covarSamp', 'Map'), 'anyMap': ('any', 'Map'), 'sumKahanMap': ('sumKahan', 'Map'), 'sequenceCountMap': ('sequenceCount', 'Map'), 'uniqThetaMap': ('uniqTheta', 'Map'), 'avgMap': ('avg', 'Map'), 'quantilesExactLowMap': ('quantilesExactLow', 'Map'), 'entropyMap': ('entropy', 'Map'), 'deltaSumMap': ('deltaSum', 'Map'), 'groupBitmapOrMap': ('groupBitmapOr', 'Map'), 'skewSampMap': ('skewSamp', 'Map'), 'quantileMap': ('quantile', 'Map'), 'groupUniqArrayMap': ('groupUniqArray', 'Map'), 'meanZTestMap': ('meanZTest', 'Map'), 'quantileGKMap': ('quantileGK', 'Map'), 'maxMap': ('maxMap', ''), 'groupBitmapXorMap': ('groupBitmapXor', 'Map'), 'cramersVMap': ('cramersV', 'Map'), 'quantilesExactHighMap': ('quantilesExactHigh', 'Map'), 'sequenceNextNodeMap': ('sequenceNextNode', 'Map'), 'varSampMap': ('varSamp', 'Map'), 'avgWeightedMap': ('avgWeighted', 'Map'), 'quantileExactLowMap': ('quantileExactLow', 'Map'), 'maxMapMap': ('maxMap', 'Map'), 'topKWeightedMap': ('topKWeighted', 'Map'), 'groupBitXorMap': ('groupBitXor', 'Map'), 'quantileExactMap': ('quantileExact', 'Map'), 'groupArrayInsertAtMap': ('groupArrayInsertAt', 'Map'), 'uniqCombinedMap': ('uniqCombined', 'Map'), 'groupBitAndMap': ('groupBitAnd', 'Map'), 'exponentialMovingAverageMap': ('exponentialMovingAverage', 'Map'), 'quantileBFloat16Map': ('quantileBFloat16', 'Map'), 'quantileDeterministicMap': ('quantileDeterministic', 'Map'), 'largestTriangleThreeBucketsMap': ('largestTriangleThreeBuckets', 'Map'), 'groupBitmapMap': ('groupBitmap', 'Map'), 'varPopMap': ('varPop', 'Map'), 'sequenceMatchMap': ('sequenceMatch', 'Map'), 'argMinMap': ('argMin', 'Map'), 'sumCountMap': ('sumCount', 'Map'), 'sparkBarMap': ('sparkBar', 'Map'), 'stochasticLinearRegressionMap': ('stochasticLinearRegression', 'Map'), 'stochasticLogisticRegressionMap': ('stochasticLogisticRegression', 'Map'), 'kurtPopMap': ('kurtPop', 'Map'), 'quantileTimingMap': ('quantileTiming', 'Map'), 'topKMap': ('topK', 'Map'), 'sumWithOverflowMap': ('sumWithOverflow', 'Map'), 'welchTTestMap': ('welchTTest', 'Map'), 'theilsUMap': ('theilsU', 'Map'), 'maxIntersectionsPositionMap': ('maxIntersectionsPosition', 'Map'), 'anyHeavyMap': ('anyHeavy', 'Map'), 'uniqUpToMap': ('uniqUpTo', 'Map'), 'quantilesDeterministicSimpleState': ('quantilesDeterministic', 'SimpleState'), 'exponentialTimeDecayedAvgSimpleState': ('exponentialTimeDecayedAvg', 'SimpleState'), 'groupArraySimpleState': ('groupArray', 'SimpleState'), 'rankCorrSimpleState': ('rankCorr', 'SimpleState'), 'argMaxSimpleState': ('argMax', 'SimpleState'), 'kurtSampSimpleState': ('kurtSamp', 'SimpleState'), 'mannWhitneyUTestSimpleState': ('mannWhitneyUTest', 'SimpleState'), 'countSimpleState': ('count', 'SimpleState'), 'uniqHLL12SimpleState': ('uniqHLL12', 'SimpleState'), 'first_valueSimpleState': ('first_value', 'SimpleState'), 'quantilesExactWeightedSimpleState': ('quantilesExactWeighted', 'SimpleState'), 'boundingRatioSimpleState': ('boundingRatio', 'SimpleState'), 'groupBitOrSimpleState': ('groupBitOr', 'SimpleState'), 'groupArrayMovingSumSimpleState': ('groupArrayMovingSum', 'SimpleState'), 'sumMapSimpleState': ('sumMap', 'SimpleState'), 'covarPopSimpleState': ('covarPop', 'SimpleState'), 'histogramSimpleState': ('histogram', 'SimpleState'), 'uniqExactSimpleState': ('uniqExact', 'SimpleState'), 'stddevSampSimpleState': ('stddevSamp', 'SimpleState'), 'quantileExactWeightedSimpleState': ('quantileExactWeighted', 'SimpleState'), 'quantileBFloat16WeightedSimpleState': ('quantileBFloat16Weighted', 'SimpleState'), 'corrSimpleState': ('corr', 'SimpleState'), 'medianSimpleState': ('median', 'SimpleState'), 'contingencySimpleState': ('contingency', 'SimpleState'), 'groupArrayLastSimpleState': ('groupArrayLast', 'SimpleState'), 'quantileTimingWeightedSimpleState': ('quantileTimingWeighted', 'SimpleState'), 'groupArrayMovingAvgSimpleState': ('groupArrayMovingAvg', 'SimpleState'), 'retentionSimpleState': ('retention', 'SimpleState'), 'studentTTestSimpleState': ('studentTTest', 'SimpleState'), 'quantilesExactSimpleState': ('quantilesExact', 'SimpleState'), 'quantileTDigestSimpleState': ('quantileTDigest', 'SimpleState'), 'kolmogorovSmirnovTestSimpleState': ('kolmogorovSmirnovTest', 'SimpleState'), 'deltaSumTimestampSimpleState': ('deltaSumTimestamp', 'SimpleState'), 'anyLastSimpleState': ('anyLast', 'SimpleState'), 'groupBitmapAndSimpleState': ('groupBitmapAnd', 'SimpleState'), 'minSimpleState': ('min', 'SimpleState'), 'quantilesTDigestWeightedSimpleState': ('quantilesTDigestWeighted', 'SimpleState'), 'quantilesTimingSimpleState': ('quantilesTiming', 'SimpleState'), 'groupArraySampleSimpleState': ('groupArraySample', 'SimpleState'), 'stddevPopSimpleState': ('stddevPop', 'SimpleState'), 'minMapSimpleState': ('minMap', 'SimpleState'), 'quantilesGKSimpleState': ('quantilesGK', 'SimpleState'), 'quantilesBFloat16WeightedSimpleState': ('quantilesBFloat16Weighted', 'SimpleState'), 'quantilesBFloat16SimpleState': ('quantilesBFloat16', 'SimpleState'), 'cramersVBiasCorrectedSimpleState': ('cramersVBiasCorrected', 'SimpleState'), 'intervalLengthSumSimpleState': ('intervalLengthSum', 'SimpleState'), 'quantilesTimingWeightedSimpleState': ('quantilesTimingWeighted', 'SimpleState'), 'windowFunnelSimpleState': ('windowFunnel', 'SimpleState'), 'categoricalInformationValueSimpleState': ('categoricalInformationValue', 'SimpleState'), 'quantileInterpolatedWeightedSimpleState': ('quantileInterpolatedWeighted', 'SimpleState'), 'quantilesInterpolatedWeightedSimpleState': ('quantilesInterpolatedWeighted', 'SimpleState'), 'last_valueSimpleState': ('last_value', 'SimpleState'), 'quantilesTDigestSimpleState': ('quantilesTDigest', 'SimpleState'), 'sumSimpleState': ('sum', 'SimpleState'), 'uniqSimpleState': ('uniq', 'SimpleState'), 'simpleLinearRegressionSimpleState': ('simpleLinearRegression', 'SimpleState'), 'uniqCombined64SimpleState': ('uniqCombined64', 'SimpleState'), 'skewPopSimpleState': ('skewPop', 'SimpleState'), 'maxIntersectionsSimpleState': ('maxIntersections', 'SimpleState'), 'quantilesSimpleState': ('quantiles', 'SimpleState'), 'quantileTDigestWeightedSimpleState': ('quantileTDigestWeighted', 'SimpleState'), 'quantileExactHighSimpleState': ('quantileExactHigh', 'SimpleState'), 'covarSampSimpleState': ('covarSamp', 'SimpleState'), 'anySimpleState': ('any', 'SimpleState'), 'sumKahanSimpleState': ('sumKahan', 'SimpleState'), 'sequenceCountSimpleState': ('sequenceCount', 'SimpleState'), 'uniqThetaSimpleState': ('uniqTheta', 'SimpleState'), 'avgSimpleState': ('avg', 'SimpleState'), 'quantilesExactLowSimpleState': ('quantilesExactLow', 'SimpleState'), 'entropySimpleState': ('entropy', 'SimpleState'), 'deltaSumSimpleState': ('deltaSum', 'SimpleState'), 'groupBitmapOrSimpleState': ('groupBitmapOr', 'SimpleState'), 'skewSampSimpleState': ('skewSamp', 'SimpleState'), 'quantileSimpleState': ('quantile', 'SimpleState'), 'groupUniqArraySimpleState': ('groupUniqArray', 'SimpleState'), 'meanZTestSimpleState': ('meanZTest', 'SimpleState'), 'quantileGKSimpleState': ('quantileGK', 'SimpleState'), 'maxSimpleState': ('max', 'SimpleState'), 'groupBitmapXorSimpleState': ('groupBitmapXor', 'SimpleState'), 'cramersVSimpleState': ('cramersV', 'SimpleState'), 'quantilesExactHighSimpleState': ('quantilesExactHigh', 'SimpleState'), 'sequenceNextNodeSimpleState': ('sequenceNextNode', 'SimpleState'), 'varSampSimpleState': ('varSamp', 'SimpleState'), 'avgWeightedSimpleState': ('avgWeighted', 'SimpleState'), 'quantileExactLowSimpleState': ('quantileExactLow', 'SimpleState'), 'maxMapSimpleState': ('maxMap', 'SimpleState'), 'topKWeightedSimpleState': ('topKWeighted', 'SimpleState'), 'groupBitXorSimpleState': ('groupBitXor', 'SimpleState'), 'quantileExactSimpleState': ('quantileExact', 'SimpleState'), 'groupArrayInsertAtSimpleState': ('groupArrayInsertAt', 'SimpleState'), 'uniqCombinedSimpleState': ('uniqCombined', 'SimpleState'), 'groupBitAndSimpleState': ('groupBitAnd', 'SimpleState'), 'exponentialMovingAverageSimpleState': ('exponentialMovingAverage', 'SimpleState'), 'quantileBFloat16SimpleState': ('quantileBFloat16', 'SimpleState'), 'quantileDeterministicSimpleState': ('quantileDeterministic', 'SimpleState'), 'largestTriangleThreeBucketsSimpleState': ('largestTriangleThreeBuckets', 'SimpleState'), 'groupBitmapSimpleState': ('groupBitmap', 'SimpleState'), 'varPopSimpleState': ('varPop', 'SimpleState'), 'sequenceMatchSimpleState': ('sequenceMatch', 'SimpleState'), 'argMinSimpleState': ('argMin', 'SimpleState'), 'sumCountSimpleState': ('sumCount', 'SimpleState'), 'sparkBarSimpleState': ('sparkBar', 'SimpleState'), 'stochasticLinearRegressionSimpleState': ('stochasticLinearRegression', 'SimpleState'), 'stochasticLogisticRegressionSimpleState': ('stochasticLogisticRegression', 'SimpleState'), 'kurtPopSimpleState': ('kurtPop', 'SimpleState'), 'quantileTimingSimpleState': ('quantileTiming', 'SimpleState'), 'topKSimpleState': ('topK', 'SimpleState'), 'sumWithOverflowSimpleState': ('sumWithOverflow', 'SimpleState'), 'welchTTestSimpleState': ('welchTTest', 'SimpleState'), 'theilsUSimpleState': ('theilsU', 'SimpleState'), 'maxIntersectionsPositionSimpleState': ('maxIntersectionsPosition', 'SimpleState'), 'anyHeavySimpleState': ('anyHeavy', 'SimpleState'), 'uniqUpToSimpleState': ('uniqUpTo', 'SimpleState'), 'quantilesDeterministicState': ('quantilesDeterministic', 'State'), 'exponentialTimeDecayedAvgState': ('exponentialTimeDecayedAvg', 'State'), 'groupArrayState': ('groupArray', 'State'), 'rankCorrState': ('rankCorr', 'State'), 'argMaxState': ('argMax', 'State'), 'kurtSampState': ('kurtSamp', 'State'), 'mannWhitneyUTestState': ('mannWhitneyUTest', 'State'), 'countState': ('count', 'State'), 'uniqHLL12State': ('uniqHLL12', 'State'), 'first_valueState': ('first_value', 'State'), 'quantilesExactWeightedState': ('quantilesExactWeighted', 'State'), 'boundingRatioState': ('boundingRatio', 'State'), 'groupBitOrState': ('groupBitOr', 'State'), 'groupArrayMovingSumState': ('groupArrayMovingSum', 'State'), 'sumMapState': ('sumMap', 'State'), 'covarPopState': ('covarPop', 'State'), 'histogramState': ('histogram', 'State'), 'uniqExactState': ('uniqExact', 'State'), 'stddevSampState': ('stddevSamp', 'State'), 'quantileExactWeightedState': ('quantileExactWeighted', 'State'), 'quantileBFloat16WeightedState': ('quantileBFloat16Weighted', 'State'), 'corrState': ('corr', 'State'), 'medianState': ('median', 'State'), 'contingencyState': ('contingency', 'State'), 'groupArrayLastState': ('groupArrayLast', 'State'), 'quantileTimingWeightedState': ('quantileTimingWeighted', 'State'), 'groupArrayMovingAvgState': ('groupArrayMovingAvg', 'State'), 'retentionState': ('retention', 'State'), 'studentTTestState': ('studentTTest', 'State'), 'quantilesExactState': ('quantilesExact', 'State'), 'quantileTDigestState': ('quantileTDigest', 'State'), 'kolmogorovSmirnovTestState': ('kolmogorovSmirnovTest', 'State'), 'deltaSumTimestampState': ('deltaSumTimestamp', 'State'), 'anyLastState': ('anyLast', 'State'), 'groupBitmapAndState': ('groupBitmapAnd', 'State'), 'minState': ('min', 'State'), 'quantilesTDigestWeightedState': ('quantilesTDigestWeighted', 'State'), 'quantilesTimingState': ('quantilesTiming', 'State'), 'groupArraySampleState': ('groupArraySample', 'State'), 'stddevPopState': ('stddevPop', 'State'), 'minMapState': ('minMap', 'State'), 'quantilesGKState': ('quantilesGK', 'State'), 'quantilesBFloat16WeightedState': ('quantilesBFloat16Weighted', 'State'), 'quantilesBFloat16State': ('quantilesBFloat16', 'State'), 'cramersVBiasCorrectedState': ('cramersVBiasCorrected', 'State'), 'intervalLengthSumState': ('intervalLengthSum', 'State'), 'quantilesTimingWeightedState': ('quantilesTimingWeighted', 'State'), 'windowFunnelState': ('windowFunnel', 'State'), 'categoricalInformationValueState': ('categoricalInformationValue', 'State'), 'quantileInterpolatedWeightedState': ('quantileInterpolatedWeighted', 'State'), 'quantilesInterpolatedWeightedState': ('quantilesInterpolatedWeighted', 'State'), 'last_valueState': ('last_value', 'State'), 'quantilesTDigestState': ('quantilesTDigest', 'State'), 'sumState': ('sum', 'State'), 'uniqState': ('uniq', 'State'), 'simpleLinearRegressionState': ('simpleLinearRegression', 'State'), 'uniqCombined64State': ('uniqCombined64', 'State'), 'skewPopState': ('skewPop', 'State'), 'maxIntersectionsState': ('maxIntersections', 'State'), 'quantilesState': ('quantiles', 'State'), 'quantileTDigestWeightedState': ('quantileTDigestWeighted', 'State'), 'quantileExactHighState': ('quantileExactHigh', 'State'), 'covarSampState': ('covarSamp', 'State'), 'anyState': ('any', 'State'), 'sumKahanState': ('sumKahan', 'State'), 'sequenceCountState': ('sequenceCount', 'State'), 'uniqThetaState': ('uniqTheta', 'State'), 'avgState': ('avg', 'State'), 'quantilesExactLowState': ('quantilesExactLow', 'State'), 'entropyState': ('entropy', 'State'), 'deltaSumState': ('deltaSum', 'State'), 'groupBitmapOrState': ('groupBitmapOr', 'State'), 'skewSampState': ('skewSamp', 'State'), 'quantileState': ('quantile', 'State'), 'groupUniqArrayState': ('groupUniqArray', 'State'), 'meanZTestState': ('meanZTest', 'State'), 'quantileGKState': ('quantileGK', 'State'), 'maxState': ('max', 'State'), 'groupBitmapXorState': ('groupBitmapXor', 'State'), 'cramersVState': ('cramersV', 'State'), 'quantilesExactHighState': ('quantilesExactHigh', 'State'), 'sequenceNextNodeState': ('sequenceNextNode', 'State'), 'varSampState': ('varSamp', 'State'), 'avgWeightedState': ('avgWeighted', 'State'), 'quantileExactLowState': ('quantileExactLow', 'State'), 'maxMapState': ('maxMap', 'State'), 'topKWeightedState': ('topKWeighted', 'State'), 'groupBitXorState': ('groupBitXor', 'State'), 'quantileExactState': ('quantileExact', 'State'), 'groupArrayInsertAtState': ('groupArrayInsertAt', 'State'), 'uniqCombinedState': ('uniqCombined', 'State'), 'groupBitAndState': ('groupBitAnd', 'State'), 'exponentialMovingAverageState': ('exponentialMovingAverage', 'State'), 'quantileBFloat16State': ('quantileBFloat16', 'State'), 'quantileDeterministicState': ('quantileDeterministic', 'State'), 'largestTriangleThreeBucketsState': ('largestTriangleThreeBuckets', 'State'), 'groupBitmapState': ('groupBitmap', 'State'), 'varPopState': ('varPop', 'State'), 'sequenceMatchState': ('sequenceMatch', 'State'), 'argMinState': ('argMin', 'State'), 'sumCountState': ('sumCount', 'State'), 'sparkBarState': ('sparkBar', 'State'), 'stochasticLinearRegressionState': ('stochasticLinearRegression', 'State'), 'stochasticLogisticRegressionState': ('stochasticLogisticRegression', 'State'), 'kurtPopState': ('kurtPop', 'State'), 'quantileTimingState': ('quantileTiming', 'State'), 'topKState': ('topK', 'State'), 'sumWithOverflowState': ('sumWithOverflow', 'State'), 'welchTTestState': ('welchTTest', 'State'), 'theilsUState': ('theilsU', 'State'), 'maxIntersectionsPositionState': ('maxIntersectionsPosition', 'State'), 'anyHeavyState': ('anyHeavy', 'State'), 'uniqUpToState': ('uniqUpTo', 'State'), 'quantilesDeterministicMerge': ('quantilesDeterministic', 'Merge'), 'exponentialTimeDecayedAvgMerge': ('exponentialTimeDecayedAvg', 'Merge'), 'groupArrayMerge': ('groupArray', 'Merge'), 'rankCorrMerge': ('rankCorr', 'Merge'), 'argMaxMerge': ('argMax', 'Merge'), 'kurtSampMerge': ('kurtSamp', 'Merge'), 'mannWhitneyUTestMerge': ('mannWhitneyUTest', 'Merge'), 'countMerge': ('count', 'Merge'), 'uniqHLL12Merge': ('uniqHLL12', 'Merge'), 'first_valueMerge': ('first_value', 'Merge'), 'quantilesExactWeightedMerge': ('quantilesExactWeighted', 'Merge'), 'boundingRatioMerge': ('boundingRatio', 'Merge'), 'groupBitOrMerge': ('groupBitOr', 'Merge'), 'groupArrayMovingSumMerge': ('groupArrayMovingSum', 'Merge'), 'sumMapMerge': ('sumMap', 'Merge'), 'covarPopMerge': ('covarPop', 'Merge'), 'histogramMerge': ('histogram', 'Merge'), 'uniqExactMerge': ('uniqExact', 'Merge'), 'stddevSampMerge': ('stddevSamp', 'Merge'), 'quantileExactWeightedMerge': ('quantileExactWeighted', 'Merge'), 'quantileBFloat16WeightedMerge': ('quantileBFloat16Weighted', 'Merge'), 'corrMerge': ('corr', 'Merge'), 'medianMerge': ('median', 'Merge'), 'contingencyMerge': ('contingency', 'Merge'), 'groupArrayLastMerge': ('groupArrayLast', 'Merge'), 'quantileTimingWeightedMerge': ('quantileTimingWeighted', 'Merge'), 'groupArrayMovingAvgMerge': ('groupArrayMovingAvg', 'Merge'), 'retentionMerge': ('retention', 'Merge'), 'studentTTestMerge': ('studentTTest', 'Merge'), 'quantilesExactMerge': ('quantilesExact', 'Merge'), 'quantileTDigestMerge': ('quantileTDigest', 'Merge'), 'kolmogorovSmirnovTestMerge': ('kolmogorovSmirnovTest', 'Merge'), 'deltaSumTimestampMerge': ('deltaSumTimestamp', 'Merge'), 'anyLastMerge': ('anyLast', 'Merge'), 'groupBitmapAndMerge': ('groupBitmapAnd', 'Merge'), 'minMerge': ('min', 'Merge'), 'quantilesTDigestWeightedMerge': ('quantilesTDigestWeighted', 'Merge'), 'quantilesTimingMerge': ('quantilesTiming', 'Merge'), 'groupArraySampleMerge': ('groupArraySample', 'Merge'), 'stddevPopMerge': ('stddevPop', 'Merge'), 'minMapMerge': ('minMap', 'Merge'), 'quantilesGKMerge': ('quantilesGK', 'Merge'), 'quantilesBFloat16WeightedMerge': ('quantilesBFloat16Weighted', 'Merge'), 'quantilesBFloat16Merge': ('quantilesBFloat16', 'Merge'), 'cramersVBiasCorrectedMerge': ('cramersVBiasCorrected', 'Merge'), 'intervalLengthSumMerge': ('intervalLengthSum', 'Merge'), 'quantilesTimingWeightedMerge': ('quantilesTimingWeighted', 'Merge'), 'windowFunnelMerge': ('windowFunnel', 'Merge'), 'categoricalInformationValueMerge': ('categoricalInformationValue', 'Merge'), 'quantileInterpolatedWeightedMerge': ('quantileInterpolatedWeighted', 'Merge'), 'quantilesInterpolatedWeightedMerge': ('quantilesInterpolatedWeighted', 'Merge'), 'last_valueMerge': ('last_value', 'Merge'), 'quantilesTDigestMerge': ('quantilesTDigest', 'Merge'), 'sumMerge': ('sum', 'Merge'), 'uniqMerge': ('uniq', 'Merge'), 'simpleLinearRegressionMerge': ('simpleLinearRegression', 'Merge'), 'uniqCombined64Merge': ('uniqCombined64', 'Merge'), 'skewPopMerge': ('skewPop', 'Merge'), 'maxIntersectionsMerge': ('maxIntersections', 'Merge'), 'quantilesMerge': ('quantiles', 'Merge'), 'quantileTDigestWeightedMerge': ('quantileTDigestWeighted', 'Merge'), 'quantileExactHighMerge': ('quantileExactHigh', 'Merge'), 'covarSampMerge': ('covarSamp', 'Merge'), 'anyMerge': ('any', 'Merge'), 'sumKahanMerge': ('sumKahan', 'Merge'), 'sequenceCountMerge': ('sequenceCount', 'Merge'), 'uniqThetaMerge': ('uniqTheta', 'Merge'), 'avgMerge': ('avg', 'Merge'), 'quantilesExactLowMerge': ('quantilesExactLow', 'Merge'), 'entropyMerge': ('entropy', 'Merge'), 'deltaSumMerge': ('deltaSum', 'Merge'), 'groupBitmapOrMerge': ('groupBitmapOr', 'Merge'), 'skewSampMerge': ('skewSamp', 'Merge'), 'quantileMerge': ('quantile', 'Merge'), 'groupUniqArrayMerge': ('groupUniqArray', 'Merge'), 'meanZTestMerge': ('meanZTest', 'Merge'), 'quantileGKMerge': ('quantileGK', 'Merge'), 'maxMerge': ('max', 'Merge'), 'groupBitmapXorMerge': ('groupBitmapXor', 'Merge'), 'cramersVMerge': ('cramersV', 'Merge'), 'quantilesExactHighMerge': ('quantilesExactHigh', 'Merge'), 'sequenceNextNodeMerge': ('sequenceNextNode', 'Merge'), 'varSampMerge': ('varSamp', 'Merge'), 'avgWeightedMerge': ('avgWeighted', 'Merge'), 'quantileExactLowMerge': ('quantileExactLow', 'Merge'), 'maxMapMerge': ('maxMap', 'Merge'), 'topKWeightedMerge': ('topKWeighted', 'Merge'), 'groupBitXorMerge': ('groupBitXor', 'Merge'), 'quantileExactMerge': ('quantileExact', 'Merge'), 'groupArrayInsertAtMerge': ('groupArrayInsertAt', 'Merge'), 'uniqCombinedMerge': ('uniqCombined', 'Merge'), 'groupBitAndMerge': ('groupBitAnd', 'Merge'), 'exponentialMovingAverageMerge': ('exponentialMovingAverage', 'Merge'), 'quantileBFloat16Merge': ('quantileBFloat16', 'Merge'), 'quantileDeterministicMerge': ('quantileDeterministic', 'Merge'), 'largestTriangleThreeBucketsMerge': ('largestTriangleThreeBuckets', 'Merge'), 'groupBitmapMerge': ('groupBitmap', 'Merge'), 'varPopMerge': ('varPop', 'Merge'), 'sequenceMatchMerge': ('sequenceMatch', 'Merge'), 'argMinMerge': ('argMin', 'Merge'), 'sumCountMerge': ('sumCount', 'Merge'), 'sparkBarMerge': ('sparkBar', 'Merge'), 'stochasticLinearRegressionMerge': ('stochasticLinearRegression', 'Merge'), 'stochasticLogisticRegressionMerge': ('stochasticLogisticRegression', 'Merge'), 'kurtPopMerge': ('kurtPop', 'Merge'), 'quantileTimingMerge': ('quantileTiming', 'Merge'), 'topKMerge': ('topK', 'Merge'), 'sumWithOverflowMerge': ('sumWithOverflow', 'Merge'), 'welchTTestMerge': ('welchTTest', 'Merge'), 'theilsUMerge': ('theilsU', 'Merge'), 'maxIntersectionsPositionMerge': ('maxIntersectionsPosition', 'Merge'), 'anyHeavyMerge': ('anyHeavy', 'Merge'), 'uniqUpToMerge': ('uniqUpTo', 'Merge'), 'quantilesDeterministicMergeState': ('quantilesDeterministic', 'MergeState'), 'exponentialTimeDecayedAvgMergeState': ('exponentialTimeDecayedAvg', 'MergeState'), 'groupArrayMergeState': ('groupArray', 'MergeState'), 'rankCorrMergeState': ('rankCorr', 'MergeState'), 'argMaxMergeState': ('argMax', 'MergeState'), 'kurtSampMergeState': ('kurtSamp', 'MergeState'), 'mannWhitneyUTestMergeState': ('mannWhitneyUTest', 'MergeState'), 'countMergeState': ('count', 'MergeState'), 'uniqHLL12MergeState': ('uniqHLL12', 'MergeState'), 'first_valueMergeState': ('first_value', 'MergeState'), 'quantilesExactWeightedMergeState': ('quantilesExactWeighted', 'MergeState'), 'boundingRatioMergeState': ('boundingRatio', 'MergeState'), 'groupBitOrMergeState': ('groupBitOr', 'MergeState'), 'groupArrayMovingSumMergeState': ('groupArrayMovingSum', 'MergeState'), 'sumMapMergeState': ('sumMap', 'MergeState'), 'covarPopMergeState': ('covarPop', 'MergeState'), 'histogramMergeState': ('histogram', 'MergeState'), 'uniqExactMergeState': ('uniqExact', 'MergeState'), 'stddevSampMergeState': ('stddevSamp', 'MergeState'), 'quantileExactWeightedMergeState': ('quantileExactWeighted', 'MergeState'), 'quantileBFloat16WeightedMergeState': ('quantileBFloat16Weighted', 'MergeState'), 'corrMergeState': ('corr', 'MergeState'), 'medianMergeState': ('median', 'MergeState'), 'contingencyMergeState': ('contingency', 'MergeState'), 'groupArrayLastMergeState': ('groupArrayLast', 'MergeState'), 'quantileTimingWeightedMergeState': ('quantileTimingWeighted', 'MergeState'), 'groupArrayMovingAvgMergeState': ('groupArrayMovingAvg', 'MergeState'), 'retentionMergeState': ('retention', 'MergeState'), 'studentTTestMergeState': ('studentTTest', 'MergeState'), 'quantilesExactMergeState': ('quantilesExact', 'MergeState'), 'quantileTDigestMergeState': ('quantileTDigest', 'MergeState'), 'kolmogorovSmirnovTestMergeState': ('kolmogorovSmirnovTest', 'MergeState'), 'deltaSumTimestampMergeState': ('deltaSumTimestamp', 'MergeState'), 'anyLastMergeState': ('anyLast', 'MergeState'), 'groupBitmapAndMergeState': ('groupBitmapAnd', 'MergeState'), 'minMergeState': ('min', 'MergeState'), 'quantilesTDigestWeightedMergeState': ('quantilesTDigestWeighted', 'MergeState'), 'quantilesTimingMergeState': ('quantilesTiming', 'MergeState'), 'groupArraySampleMergeState': ('groupArraySample', 'MergeState'), 'stddevPopMergeState': ('stddevPop', 'MergeState'), 'minMapMergeState': ('minMap', 'MergeState'), 'quantilesGKMergeState': ('quantilesGK', 'MergeState'), 'quantilesBFloat16WeightedMergeState': ('quantilesBFloat16Weighted', 'MergeState'), 'quantilesBFloat16MergeState': ('quantilesBFloat16', 'MergeState'), 'cramersVBiasCorrectedMergeState': ('cramersVBiasCorrected', 'MergeState'), 'intervalLengthSumMergeState': ('intervalLengthSum', 'MergeState'), 'quantilesTimingWeightedMergeState': ('quantilesTimingWeighted', 'MergeState'), 'windowFunnelMergeState': ('windowFunnel', 'MergeState'), 'categoricalInformationValueMergeState': ('categoricalInformationValue', 'MergeState'), 'quantileInterpolatedWeightedMergeState': ('quantileInterpolatedWeighted', 'MergeState'), 'quantilesInterpolatedWeightedMergeState': ('quantilesInterpolatedWeighted', 'MergeState'), 'last_valueMergeState': ('last_value', 'MergeState'), 'quantilesTDigestMergeState': ('quantilesTDigest', 'MergeState'), 'sumMergeState': ('sum', 'MergeState'), 'uniqMergeState': ('uniq', 'MergeState'), 'simpleLinearRegressionMergeState': ('simpleLinearRegression', 'MergeState'), 'uniqCombined64MergeState': ('uniqCombined64', 'MergeState'), 'skewPopMergeState': ('skewPop', 'MergeState'), 'maxIntersectionsMergeState': ('maxIntersections', 'MergeState'), 'quantilesMergeState': ('quantiles', 'MergeState'), 'quantileTDigestWeightedMergeState': ('quantileTDigestWeighted', 'MergeState'), 'quantileExactHighMergeState': ('quantileExactHigh', 'MergeState'), 'covarSampMergeState': ('covarSamp', 'MergeState'), 'anyMergeState': ('any', 'MergeState'), 'sumKahanMergeState': ('sumKahan', 'MergeState'), 'sequenceCountMergeState': ('sequenceCount', 'MergeState'), 'uniqThetaMergeState': ('uniqTheta', 'MergeState'), 'avgMergeState': ('avg', 'MergeState'), 'quantilesExactLowMergeState': ('quantilesExactLow', 'MergeState'), 'entropyMergeState': ('entropy', 'MergeState'), 'deltaSumMergeState': ('deltaSum', 'MergeState'), 'groupBitmapOrMergeState': ('groupBitmapOr', 'MergeState'), 'skewSampMergeState': ('skewSamp', 'MergeState'), 'quantileMergeState': ('quantile', 'MergeState'), 'groupUniqArrayMergeState': ('groupUniqArray', 'MergeState'), 'meanZTestMergeState': ('meanZTest', 'MergeState'), 'quantileGKMergeState': ('quantileGK', 'MergeState'), 'maxMergeState': ('max', 'MergeState'), 'groupBitmapXorMergeState': ('groupBitmapXor', 'MergeState'), 'cramersVMergeState': ('cramersV', 'MergeState'), 'quantilesExactHighMergeState': ('quantilesExactHigh', 'MergeState'), 'sequenceNextNodeMergeState': ('sequenceNextNode', 'MergeState'), 'varSampMergeState': ('varSamp', 'MergeState'), 'avgWeightedMergeState': ('avgWeighted', 'MergeState'), 'quantileExactLowMergeState': ('quantileExactLow', 'MergeState'), 'maxMapMergeState': ('maxMap', 'MergeState'), 'topKWeightedMergeState': ('topKWeighted', 'MergeState'), 'groupBitXorMergeState': ('groupBitXor', 'MergeState'), 'quantileExactMergeState': ('quantileExact', 'MergeState'), 'groupArrayInsertAtMergeState': ('groupArrayInsertAt', 'MergeState'), 'uniqCombinedMergeState': ('uniqCombined', 'MergeState'), 'groupBitAndMergeState': ('groupBitAnd', 'MergeState'), 'exponentialMovingAverageMergeState': ('exponentialMovingAverage', 'MergeState'), 'quantileBFloat16MergeState': ('quantileBFloat16', 'MergeState'), 'quantileDeterministicMergeState': ('quantileDeterministic', 'MergeState'), 'largestTriangleThreeBucketsMergeState': ('largestTriangleThreeBuckets', 'MergeState'), 'groupBitmapMergeState': ('groupBitmap', 'MergeState'), 'varPopMergeState': ('varPop', 'MergeState'), 'sequenceMatchMergeState': ('sequenceMatch', 'MergeState'), 'argMinMergeState': ('argMin', 'MergeState'), 'sumCountMergeState': ('sumCount', 'MergeState'), 'sparkBarMergeState': ('sparkBar', 'MergeState'), 'stochasticLinearRegressionMergeState': ('stochasticLinearRegression', 'MergeState'), 'stochasticLogisticRegressionMergeState': ('stochasticLogisticRegression', 'MergeState'), 'kurtPopMergeState': ('kurtPop', 'MergeState'), 'quantileTimingMergeState': ('quantileTiming', 'MergeState'), 'topKMergeState': ('topK', 'MergeState'), 'sumWithOverflowMergeState': ('sumWithOverflow', 'MergeState'), 'welchTTestMergeState': ('welchTTest', 'MergeState'), 'theilsUMergeState': ('theilsU', 'MergeState'), 'maxIntersectionsPositionMergeState': ('maxIntersectionsPosition', 'MergeState'), 'anyHeavyMergeState': ('anyHeavy', 'MergeState'), 'uniqUpToMergeState': ('uniqUpTo', 'MergeState'), 'quantilesDeterministicForEach': ('quantilesDeterministic', 'ForEach'), 'exponentialTimeDecayedAvgForEach': ('exponentialTimeDecayedAvg', 'ForEach'), 'groupArrayForEach': ('groupArray', 'ForEach'), 'rankCorrForEach': ('rankCorr', 'ForEach'), 'argMaxForEach': ('argMax', 'ForEach'), 'kurtSampForEach': ('kurtSamp', 'ForEach'), 'mannWhitneyUTestForEach': ('mannWhitneyUTest', 'ForEach'), 'countForEach': ('count', 'ForEach'), 'uniqHLL12ForEach': ('uniqHLL12', 'ForEach'), 'first_valueForEach': ('first_value', 'ForEach'), 'quantilesExactWeightedForEach': ('quantilesExactWeighted', 'ForEach'), 'boundingRatioForEach': ('boundingRatio', 'ForEach'), 'groupBitOrForEach': ('groupBitOr', 'ForEach'), 'groupArrayMovingSumForEach': ('groupArrayMovingSum', 'ForEach'), 'sumMapForEach': ('sumMap', 'ForEach'), 'covarPopForEach': ('covarPop', 'ForEach'), 'histogramForEach': ('histogram', 'ForEach'), 'uniqExactForEach': ('uniqExact', 'ForEach'), 'stddevSampForEach': ('stddevSamp', 'ForEach'), 'quantileExactWeightedForEach': ('quantileExactWeighted', 'ForEach'), 'quantileBFloat16WeightedForEach': ('quantileBFloat16Weighted', 'ForEach'), 'corrForEach': ('corr', 'ForEach'), 'medianForEach': ('median', 'ForEach'), 'contingencyForEach': ('contingency', 'ForEach'), 'groupArrayLastForEach': ('groupArrayLast', 'ForEach'), 'quantileTimingWeightedForEach': ('quantileTimingWeighted', 'ForEach'), 'groupArrayMovingAvgForEach': ('groupArrayMovingAvg', 'ForEach'), 'retentionForEach': ('retention', 'ForEach'), 'studentTTestForEach': ('studentTTest', 'ForEach'), 'quantilesExactForEach': ('quantilesExact', 'ForEach'), 'quantileTDigestForEach': ('quantileTDigest', 'ForEach'), 'kolmogorovSmirnovTestForEach': ('kolmogorovSmirnovTest', 'ForEach'), 'deltaSumTimestampForEach': ('deltaSumTimestamp', 'ForEach'), 'anyLastForEach': ('anyLast', 'ForEach'), 'groupBitmapAndForEach': ('groupBitmapAnd', 'ForEach'), 'minForEach': ('min', 'ForEach'), 'quantilesTDigestWeightedForEach': ('quantilesTDigestWeighted', 'ForEach'), 'quantilesTimingForEach': ('quantilesTiming', 'ForEach'), 'groupArraySampleForEach': ('groupArraySample', 'ForEach'), 'stddevPopForEach': ('stddevPop', 'ForEach'), 'minMapForEach': ('minMap', 'ForEach'), 'quantilesGKForEach': ('quantilesGK', 'ForEach'), 'quantilesBFloat16WeightedForEach': ('quantilesBFloat16Weighted', 'ForEach'), 'quantilesBFloat16ForEach': ('quantilesBFloat16', 'ForEach'), 'cramersVBiasCorrectedForEach': ('cramersVBiasCorrected', 'ForEach'), 'intervalLengthSumForEach': ('intervalLengthSum', 'ForEach'), 'quantilesTimingWeightedForEach': ('quantilesTimingWeighted', 'ForEach'), 'windowFunnelForEach': ('windowFunnel', 'ForEach'), 'categoricalInformationValueForEach': ('categoricalInformationValue', 'ForEach'), 'quantileInterpolatedWeightedForEach': ('quantileInterpolatedWeighted', 'ForEach'), 'quantilesInterpolatedWeightedForEach': ('quantilesInterpolatedWeighted', 'ForEach'), 'last_valueForEach': ('last_value', 'ForEach'), 'quantilesTDigestForEach': ('quantilesTDigest', 'ForEach'), 'sumForEach': ('sum', 'ForEach'), 'uniqForEach': ('uniq', 'ForEach'), 'simpleLinearRegressionForEach': ('simpleLinearRegression', 'ForEach'), 'uniqCombined64ForEach': ('uniqCombined64', 'ForEach'), 'skewPopForEach': ('skewPop', 'ForEach'), 'maxIntersectionsForEach': ('maxIntersections', 'ForEach'), 'quantilesForEach': ('quantiles', 'ForEach'), 'quantileTDigestWeightedForEach': ('quantileTDigestWeighted', 'ForEach'), 'quantileExactHighForEach': ('quantileExactHigh', 'ForEach'), 'covarSampForEach': ('covarSamp', 'ForEach'), 'anyForEach': ('any', 'ForEach'), 'sumKahanForEach': ('sumKahan', 'ForEach'), 'sequenceCountForEach': ('sequenceCount', 'ForEach'), 'uniqThetaForEach': ('uniqTheta', 'ForEach'), 'avgForEach': ('avg', 'ForEach'), 'quantilesExactLowForEach': ('quantilesExactLow', 'ForEach'), 'entropyForEach': ('entropy', 'ForEach'), 'deltaSumForEach': ('deltaSum', 'ForEach'), 'groupBitmapOrForEach': ('groupBitmapOr', 'ForEach'), 'skewSampForEach': ('skewSamp', 'ForEach'), 'quantileForEach': ('quantile', 'ForEach'), 'groupUniqArrayForEach': ('groupUniqArray', 'ForEach'), 'meanZTestForEach': ('meanZTest', 'ForEach'), 'quantileGKForEach': ('quantileGK', 'ForEach'), 'maxForEach': ('max', 'ForEach'), 'groupBitmapXorForEach': ('groupBitmapXor', 'ForEach'), 'cramersVForEach': ('cramersV', 'ForEach'), 'quantilesExactHighForEach': ('quantilesExactHigh', 'ForEach'), 'sequenceNextNodeForEach': ('sequenceNextNode', 'ForEach'), 'varSampForEach': ('varSamp', 'ForEach'), 'avgWeightedForEach': ('avgWeighted', 'ForEach'), 'quantileExactLowForEach': ('quantileExactLow', 'ForEach'), 'maxMapForEach': ('maxMap', 'ForEach'), 'topKWeightedForEach': ('topKWeighted', 'ForEach'), 'groupBitXorForEach': ('groupBitXor', 'ForEach'), 'quantileExactForEach': ('quantileExact', 'ForEach'), 'groupArrayInsertAtForEach': ('groupArrayInsertAt', 'ForEach'), 'uniqCombinedForEach': ('uniqCombined', 'ForEach'), 'groupBitAndForEach': ('groupBitAnd', 'ForEach'), 'exponentialMovingAverageForEach': ('exponentialMovingAverage', 'ForEach'), 'quantileBFloat16ForEach': ('quantileBFloat16', 'ForEach'), 'quantileDeterministicForEach': ('quantileDeterministic', 'ForEach'), 'largestTriangleThreeBucketsForEach': ('largestTriangleThreeBuckets', 'ForEach'), 'groupBitmapForEach': ('groupBitmap', 'ForEach'), 'varPopForEach': ('varPop', 'ForEach'), 'sequenceMatchForEach': ('sequenceMatch', 'ForEach'), 'argMinForEach': ('argMin', 'ForEach'), 'sumCountForEach': ('sumCount', 'ForEach'), 'sparkBarForEach': ('sparkBar', 'ForEach'), 'stochasticLinearRegressionForEach': ('stochasticLinearRegression', 'ForEach'), 'stochasticLogisticRegressionForEach': ('stochasticLogisticRegression', 'ForEach'), 'kurtPopForEach': ('kurtPop', 'ForEach'), 'quantileTimingForEach': ('quantileTiming', 'ForEach'), 'topKForEach': ('topK', 'ForEach'), 'sumWithOverflowForEach': ('sumWithOverflow', 'ForEach'), 'welchTTestForEach': ('welchTTest', 'ForEach'), 'theilsUForEach': ('theilsU', 'ForEach'), 'maxIntersectionsPositionForEach': ('maxIntersectionsPosition', 'ForEach'), 'anyHeavyForEach': ('anyHeavy', 'ForEach'), 'uniqUpToForEach': ('uniqUpTo', 'ForEach'), 'quantilesDeterministicDistinct': ('quantilesDeterministic', 'Distinct'), 'exponentialTimeDecayedAvgDistinct': ('exponentialTimeDecayedAvg', 'Distinct'), 'groupArrayDistinct': ('groupArray', 'Distinct'), 'rankCorrDistinct': ('rankCorr', 'Distinct'), 'argMaxDistinct': ('argMax', 'Distinct'), 'kurtSampDistinct': ('kurtSamp', 'Distinct'), 'mannWhitneyUTestDistinct': ('mannWhitneyUTest', 'Distinct'), 'countDistinct': ('count', 'Distinct'), 'uniqHLL12Distinct': ('uniqHLL12', 'Distinct'), 'first_valueDistinct': ('first_value', 'Distinct'), 'quantilesExactWeightedDistinct': ('quantilesExactWeighted', 'Distinct'), 'boundingRatioDistinct': ('boundingRatio', 'Distinct'), 'groupBitOrDistinct': ('groupBitOr', 'Distinct'), 'groupArrayMovingSumDistinct': ('groupArrayMovingSum', 'Distinct'), 'sumMapDistinct': ('sumMap', 'Distinct'), 'covarPopDistinct': ('covarPop', 'Distinct'), 'histogramDistinct': ('histogram', 'Distinct'), 'uniqExactDistinct': ('uniqExact', 'Distinct'), 'stddevSampDistinct': ('stddevSamp', 'Distinct'), 'quantileExactWeightedDistinct': ('quantileExactWeighted', 'Distinct'), 'quantileBFloat16WeightedDistinct': ('quantileBFloat16Weighted', 'Distinct'), 'corrDistinct': ('corr', 'Distinct'), 'medianDistinct': ('median', 'Distinct'), 'contingencyDistinct': ('contingency', 'Distinct'), 'groupArrayLastDistinct': ('groupArrayLast', 'Distinct'), 'quantileTimingWeightedDistinct': ('quantileTimingWeighted', 'Distinct'), 'groupArrayMovingAvgDistinct': ('groupArrayMovingAvg', 'Distinct'), 'retentionDistinct': ('retention', 'Distinct'), 'studentTTestDistinct': ('studentTTest', 'Distinct'), 'quantilesExactDistinct': ('quantilesExact', 'Distinct'), 'quantileTDigestDistinct': ('quantileTDigest', 'Distinct'), 'kolmogorovSmirnovTestDistinct': ('kolmogorovSmirnovTest', 'Distinct'), 'deltaSumTimestampDistinct': ('deltaSumTimestamp', 'Distinct'), 'anyLastDistinct': ('anyLast', 'Distinct'), 'groupBitmapAndDistinct': ('groupBitmapAnd', 'Distinct'), 'minDistinct': ('min', 'Distinct'), 'quantilesTDigestWeightedDistinct': ('quantilesTDigestWeighted', 'Distinct'), 'quantilesTimingDistinct': ('quantilesTiming', 'Distinct'), 'groupArraySampleDistinct': ('groupArraySample', 'Distinct'), 'stddevPopDistinct': ('stddevPop', 'Distinct'), 'minMapDistinct': ('minMap', 'Distinct'), 'quantilesGKDistinct': ('quantilesGK', 'Distinct'), 'quantilesBFloat16WeightedDistinct': ('quantilesBFloat16Weighted', 'Distinct'), 'quantilesBFloat16Distinct': ('quantilesBFloat16', 'Distinct'), 'cramersVBiasCorrectedDistinct': ('cramersVBiasCorrected', 'Distinct'), 'intervalLengthSumDistinct': ('intervalLengthSum', 'Distinct'), 'quantilesTimingWeightedDistinct': ('quantilesTimingWeighted', 'Distinct'), 'windowFunnelDistinct': ('windowFunnel', 'Distinct'), 'categoricalInformationValueDistinct': ('categoricalInformationValue', 'Distinct'), 'quantileInterpolatedWeightedDistinct': ('quantileInterpolatedWeighted', 'Distinct'), 'quantilesInterpolatedWeightedDistinct': ('quantilesInterpolatedWeighted', 'Distinct'), 'last_valueDistinct': ('last_value', 'Distinct'), 'quantilesTDigestDistinct': ('quantilesTDigest', 'Distinct'), 'sumDistinct': ('sum', 'Distinct'), 'uniqDistinct': ('uniq', 'Distinct'), 'simpleLinearRegressionDistinct': ('simpleLinearRegression', 'Distinct'), 'uniqCombined64Distinct': ('uniqCombined64', 'Distinct'), 'skewPopDistinct': ('skewPop', 'Distinct'), 'maxIntersectionsDistinct': ('maxIntersections', 'Distinct'), 'quantilesDistinct': ('quantiles', 'Distinct'), 'quantileTDigestWeightedDistinct': ('quantileTDigestWeighted', 'Distinct'), 'quantileExactHighDistinct': ('quantileExactHigh', 'Distinct'), 'covarSampDistinct': ('covarSamp', 'Distinct'), 'anyDistinct': ('any', 'Distinct'), 'sumKahanDistinct': ('sumKahan', 'Distinct'), 'sequenceCountDistinct': ('sequenceCount', 'Distinct'), 'uniqThetaDistinct': ('uniqTheta', 'Distinct'), 'avgDistinct': ('avg', 'Distinct'), 'quantilesExactLowDistinct': ('quantilesExactLow', 'Distinct'), 'entropyDistinct': ('entropy', 'Distinct'), 'deltaSumDistinct': ('deltaSum', 'Distinct'), 'groupBitmapOrDistinct': ('groupBitmapOr', 'Distinct'), 'skewSampDistinct': ('skewSamp', 'Distinct'), 'quantileDistinct': ('quantile', 'Distinct'), 'groupUniqArrayDistinct': ('groupUniqArray', 'Distinct'), 'meanZTestDistinct': ('meanZTest', 'Distinct'), 'quantileGKDistinct': ('quantileGK', 'Distinct'), 'maxDistinct': ('max', 'Distinct'), 'groupBitmapXorDistinct': ('groupBitmapXor', 'Distinct'), 'cramersVDistinct': ('cramersV', 'Distinct'), 'quantilesExactHighDistinct': ('quantilesExactHigh', 'Distinct'), 'sequenceNextNodeDistinct': ('sequenceNextNode', 'Distinct'), 'varSampDistinct': ('varSamp', 'Distinct'), 'avgWeightedDistinct': ('avgWeighted', 'Distinct'), 'quantileExactLowDistinct': ('quantileExactLow', 'Distinct'), 'maxMapDistinct': ('maxMap', 'Distinct'), 'topKWeightedDistinct': ('topKWeighted', 'Distinct'), 'groupBitXorDistinct': ('groupBitXor', 'Distinct'), 'quantileExactDistinct': ('quantileExact', 'Distinct'), 'groupArrayInsertAtDistinct': ('groupArrayInsertAt', 'Distinct'), 'uniqCombinedDistinct': ('uniqCombined', 'Distinct'), 'groupBitAndDistinct': ('groupBitAnd', 'Distinct'), 'exponentialMovingAverageDistinct': ('exponentialMovingAverage', 'Distinct'), 'quantileBFloat16Distinct': ('quantileBFloat16', 'Distinct'), 'quantileDeterministicDistinct': ('quantileDeterministic', 'Distinct'), 'largestTriangleThreeBucketsDistinct': ('largestTriangleThreeBuckets', 'Distinct'), 'groupBitmapDistinct': ('groupBitmap', 'Distinct'), 'varPopDistinct': ('varPop', 'Distinct'), 'sequenceMatchDistinct': ('sequenceMatch', 'Distinct'), 'argMinDistinct': ('argMin', 'Distinct'), 'sumCountDistinct': ('sumCount', 'Distinct'), 'sparkBarDistinct': ('sparkBar', 'Distinct'), 'stochasticLinearRegressionDistinct': ('stochasticLinearRegression', 'Distinct'), 'stochasticLogisticRegressionDistinct': ('stochasticLogisticRegression', 'Distinct'), 'kurtPopDistinct': ('kurtPop', 'Distinct'), 'quantileTimingDistinct': ('quantileTiming', 'Distinct'), 'topKDistinct': ('topK', 'Distinct'), 'sumWithOverflowDistinct': ('sumWithOverflow', 'Distinct'), 'welchTTestDistinct': ('welchTTest', 'Distinct'), 'theilsUDistinct': ('theilsU', 'Distinct'), 'maxIntersectionsPositionDistinct': ('maxIntersectionsPosition', 'Distinct'), 'anyHeavyDistinct': ('anyHeavy', 'Distinct'), 'uniqUpToDistinct': ('uniqUpTo', 'Distinct'), 'quantilesDeterministicOrDefault': ('quantilesDeterministic', 'OrDefault'), 'exponentialTimeDecayedAvgOrDefault': ('exponentialTimeDecayedAvg', 'OrDefault'), 'groupArrayOrDefault': ('groupArray', 'OrDefault'), 'rankCorrOrDefault': ('rankCorr', 'OrDefault'), 'argMaxOrDefault': ('argMax', 'OrDefault'), 'kurtSampOrDefault': ('kurtSamp', 'OrDefault'), 'mannWhitneyUTestOrDefault': ('mannWhitneyUTest', 'OrDefault'), 'countOrDefault': ('count', 'OrDefault'), 'uniqHLL12OrDefault': ('uniqHLL12', 'OrDefault'), 'first_valueOrDefault': ('first_value', 'OrDefault'), 'quantilesExactWeightedOrDefault': ('quantilesExactWeighted', 'OrDefault'), 'boundingRatioOrDefault': ('boundingRatio', 'OrDefault'), 'groupBitOrOrDefault': ('groupBitOr', 'OrDefault'), 'groupArrayMovingSumOrDefault': ('groupArrayMovingSum', 'OrDefault'), 'sumMapOrDefault': ('sumMap', 'OrDefault'), 'covarPopOrDefault': ('covarPop', 'OrDefault'), 'histogramOrDefault': ('histogram', 'OrDefault'), 'uniqExactOrDefault': ('uniqExact', 'OrDefault'), 'stddevSampOrDefault': ('stddevSamp', 'OrDefault'), 'quantileExactWeightedOrDefault': ('quantileExactWeighted', 'OrDefault'), 'quantileBFloat16WeightedOrDefault': ('quantileBFloat16Weighted', 'OrDefault'), 'corrOrDefault': ('corr', 'OrDefault'), 'medianOrDefault': ('median', 'OrDefault'), 'contingencyOrDefault': ('contingency', 'OrDefault'), 'groupArrayLastOrDefault': ('groupArrayLast', 'OrDefault'), 'quantileTimingWeightedOrDefault': ('quantileTimingWeighted', 'OrDefault'), 'groupArrayMovingAvgOrDefault': ('groupArrayMovingAvg', 'OrDefault'), 'retentionOrDefault': ('retention', 'OrDefault'), 'studentTTestOrDefault': ('studentTTest', 'OrDefault'), 'quantilesExactOrDefault': ('quantilesExact', 'OrDefault'), 'quantileTDigestOrDefault': ('quantileTDigest', 'OrDefault'), 'kolmogorovSmirnovTestOrDefault': ('kolmogorovSmirnovTest', 'OrDefault'), 'deltaSumTimestampOrDefault': ('deltaSumTimestamp', 'OrDefault'), 'anyLastOrDefault': ('anyLast', 'OrDefault'), 'groupBitmapAndOrDefault': ('groupBitmapAnd', 'OrDefault'), 'minOrDefault': ('min', 'OrDefault'), 'quantilesTDigestWeightedOrDefault': ('quantilesTDigestWeighted', 'OrDefault'), 'quantilesTimingOrDefault': ('quantilesTiming', 'OrDefault'), 'groupArraySampleOrDefault': ('groupArraySample', 'OrDefault'), 'stddevPopOrDefault': ('stddevPop', 'OrDefault'), 'minMapOrDefault': ('minMap', 'OrDefault'), 'quantilesGKOrDefault': ('quantilesGK', 'OrDefault'), 'quantilesBFloat16WeightedOrDefault': ('quantilesBFloat16Weighted', 'OrDefault'), 'quantilesBFloat16OrDefault': ('quantilesBFloat16', 'OrDefault'), 'cramersVBiasCorrectedOrDefault': ('cramersVBiasCorrected', 'OrDefault'), 'intervalLengthSumOrDefault': ('intervalLengthSum', 'OrDefault'), 'quantilesTimingWeightedOrDefault': ('quantilesTimingWeighted', 'OrDefault'), 'windowFunnelOrDefault': ('windowFunnel', 'OrDefault'), 'categoricalInformationValueOrDefault': ('categoricalInformationValue', 'OrDefault'), 'quantileInterpolatedWeightedOrDefault': ('quantileInterpolatedWeighted', 'OrDefault'), 'quantilesInterpolatedWeightedOrDefault': ('quantilesInterpolatedWeighted', 'OrDefault'), 'last_valueOrDefault': ('last_value', 'OrDefault'), 'quantilesTDigestOrDefault': ('quantilesTDigest', 'OrDefault'), 'sumOrDefault': ('sum', 'OrDefault'), 'uniqOrDefault': ('uniq', 'OrDefault'), 'simpleLinearRegressionOrDefault': ('simpleLinearRegression', 'OrDefault'), 'uniqCombined64OrDefault': ('uniqCombined64', 'OrDefault'), 'skewPopOrDefault': ('skewPop', 'OrDefault'), 'maxIntersectionsOrDefault': ('maxIntersections', 'OrDefault'), 'quantilesOrDefault': ('quantiles', 'OrDefault'), 'quantileTDigestWeightedOrDefault': ('quantileTDigestWeighted', 'OrDefault'), 'quantileExactHighOrDefault': ('quantileExactHigh', 'OrDefault'), 'covarSampOrDefault': ('covarSamp', 'OrDefault'), 'anyOrDefault': ('any', 'OrDefault'), 'sumKahanOrDefault': ('sumKahan', 'OrDefault'), 'sequenceCountOrDefault': ('sequenceCount', 'OrDefault'), 'uniqThetaOrDefault': ('uniqTheta', 'OrDefault'), 'avgOrDefault': ('avg', 'OrDefault'), 'quantilesExactLowOrDefault': ('quantilesExactLow', 'OrDefault'), 'entropyOrDefault': ('entropy', 'OrDefault'), 'deltaSumOrDefault': ('deltaSum', 'OrDefault'), 'groupBitmapOrOrDefault': ('groupBitmapOr', 'OrDefault'), 'skewSampOrDefault': ('skewSamp', 'OrDefault'), 'quantileOrDefault': ('quantile', 'OrDefault'), 'groupUniqArrayOrDefault': ('groupUniqArray', 'OrDefault'), 'meanZTestOrDefault': ('meanZTest', 'OrDefault'), 'quantileGKOrDefault': ('quantileGK', 'OrDefault'), 'maxOrDefault': ('max', 'OrDefault'), 'groupBitmapXorOrDefault': ('groupBitmapXor', 'OrDefault'), 'cramersVOrDefault': ('cramersV', 'OrDefault'), 'quantilesExactHighOrDefault': ('quantilesExactHigh', 'OrDefault'), 'sequenceNextNodeOrDefault': ('sequenceNextNode', 'OrDefault'), 'varSampOrDefault': ('varSamp', 'OrDefault'), 'avgWeightedOrDefault': ('avgWeighted', 'OrDefault'), 'quantileExactLowOrDefault': ('quantileExactLow', 'OrDefault'), 'maxMapOrDefault': ('maxMap', 'OrDefault'), 'topKWeightedOrDefault': ('topKWeighted', 'OrDefault'), 'groupBitXorOrDefault': ('groupBitXor', 'OrDefault'), 'quantileExactOrDefault': ('quantileExact', 'OrDefault'), 'groupArrayInsertAtOrDefault': ('groupArrayInsertAt', 'OrDefault'), 'uniqCombinedOrDefault': ('uniqCombined', 'OrDefault'), 'groupBitAndOrDefault': ('groupBitAnd', 'OrDefault'), 'exponentialMovingAverageOrDefault': ('exponentialMovingAverage', 'OrDefault'), 'quantileBFloat16OrDefault': ('quantileBFloat16', 'OrDefault'), 'quantileDeterministicOrDefault': ('quantileDeterministic', 'OrDefault'), 'largestTriangleThreeBucketsOrDefault': ('largestTriangleThreeBuckets', 'OrDefault'), 'groupBitmapOrDefault': ('groupBitmap', 'OrDefault'), 'varPopOrDefault': ('varPop', 'OrDefault'), 'sequenceMatchOrDefault': ('sequenceMatch', 'OrDefault'), 'argMinOrDefault': ('argMin', 'OrDefault'), 'sumCountOrDefault': ('sumCount', 'OrDefault'), 'sparkBarOrDefault': ('sparkBar', 'OrDefault'), 'stochasticLinearRegressionOrDefault': ('stochasticLinearRegression', 'OrDefault'), 'stochasticLogisticRegressionOrDefault': ('stochasticLogisticRegression', 'OrDefault'), 'kurtPopOrDefault': ('kurtPop', 'OrDefault'), 'quantileTimingOrDefault': ('quantileTiming', 'OrDefault'), 'topKOrDefault': ('topK', 'OrDefault'), 'sumWithOverflowOrDefault': ('sumWithOverflow', 'OrDefault'), 'welchTTestOrDefault': ('welchTTest', 'OrDefault'), 'theilsUOrDefault': ('theilsU', 'OrDefault'), 'maxIntersectionsPositionOrDefault': ('maxIntersectionsPosition', 'OrDefault'), 'anyHeavyOrDefault': ('anyHeavy', 'OrDefault'), 'uniqUpToOrDefault': ('uniqUpTo', 'OrDefault'), 'quantilesDeterministicOrNull': ('quantilesDeterministic', 'OrNull'), 'exponentialTimeDecayedAvgOrNull': ('exponentialTimeDecayedAvg', 'OrNull'), 'groupArrayOrNull': ('groupArray', 'OrNull'), 'rankCorrOrNull': ('rankCorr', 'OrNull'), 'argMaxOrNull': ('argMax', 'OrNull'), 'kurtSampOrNull': ('kurtSamp', 'OrNull'), 'mannWhitneyUTestOrNull': ('mannWhitneyUTest', 'OrNull'), 'countOrNull': ('count', 'OrNull'), 'uniqHLL12OrNull': ('uniqHLL12', 'OrNull'), 'first_valueOrNull': ('first_value', 'OrNull'), 'quantilesExactWeightedOrNull': ('quantilesExactWeighted', 'OrNull'), 'boundingRatioOrNull': ('boundingRatio', 'OrNull'), 'groupBitOrOrNull': ('groupBitOr', 'OrNull'), 'groupArrayMovingSumOrNull': ('groupArrayMovingSum', 'OrNull'), 'sumMapOrNull': ('sumMap', 'OrNull'), 'covarPopOrNull': ('covarPop', 'OrNull'), 'histogramOrNull': ('histogram', 'OrNull'), 'uniqExactOrNull': ('uniqExact', 'OrNull'), 'stddevSampOrNull': ('stddevSamp', 'OrNull'), 'quantileExactWeightedOrNull': ('quantileExactWeighted', 'OrNull'), 'quantileBFloat16WeightedOrNull': ('quantileBFloat16Weighted', 'OrNull'), 'corrOrNull': ('corr', 'OrNull'), 'medianOrNull': ('median', 'OrNull'), 'contingencyOrNull': ('contingency', 'OrNull'), 'groupArrayLastOrNull': ('groupArrayLast', 'OrNull'), 'quantileTimingWeightedOrNull': ('quantileTimingWeighted', 'OrNull'), 'groupArrayMovingAvgOrNull': ('groupArrayMovingAvg', 'OrNull'), 'retentionOrNull': ('retention', 'OrNull'), 'studentTTestOrNull': ('studentTTest', 'OrNull'), 'quantilesExactOrNull': ('quantilesExact', 'OrNull'), 'quantileTDigestOrNull': ('quantileTDigest', 'OrNull'), 'kolmogorovSmirnovTestOrNull': ('kolmogorovSmirnovTest', 'OrNull'), 'deltaSumTimestampOrNull': ('deltaSumTimestamp', 'OrNull'), 'anyLastOrNull': ('anyLast', 'OrNull'), 'groupBitmapAndOrNull': ('groupBitmapAnd', 'OrNull'), 'minOrNull': ('min', 'OrNull'), 'quantilesTDigestWeightedOrNull': ('quantilesTDigestWeighted', 'OrNull'), 'quantilesTimingOrNull': ('quantilesTiming', 'OrNull'), 'groupArraySampleOrNull': ('groupArraySample', 'OrNull'), 'stddevPopOrNull': ('stddevPop', 'OrNull'), 'minMapOrNull': ('minMap', 'OrNull'), 'quantilesGKOrNull': ('quantilesGK', 'OrNull'), 'quantilesBFloat16WeightedOrNull': ('quantilesBFloat16Weighted', 'OrNull'), 'quantilesBFloat16OrNull': ('quantilesBFloat16', 'OrNull'), 'cramersVBiasCorrectedOrNull': ('cramersVBiasCorrected', 'OrNull'), 'intervalLengthSumOrNull': ('intervalLengthSum', 'OrNull'), 'quantilesTimingWeightedOrNull': ('quantilesTimingWeighted', 'OrNull'), 'windowFunnelOrNull': ('windowFunnel', 'OrNull'), 'categoricalInformationValueOrNull': ('categoricalInformationValue', 'OrNull'), 'quantileInterpolatedWeightedOrNull': ('quantileInterpolatedWeighted', 'OrNull'), 'quantilesInterpolatedWeightedOrNull': ('quantilesInterpolatedWeighted', 'OrNull'), 'last_valueOrNull': ('last_value', 'OrNull'), 'quantilesTDigestOrNull': ('quantilesTDigest', 'OrNull'), 'sumOrNull': ('sum', 'OrNull'), 'uniqOrNull': ('uniq', 'OrNull'), 'simpleLinearRegressionOrNull': ('simpleLinearRegression', 'OrNull'), 'uniqCombined64OrNull': ('uniqCombined64', 'OrNull'), 'skewPopOrNull': ('skewPop', 'OrNull'), 'maxIntersectionsOrNull': ('maxIntersections', 'OrNull'), 'quantilesOrNull': ('quantiles', 'OrNull'), 'quantileTDigestWeightedOrNull': ('quantileTDigestWeighted', 'OrNull'), 'quantileExactHighOrNull': ('quantileExactHigh', 'OrNull'), 'covarSampOrNull': ('covarSamp', 'OrNull'), 'anyOrNull': ('any', 'OrNull'), 'sumKahanOrNull': ('sumKahan', 'OrNull'), 'sequenceCountOrNull': ('sequenceCount', 'OrNull'), 'uniqThetaOrNull': ('uniqTheta', 'OrNull'), 'avgOrNull': ('avg', 'OrNull'), 'quantilesExactLowOrNull': ('quantilesExactLow', 'OrNull'), 'entropyOrNull': ('entropy', 'OrNull'), 'deltaSumOrNull': ('deltaSum', 'OrNull'), 'groupBitmapOrOrNull': ('groupBitmapOr', 'OrNull'), 'skewSampOrNull': ('skewSamp', 'OrNull'), 'quantileOrNull': ('quantile', 'OrNull'), 'groupUniqArrayOrNull': ('groupUniqArray', 'OrNull'), 'meanZTestOrNull': ('meanZTest', 'OrNull'), 'quantileGKOrNull': ('quantileGK', 'OrNull'), 'maxOrNull': ('max', 'OrNull'), 'groupBitmapXorOrNull': ('groupBitmapXor', 'OrNull'), 'cramersVOrNull': ('cramersV', 'OrNull'), 'quantilesExactHighOrNull': ('quantilesExactHigh', 'OrNull'), 'sequenceNextNodeOrNull': ('sequenceNextNode', 'OrNull'), 'varSampOrNull': ('varSamp', 'OrNull'), 'avgWeightedOrNull': ('avgWeighted', 'OrNull'), 'quantileExactLowOrNull': ('quantileExactLow', 'OrNull'), 'maxMapOrNull': ('maxMap', 'OrNull'), 'topKWeightedOrNull': ('topKWeighted', 'OrNull'), 'groupBitXorOrNull': ('groupBitXor', 'OrNull'), 'quantileExactOrNull': ('quantileExact', 'OrNull'), 'groupArrayInsertAtOrNull': ('groupArrayInsertAt', 'OrNull'), 'uniqCombinedOrNull': ('uniqCombined', 'OrNull'), 'groupBitAndOrNull': ('groupBitAnd', 'OrNull'), 'exponentialMovingAverageOrNull': ('exponentialMovingAverage', 'OrNull'), 'quantileBFloat16OrNull': ('quantileBFloat16', 'OrNull'), 'quantileDeterministicOrNull': ('quantileDeterministic', 'OrNull'), 'largestTriangleThreeBucketsOrNull': ('largestTriangleThreeBuckets', 'OrNull'), 'groupBitmapOrNull': ('groupBitmap', 'OrNull'), 'varPopOrNull': ('varPop', 'OrNull'), 'sequenceMatchOrNull': ('sequenceMatch', 'OrNull'), 'argMinOrNull': ('argMin', 'OrNull'), 'sumCountOrNull': ('sumCount', 'OrNull'), 'sparkBarOrNull': ('sparkBar', 'OrNull'), 'stochasticLinearRegressionOrNull': ('stochasticLinearRegression', 'OrNull'), 'stochasticLogisticRegressionOrNull': ('stochasticLogisticRegression', 'OrNull'), 'kurtPopOrNull': ('kurtPop', 'OrNull'), 'quantileTimingOrNull': ('quantileTiming', 'OrNull'), 'topKOrNull': ('topK', 'OrNull'), 'sumWithOverflowOrNull': ('sumWithOverflow', 'OrNull'), 'welchTTestOrNull': ('welchTTest', 'OrNull'), 'theilsUOrNull': ('theilsU', 'OrNull'), 'maxIntersectionsPositionOrNull': ('maxIntersectionsPosition', 'OrNull'), 'anyHeavyOrNull': ('anyHeavy', 'OrNull'), 'uniqUpToOrNull': ('uniqUpTo', 'OrNull'), 'quantilesDeterministicResample': ('quantilesDeterministic', 'Resample'), 'exponentialTimeDecayedAvgResample': ('exponentialTimeDecayedAvg', 'Resample'), 'groupArrayResample': ('groupArray', 'Resample'), 'rankCorrResample': ('rankCorr', 'Resample'), 'argMaxResample': ('argMax', 'Resample'), 'kurtSampResample': ('kurtSamp', 'Resample'), 'mannWhitneyUTestResample': ('mannWhitneyUTest', 'Resample'), 'countResample': ('count', 'Resample'), 'uniqHLL12Resample': ('uniqHLL12', 'Resample'), 'first_valueResample': ('first_value', 'Resample'), 'quantilesExactWeightedResample': ('quantilesExactWeighted', 'Resample'), 'boundingRatioResample': ('boundingRatio', 'Resample'), 'groupBitOrResample': ('groupBitOr', 'Resample'), 'groupArrayMovingSumResample': ('groupArrayMovingSum', 'Resample'), 'sumMapResample': ('sumMap', 'Resample'), 'covarPopResample': ('covarPop', 'Resample'), 'histogramResample': ('histogram', 'Resample'), 'uniqExactResample': ('uniqExact', 'Resample'), 'stddevSampResample': ('stddevSamp', 'Resample'), 'quantileExactWeightedResample': ('quantileExactWeighted', 'Resample'), 'quantileBFloat16WeightedResample': ('quantileBFloat16Weighted', 'Resample'), 'corrResample': ('corr', 'Resample'), 'medianResample': ('median', 'Resample'), 'contingencyResample': ('contingency', 'Resample'), 'groupArrayLastResample': ('groupArrayLast', 'Resample'), 'quantileTimingWeightedResample': ('quantileTimingWeighted', 'Resample'), 'groupArrayMovingAvgResample': ('groupArrayMovingAvg', 'Resample'), 'retentionResample': ('retention', 'Resample'), 'studentTTestResample': ('studentTTest', 'Resample'), 'quantilesExactResample': ('quantilesExact', 'Resample'), 'quantileTDigestResample': ('quantileTDigest', 'Resample'), 'kolmogorovSmirnovTestResample': ('kolmogorovSmirnovTest', 'Resample'), 'deltaSumTimestampResample': ('deltaSumTimestamp', 'Resample'), 'anyLastResample': ('anyLast', 'Resample'), 'groupBitmapAndResample': ('groupBitmapAnd', 'Resample'), 'minResample': ('min', 'Resample'), 'quantilesTDigestWeightedResample': ('quantilesTDigestWeighted', 'Resample'), 'quantilesTimingResample': ('quantilesTiming', 'Resample'), 'groupArraySampleResample': ('groupArraySample', 'Resample'), 'stddevPopResample': ('stddevPop', 'Resample'), 'minMapResample': ('minMap', 'Resample'), 'quantilesGKResample': ('quantilesGK', 'Resample'), 'quantilesBFloat16WeightedResample': ('quantilesBFloat16Weighted', 'Resample'), 'quantilesBFloat16Resample': ('quantilesBFloat16', 'Resample'), 'cramersVBiasCorrectedResample': ('cramersVBiasCorrected', 'Resample'), 'intervalLengthSumResample': ('intervalLengthSum', 'Resample'), 'quantilesTimingWeightedResample': ('quantilesTimingWeighted', 'Resample'), 'windowFunnelResample': ('windowFunnel', 'Resample'), 'categoricalInformationValueResample': ('categoricalInformationValue', 'Resample'), 'quantileInterpolatedWeightedResample': ('quantileInterpolatedWeighted', 'Resample'), 'quantilesInterpolatedWeightedResample': ('quantilesInterpolatedWeighted', 'Resample'), 'last_valueResample': ('last_value', 'Resample'), 'quantilesTDigestResample': ('quantilesTDigest', 'Resample'), 'sumResample': ('sum', 'Resample'), 'uniqResample': ('uniq', 'Resample'), 'simpleLinearRegressionResample': ('simpleLinearRegression', 'Resample'), 'uniqCombined64Resample': ('uniqCombined64', 'Resample'), 'skewPopResample': ('skewPop', 'Resample'), 'maxIntersectionsResample': ('maxIntersections', 'Resample'), 'quantilesResample': ('quantiles', 'Resample'), 'quantileTDigestWeightedResample': ('quantileTDigestWeighted', 'Resample'), 'quantileExactHighResample': ('quantileExactHigh', 'Resample'), 'covarSampResample': ('covarSamp', 'Resample'), 'anyResample': ('any', 'Resample'), 'sumKahanResample': ('sumKahan', 'Resample'), 'sequenceCountResample': ('sequenceCount', 'Resample'), 'uniqThetaResample': ('uniqTheta', 'Resample'), 'avgResample': ('avg', 'Resample'), 'quantilesExactLowResample': ('quantilesExactLow', 'Resample'), 'entropyResample': ('entropy', 'Resample'), 'deltaSumResample': ('deltaSum', 'Resample'), 'groupBitmapOrResample': ('groupBitmapOr', 'Resample'), 'skewSampResample': ('skewSamp', 'Resample'), 'quantileResample': ('quantile', 'Resample'), 'groupUniqArrayResample': ('groupUniqArray', 'Resample'), 'meanZTestResample': ('meanZTest', 'Resample'), 'quantileGKResample': ('quantileGK', 'Resample'), 'maxResample': ('max', 'Resample'), 'groupBitmapXorResample': ('groupBitmapXor', 'Resample'), 'cramersVResample': ('cramersV', 'Resample'), 'quantilesExactHighResample': ('quantilesExactHigh', 'Resample'), 'sequenceNextNodeResample': ('sequenceNextNode', 'Resample'), 'varSampResample': ('varSamp', 'Resample'), 'avgWeightedResample': ('avgWeighted', 'Resample'), 'quantileExactLowResample': ('quantileExactLow', 'Resample'), 'maxMapResample': ('maxMap', 'Resample'), 'topKWeightedResample': ('topKWeighted', 'Resample'), 'groupBitXorResample': ('groupBitXor', 'Resample'), 'quantileExactResample': ('quantileExact', 'Resample'), 'groupArrayInsertAtResample': ('groupArrayInsertAt', 'Resample'), 'uniqCombinedResample': ('uniqCombined', 'Resample'), 'groupBitAndResample': ('groupBitAnd', 'Resample'), 'exponentialMovingAverageResample': ('exponentialMovingAverage', 'Resample'), 'quantileBFloat16Resample': ('quantileBFloat16', 'Resample'), 'quantileDeterministicResample': ('quantileDeterministic', 'Resample'), 'largestTriangleThreeBucketsResample': ('largestTriangleThreeBuckets', 'Resample'), 'groupBitmapResample': ('groupBitmap', 'Resample'), 'varPopResample': ('varPop', 'Resample'), 'sequenceMatchResample': ('sequenceMatch', 'Resample'), 'argMinResample': ('argMin', 'Resample'), 'sumCountResample': ('sumCount', 'Resample'), 'sparkBarResample': ('sparkBar', 'Resample'), 'stochasticLinearRegressionResample': ('stochasticLinearRegression', 'Resample'), 'stochasticLogisticRegressionResample': ('stochasticLogisticRegression', 'Resample'), 'kurtPopResample': ('kurtPop', 'Resample'), 'quantileTimingResample': ('quantileTiming', 'Resample'), 'topKResample': ('topK', 'Resample'), 'sumWithOverflowResample': ('sumWithOverflow', 'Resample'), 'welchTTestResample': ('welchTTest', 'Resample'), 'theilsUResample': ('theilsU', 'Resample'), 'maxIntersectionsPositionResample': ('maxIntersectionsPosition', 'Resample'), 'anyHeavyResample': ('anyHeavy', 'Resample'), 'uniqUpToResample': ('uniqUpTo', 'Resample'), 'quantilesDeterministicArgMin': ('quantilesDeterministic', 'ArgMin'), 'exponentialTimeDecayedAvgArgMin': ('exponentialTimeDecayedAvg', 'ArgMin'), 'groupArrayArgMin': ('groupArray', 'ArgMin'), 'rankCorrArgMin': ('rankCorr', 'ArgMin'), 'argMaxArgMin': ('argMax', 'ArgMin'), 'kurtSampArgMin': ('kurtSamp', 'ArgMin'), 'mannWhitneyUTestArgMin': ('mannWhitneyUTest', 'ArgMin'), 'countArgMin': ('count', 'ArgMin'), 'uniqHLL12ArgMin': ('uniqHLL12', 'ArgMin'), 'first_valueArgMin': ('first_value', 'ArgMin'), 'quantilesExactWeightedArgMin': ('quantilesExactWeighted', 'ArgMin'), 'boundingRatioArgMin': ('boundingRatio', 'ArgMin'), 'groupBitOrArgMin': ('groupBitOr', 'ArgMin'), 'groupArrayMovingSumArgMin': ('groupArrayMovingSum', 'ArgMin'), 'sumMapArgMin': ('sumMap', 'ArgMin'), 'covarPopArgMin': ('covarPop', 'ArgMin'), 'histogramArgMin': ('histogram', 'ArgMin'), 'uniqExactArgMin': ('uniqExact', 'ArgMin'), 'stddevSampArgMin': ('stddevSamp', 'ArgMin'), 'quantileExactWeightedArgMin': ('quantileExactWeighted', 'ArgMin'), 'quantileBFloat16WeightedArgMin': ('quantileBFloat16Weighted', 'ArgMin'), 'corrArgMin': ('corr', 'ArgMin'), 'medianArgMin': ('median', 'ArgMin'), 'contingencyArgMin': ('contingency', 'ArgMin'), 'groupArrayLastArgMin': ('groupArrayLast', 'ArgMin'), 'quantileTimingWeightedArgMin': ('quantileTimingWeighted', 'ArgMin'), 'groupArrayMovingAvgArgMin': ('groupArrayMovingAvg', 'ArgMin'), 'retentionArgMin': ('retention', 'ArgMin'), 'studentTTestArgMin': ('studentTTest', 'ArgMin'), 'quantilesExactArgMin': ('quantilesExact', 'ArgMin'), 'quantileTDigestArgMin': ('quantileTDigest', 'ArgMin'), 'kolmogorovSmirnovTestArgMin': ('kolmogorovSmirnovTest', 'ArgMin'), 'deltaSumTimestampArgMin': ('deltaSumTimestamp', 'ArgMin'), 'anyLastArgMin': ('anyLast', 'ArgMin'), 'groupBitmapAndArgMin': ('groupBitmapAnd', 'ArgMin'), 'minArgMin': ('min', 'ArgMin'), 'quantilesTDigestWeightedArgMin': ('quantilesTDigestWeighted', 'ArgMin'), 'quantilesTimingArgMin': ('quantilesTiming', 'ArgMin'), 'groupArraySampleArgMin': ('groupArraySample', 'ArgMin'), 'stddevPopArgMin': ('stddevPop', 'ArgMin'), 'minMapArgMin': ('minMap', 'ArgMin'), 'quantilesGKArgMin': ('quantilesGK', 'ArgMin'), 'quantilesBFloat16WeightedArgMin': ('quantilesBFloat16Weighted', 'ArgMin'), 'quantilesBFloat16ArgMin': ('quantilesBFloat16', 'ArgMin'), 'cramersVBiasCorrectedArgMin': ('cramersVBiasCorrected', 'ArgMin'), 'intervalLengthSumArgMin': ('intervalLengthSum', 'ArgMin'), 'quantilesTimingWeightedArgMin': ('quantilesTimingWeighted', 'ArgMin'), 'windowFunnelArgMin': ('windowFunnel', 'ArgMin'), 'categoricalInformationValueArgMin': ('categoricalInformationValue', 'ArgMin'), 'quantileInterpolatedWeightedArgMin': ('quantileInterpolatedWeighted', 'ArgMin'), 'quantilesInterpolatedWeightedArgMin': ('quantilesInterpolatedWeighted', 'ArgMin'), 'last_valueArgMin': ('last_value', 'ArgMin'), 'quantilesTDigestArgMin': ('quantilesTDigest', 'ArgMin'), 'sumArgMin': ('sum', 'ArgMin'), 'uniqArgMin': ('uniq', 'ArgMin'), 'simpleLinearRegressionArgMin': ('simpleLinearRegression', 'ArgMin'), 'uniqCombined64ArgMin': ('uniqCombined64', 'ArgMin'), 'skewPopArgMin': ('skewPop', 'ArgMin'), 'maxIntersectionsArgMin': ('maxIntersections', 'ArgMin'), 'quantilesArgMin': ('quantiles', 'ArgMin'), 'quantileTDigestWeightedArgMin': ('quantileTDigestWeighted', 'ArgMin'), 'quantileExactHighArgMin': ('quantileExactHigh', 'ArgMin'), 'covarSampArgMin': ('covarSamp', 'ArgMin'), 'anyArgMin': ('any', 'ArgMin'), 'sumKahanArgMin': ('sumKahan', 'ArgMin'), 'sequenceCountArgMin': ('sequenceCount', 'ArgMin'), 'uniqThetaArgMin': ('uniqTheta', 'ArgMin'), 'avgArgMin': ('avg', 'ArgMin'), 'quantilesExactLowArgMin': ('quantilesExactLow', 'ArgMin'), 'entropyArgMin': ('entropy', 'ArgMin'), 'deltaSumArgMin': ('deltaSum', 'ArgMin'), 'groupBitmapOrArgMin': ('groupBitmapOr', 'ArgMin'), 'skewSampArgMin': ('skewSamp', 'ArgMin'), 'quantileArgMin': ('quantile', 'ArgMin'), 'groupUniqArrayArgMin': ('groupUniqArray', 'ArgMin'), 'meanZTestArgMin': ('meanZTest', 'ArgMin'), 'quantileGKArgMin': ('quantileGK', 'ArgMin'), 'maxArgMin': ('max', 'ArgMin'), 'groupBitmapXorArgMin': ('groupBitmapXor', 'ArgMin'), 'cramersVArgMin': ('cramersV', 'ArgMin'), 'quantilesExactHighArgMin': ('quantilesExactHigh', 'ArgMin'), 'sequenceNextNodeArgMin': ('sequenceNextNode', 'ArgMin'), 'varSampArgMin': ('varSamp', 'ArgMin'), 'avgWeightedArgMin': ('avgWeighted', 'ArgMin'), 'quantileExactLowArgMin': ('quantileExactLow', 'ArgMin'), 'maxMapArgMin': ('maxMap', 'ArgMin'), 'topKWeightedArgMin': ('topKWeighted', 'ArgMin'), 'groupBitXorArgMin': ('groupBitXor', 'ArgMin'), 'quantileExactArgMin': ('quantileExact', 'ArgMin'), 'groupArrayInsertAtArgMin': ('groupArrayInsertAt', 'ArgMin'), 'uniqCombinedArgMin': ('uniqCombined', 'ArgMin'), 'groupBitAndArgMin': ('groupBitAnd', 'ArgMin'), 'exponentialMovingAverageArgMin': ('exponentialMovingAverage', 'ArgMin'), 'quantileBFloat16ArgMin': ('quantileBFloat16', 'ArgMin'), 'quantileDeterministicArgMin': ('quantileDeterministic', 'ArgMin'), 'largestTriangleThreeBucketsArgMin': ('largestTriangleThreeBuckets', 'ArgMin'), 'groupBitmapArgMin': ('groupBitmap', 'ArgMin'), 'varPopArgMin': ('varPop', 'ArgMin'), 'sequenceMatchArgMin': ('sequenceMatch', 'ArgMin'), 'argMinArgMin': ('argMin', 'ArgMin'), 'sumCountArgMin': ('sumCount', 'ArgMin'), 'sparkBarArgMin': ('sparkBar', 'ArgMin'), 'stochasticLinearRegressionArgMin': ('stochasticLinearRegression', 'ArgMin'), 'stochasticLogisticRegressionArgMin': ('stochasticLogisticRegression', 'ArgMin'), 'kurtPopArgMin': ('kurtPop', 'ArgMin'), 'quantileTimingArgMin': ('quantileTiming', 'ArgMin'), 'topKArgMin': ('topK', 'ArgMin'), 'sumWithOverflowArgMin': ('sumWithOverflow', 'ArgMin'), 'welchTTestArgMin': ('welchTTest', 'ArgMin'), 'theilsUArgMin': ('theilsU', 'ArgMin'), 'maxIntersectionsPositionArgMin': ('maxIntersectionsPosition', 'ArgMin'), 'anyHeavyArgMin': ('anyHeavy', 'ArgMin'), 'uniqUpToArgMin': ('uniqUpTo', 'ArgMin'), 'quantilesDeterministicArgMax': ('quantilesDeterministic', 'ArgMax'), 'exponentialTimeDecayedAvgArgMax': ('exponentialTimeDecayedAvg', 'ArgMax'), 'groupArrayArgMax': ('groupArray', 'ArgMax'), 'rankCorrArgMax': ('rankCorr', 'ArgMax'), 'argMaxArgMax': ('argMax', 'ArgMax'), 'kurtSampArgMax': ('kurtSamp', 'ArgMax'), 'mannWhitneyUTestArgMax': ('mannWhitneyUTest', 'ArgMax'), 'countArgMax': ('count', 'ArgMax'), 'uniqHLL12ArgMax': ('uniqHLL12', 'ArgMax'), 'first_valueArgMax': ('first_value', 'ArgMax'), 'quantilesExactWeightedArgMax': ('quantilesExactWeighted', 'ArgMax'), 'boundingRatioArgMax': ('boundingRatio', 'ArgMax'), 'groupBitOrArgMax': ('groupBitOr', 'ArgMax'), 'groupArrayMovingSumArgMax': ('groupArrayMovingSum', 'ArgMax'), 'sumMapArgMax': ('sumMap', 'ArgMax'), 'covarPopArgMax': ('covarPop', 'ArgMax'), 'histogramArgMax': ('histogram', 'ArgMax'), 'uniqExactArgMax': ('uniqExact', 'ArgMax'), 'stddevSampArgMax': ('stddevSamp', 'ArgMax'), 'quantileExactWeightedArgMax': ('quantileExactWeighted', 'ArgMax'), 'quantileBFloat16WeightedArgMax': ('quantileBFloat16Weighted', 'ArgMax'), 'corrArgMax': ('corr', 'ArgMax'), 'medianArgMax': ('median', 'ArgMax'), 'contingencyArgMax': ('contingency', 'ArgMax'), 'groupArrayLastArgMax': ('groupArrayLast', 'ArgMax'), 'quantileTimingWeightedArgMax': ('quantileTimingWeighted', 'ArgMax'), 'groupArrayMovingAvgArgMax': ('groupArrayMovingAvg', 'ArgMax'), 'retentionArgMax': ('retention', 'ArgMax'), 'studentTTestArgMax': ('studentTTest', 'ArgMax'), 'quantilesExactArgMax': ('quantilesExact', 'ArgMax'), 'quantileTDigestArgMax': ('quantileTDigest', 'ArgMax'), 'kolmogorovSmirnovTestArgMax': ('kolmogorovSmirnovTest', 'ArgMax'), 'deltaSumTimestampArgMax': ('deltaSumTimestamp', 'ArgMax'), 'anyLastArgMax': ('anyLast', 'ArgMax'), 'groupBitmapAndArgMax': ('groupBitmapAnd', 'ArgMax'), 'minArgMax': ('min', 'ArgMax'), 'quantilesTDigestWeightedArgMax': ('quantilesTDigestWeighted', 'ArgMax'), 'quantilesTimingArgMax': ('quantilesTiming', 'ArgMax'), 'groupArraySampleArgMax': ('groupArraySample', 'ArgMax'), 'stddevPopArgMax': ('stddevPop', 'ArgMax'), 'minMapArgMax': ('minMap', 'ArgMax'), 'quantilesGKArgMax': ('quantilesGK', 'ArgMax'), 'quantilesBFloat16WeightedArgMax': ('quantilesBFloat16Weighted', 'ArgMax'), 'quantilesBFloat16ArgMax': ('quantilesBFloat16', 'ArgMax'), 'cramersVBiasCorrectedArgMax': ('cramersVBiasCorrected', 'ArgMax'), 'intervalLengthSumArgMax': ('intervalLengthSum', 'ArgMax'), 'quantilesTimingWeightedArgMax': ('quantilesTimingWeighted', 'ArgMax'), 'windowFunnelArgMax': ('windowFunnel', 'ArgMax'), 'categoricalInformationValueArgMax': ('categoricalInformationValue', 'ArgMax'), 'quantileInterpolatedWeightedArgMax': ('quantileInterpolatedWeighted', 'ArgMax'), 'quantilesInterpolatedWeightedArgMax': ('quantilesInterpolatedWeighted', 'ArgMax'), 'last_valueArgMax': ('last_value', 'ArgMax'), 'quantilesTDigestArgMax': ('quantilesTDigest', 'ArgMax'), 'sumArgMax': ('sum', 'ArgMax'), 'uniqArgMax': ('uniq', 'ArgMax'), 'simpleLinearRegressionArgMax': ('simpleLinearRegression', 'ArgMax'), 'uniqCombined64ArgMax': ('uniqCombined64', 'ArgMax'), 'skewPopArgMax': ('skewPop', 'ArgMax'), 'maxIntersectionsArgMax': ('maxIntersections', 'ArgMax'), 'quantilesArgMax': ('quantiles', 'ArgMax'), 'quantileTDigestWeightedArgMax': ('quantileTDigestWeighted', 'ArgMax'), 'quantileExactHighArgMax': ('quantileExactHigh', 'ArgMax'), 'covarSampArgMax': ('covarSamp', 'ArgMax'), 'anyArgMax': ('any', 'ArgMax'), 'sumKahanArgMax': ('sumKahan', 'ArgMax'), 'sequenceCountArgMax': ('sequenceCount', 'ArgMax'), 'uniqThetaArgMax': ('uniqTheta', 'ArgMax'), 'avgArgMax': ('avg', 'ArgMax'), 'quantilesExactLowArgMax': ('quantilesExactLow', 'ArgMax'), 'entropyArgMax': ('entropy', 'ArgMax'), 'deltaSumArgMax': ('deltaSum', 'ArgMax'), 'groupBitmapOrArgMax': ('groupBitmapOr', 'ArgMax'), 'skewSampArgMax': ('skewSamp', 'ArgMax'), 'quantileArgMax': ('quantile', 'ArgMax'), 'groupUniqArrayArgMax': ('groupUniqArray', 'ArgMax'), 'meanZTestArgMax': ('meanZTest', 'ArgMax'), 'quantileGKArgMax': ('quantileGK', 'ArgMax'), 'maxArgMax': ('max', 'ArgMax'), 'groupBitmapXorArgMax': ('groupBitmapXor', 'ArgMax'), 'cramersVArgMax': ('cramersV', 'ArgMax'), 'quantilesExactHighArgMax': ('quantilesExactHigh', 'ArgMax'), 'sequenceNextNodeArgMax': ('sequenceNextNode', 'ArgMax'), 'varSampArgMax': ('varSamp', 'ArgMax'), 'avgWeightedArgMax': ('avgWeighted', 'ArgMax'), 'quantileExactLowArgMax': ('quantileExactLow', 'ArgMax'), 'maxMapArgMax': ('maxMap', 'ArgMax'), 'topKWeightedArgMax': ('topKWeighted', 'ArgMax'), 'groupBitXorArgMax': ('groupBitXor', 'ArgMax'), 'quantileExactArgMax': ('quantileExact', 'ArgMax'), 'groupArrayInsertAtArgMax': ('groupArrayInsertAt', 'ArgMax'), 'uniqCombinedArgMax': ('uniqCombined', 'ArgMax'), 'groupBitAndArgMax': ('groupBitAnd', 'ArgMax'), 'exponentialMovingAverageArgMax': ('exponentialMovingAverage', 'ArgMax'), 'quantileBFloat16ArgMax': ('quantileBFloat16', 'ArgMax'), 'quantileDeterministicArgMax': ('quantileDeterministic', 'ArgMax'), 'largestTriangleThreeBucketsArgMax': ('largestTriangleThreeBuckets', 'ArgMax'), 'groupBitmapArgMax': ('groupBitmap', 'ArgMax'), 'varPopArgMax': ('varPop', 'ArgMax'), 'sequenceMatchArgMax': ('sequenceMatch', 'ArgMax'), 'argMinArgMax': ('argMin', 'ArgMax'), 'sumCountArgMax': ('sumCount', 'ArgMax'), 'sparkBarArgMax': ('sparkBar', 'ArgMax'), 'stochasticLinearRegressionArgMax': ('stochasticLinearRegression', 'ArgMax'), 'stochasticLogisticRegressionArgMax': ('stochasticLogisticRegression', 'ArgMax'), 'kurtPopArgMax': ('kurtPop', 'ArgMax'), 'quantileTimingArgMax': ('quantileTiming', 'ArgMax'), 'topKArgMax': ('topK', 'ArgMax'), 'sumWithOverflowArgMax': ('sumWithOverflow', 'ArgMax'), 'welchTTestArgMax': ('welchTTest', 'ArgMax'), 'theilsUArgMax': ('theilsU', 'ArgMax'), 'maxIntersectionsPositionArgMax': ('maxIntersectionsPosition', 'ArgMax'), 'anyHeavyArgMax': ('anyHeavy', 'ArgMax'), 'uniqUpToArgMax': ('uniqUpTo', 'ArgMax'), 'quantilesDeterministic': ('quantilesDeterministic', ''), 'exponentialTimeDecayedAvg': ('exponentialTimeDecayedAvg', ''), 'groupArray': ('groupArray', ''), 'rankCorr': ('rankCorr', ''), 'argMax': ('argMax', ''), 'kurtSamp': ('kurtSamp', ''), 'mannWhitneyUTest': ('mannWhitneyUTest', ''), 'count': ('count', ''), 'uniqHLL12': ('uniqHLL12', ''), 'first_value': ('first_value', ''), 'quantilesExactWeighted': ('quantilesExactWeighted', ''), 'boundingRatio': ('boundingRatio', ''), 'groupBitOr': ('groupBitOr', ''), 'groupArrayMovingSum': ('groupArrayMovingSum', ''), 'covarPop': ('covarPop', ''), 'histogram': ('histogram', ''), 'uniqExact': ('uniqExact', ''), 'stddevSamp': ('stddevSamp', ''), 'quantileExactWeighted': ('quantileExactWeighted', ''), 'quantileBFloat16Weighted': ('quantileBFloat16Weighted', ''), 'corr': ('corr', ''), 'median': ('median', ''), 'contingency': ('contingency', ''), 'groupArrayLast': ('groupArrayLast', ''), 'quantileTimingWeighted': ('quantileTimingWeighted', ''), 'groupArrayMovingAvg': ('groupArrayMovingAvg', ''), 'retention': ('retention', ''), 'studentTTest': ('studentTTest', ''), 'quantilesExact': ('quantilesExact', ''), 'quantileTDigest': ('quantileTDigest', ''), 'kolmogorovSmirnovTest': ('kolmogorovSmirnovTest', ''), 'deltaSumTimestamp': ('deltaSumTimestamp', ''), 'anyLast': ('anyLast', ''), 'groupBitmapAnd': ('groupBitmapAnd', ''), 'min': ('min', ''), 'quantilesTDigestWeighted': ('quantilesTDigestWeighted', ''), 'quantilesTiming': ('quantilesTiming', ''), 'groupArraySample': ('groupArraySample', ''), 'stddevPop': ('stddevPop', ''), 'quantilesGK': ('quantilesGK', ''), 'quantilesBFloat16Weighted': ('quantilesBFloat16Weighted', ''), 'quantilesBFloat16': ('quantilesBFloat16', ''), 'cramersVBiasCorrected': ('cramersVBiasCorrected', ''), 'intervalLengthSum': ('intervalLengthSum', ''), 'quantilesTimingWeighted': ('quantilesTimingWeighted', ''), 'windowFunnel': ('windowFunnel', ''), 'categoricalInformationValue': ('categoricalInformationValue', ''), 'quantileInterpolatedWeighted': ('quantileInterpolatedWeighted', ''), 'quantilesInterpolatedWeighted': ('quantilesInterpolatedWeighted', ''), 'last_value': ('last_value', ''), 'quantilesTDigest': ('quantilesTDigest', ''), 'sum': ('sum', ''), 'uniq': ('uniq', ''), 'simpleLinearRegression': ('simpleLinearRegression', ''), 'uniqCombined64': ('uniqCombined64', ''), 'skewPop': ('skewPop', ''), 'maxIntersections': ('maxIntersections', ''), 'quantiles': ('quantiles', ''), 'quantileTDigestWeighted': ('quantileTDigestWeighted', ''), 'quantileExactHigh': ('quantileExactHigh', ''), 'covarSamp': ('covarSamp', ''), 'any': ('any', ''), 'sumKahan': ('sumKahan', ''), 'sequenceCount': ('sequenceCount', ''), 'uniqTheta': ('uniqTheta', ''), 'avg': ('avg', ''), 'quantilesExactLow': ('quantilesExactLow', ''), 'entropy': ('entropy', ''), 'deltaSum': ('deltaSum', ''), 'groupBitmapOr': ('groupBitmapOr', ''), 'skewSamp': ('skewSamp', ''), 'quantile': ('quantile', ''), 'groupUniqArray': ('groupUniqArray', ''), 'meanZTest': ('meanZTest', ''), 'quantileGK': ('quantileGK', ''), 'max': ('max', ''), 'groupBitmapXor': ('groupBitmapXor', ''), 'cramersV': ('cramersV', ''), 'quantilesExactHigh': ('quantilesExactHigh', ''), 'sequenceNextNode': ('sequenceNextNode', ''), 'varSamp': ('varSamp', ''), 'avgWeighted': ('avgWeighted', ''), 'quantileExactLow': ('quantileExactLow', ''), 'topKWeighted': ('topKWeighted', ''), 'groupBitXor': ('groupBitXor', ''), 'quantileExact': ('quantileExact', ''), 'groupArrayInsertAt': ('groupArrayInsertAt', ''), 'uniqCombined': ('uniqCombined', ''), 'groupBitAnd': ('groupBitAnd', ''), 'exponentialMovingAverage': ('exponentialMovingAverage', ''), 'quantileBFloat16': ('quantileBFloat16', ''), 'quantileDeterministic': ('quantileDeterministic', ''), 'largestTriangleThreeBuckets': ('largestTriangleThreeBuckets', ''), 'groupBitmap': ('groupBitmap', ''), 'varPop': ('varPop', ''), 'sequenceMatch': ('sequenceMatch', ''), 'argMin': ('argMin', ''), 'sumCount': ('sumCount', ''), 'sparkBar': ('sparkBar', ''), 'stochasticLinearRegression': ('stochasticLinearRegression', ''), 'stochasticLogisticRegression': ('stochasticLogisticRegression', ''), 'kurtPop': ('kurtPop', ''), 'quantileTiming': ('quantileTiming', ''), 'topK': ('topK', ''), 'sumWithOverflow': ('sumWithOverflow', ''), 'welchTTest': ('welchTTest', ''), 'theilsU': ('theilsU', ''), 'maxIntersectionsPosition': ('maxIntersectionsPosition', ''), 'anyHeavy': ('anyHeavy', ''), 'uniqUpTo': ('uniqUpTo', '')}
FUNCTIONS_WITH_ALIASED_ARGS = {'TUPLE', 'STRUCT'}
FUNCTION_PARSERS = {'CAST': <function Parser.<lambda>>, 'CONVERT': <function Parser.<lambda>>, 'DECODE': <function Parser.<lambda>>, 'EXTRACT': <function Parser.<lambda>>, 'GAP_FILL': <function Parser.<lambda>>, 'JSON_OBJECT': <function Parser.<lambda>>, 'JSON_OBJECTAGG': <function Parser.<lambda>>, 'JSON_TABLE': <function Parser.<lambda>>, 'OPENJSON': <function Parser.<lambda>>, 'POSITION': <function Parser.<lambda>>, 'PREDICT': <function Parser.<lambda>>, 'SAFE_CAST': <function Parser.<lambda>>, 'STRING_AGG': <function Parser.<lambda>>, 'SUBSTRING': <function Parser.<lambda>>, 'TRIM': <function Parser.<lambda>>, 'TRY_CAST': <function Parser.<lambda>>, 'TRY_CONVERT': <function Parser.<lambda>>, 'ARRAYJOIN': <function ClickHouse.Parser.<lambda>>, 'QUANTILE': <function ClickHouse.Parser.<lambda>>}
NO_PAREN_FUNCTION_PARSERS = {'CASE': <function Parser.<lambda>>, 'IF': <function Parser.<lambda>>, 'NEXT': <function Parser.<lambda>>}
RANGE_PARSERS = {<TokenType.BETWEEN: 'BETWEEN'>: <function Parser.<lambda>>, <TokenType.GLOB: 'GLOB'>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.ILIKE: 'ILIKE'>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.IN: 'IN'>: <function Parser.<lambda>>, <TokenType.IRLIKE: 'IRLIKE'>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.IS: 'IS'>: <function Parser.<lambda>>, <TokenType.LIKE: 'LIKE'>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.OVERLAPS: 'OVERLAPS'>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.RLIKE: 'RLIKE'>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.SIMILAR_TO: 'SIMILAR_TO'>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.FOR: 'FOR'>: <function Parser.<lambda>>, <TokenType.GLOBAL: 'GLOBAL'>: <function ClickHouse.Parser.<lambda>>}
COLUMN_OPERATORS = {<TokenType.DOT: 'DOT'>: None, <TokenType.DCOLON: 'DCOLON'>: <function Parser.<lambda>>, <TokenType.ARROW: 'ARROW'>: <function Parser.<lambda>>, <TokenType.DARROW: 'DARROW'>: <function Parser.<lambda>>, <TokenType.HASH_ARROW: 'HASH_ARROW'>: <function Parser.<lambda>>, <TokenType.DHASH_ARROW: 'DHASH_ARROW'>: <function Parser.<lambda>>}
JOIN_KINDS = {<TokenType.INNER: 'INNER'>, <TokenType.ASOF: 'ASOF'>, <TokenType.ANY: 'ANY'>, <TokenType.CROSS: 'CROSS'>, <TokenType.ARRAY: 'ARRAY'>, <TokenType.STRAIGHT_JOIN: 'STRAIGHT_JOIN'>, <TokenType.ANTI: 'ANTI'>, <TokenType.OUTER: 'OUTER'>, <TokenType.SEMI: 'SEMI'>}
TABLE_ALIAS_TOKENS = {<TokenType.REPLACE: 'REPLACE'>, <TokenType.TIMESTAMP: 'TIMESTAMP'>, <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, <TokenType.USERDEFINED: 'USERDEFINED'>, <TokenType.HSTORE: 'HSTORE'>, <TokenType.CASE: 'CASE'>, <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, <TokenType.VAR: 'VAR'>, <TokenType.TDIGEST: 'TDIGEST'>, <TokenType.ORDINALITY: 'ORDINALITY'>, <TokenType.IDENTIFIER: 'IDENTIFIER'>, <TokenType.INT: 'INT'>, <TokenType.MERGE: 'MERGE'>, <TokenType.DICTIONARY: 'DICTIONARY'>, <TokenType.ENUM: 'ENUM'>, <TokenType.OPERATOR: 'OPERATOR'>, <TokenType.ASC: 'ASC'>, <TokenType.TIMESTAMP_MS: 'TIMESTAMP_MS'>, <TokenType.DATABASE: 'DATABASE'>, <TokenType.DATETIME64: 'DATETIME64'>, <TokenType.DATETIME: 'DATETIME'>, <TokenType.JSON: 'JSON'>, <TokenType.NULL: 'NULL'>, <TokenType.ROW: 'ROW'>, <TokenType.UNIQUEIDENTIFIER: 'UNIQUEIDENTIFIER'>, <TokenType.BEGIN: 'BEGIN'>, <TokenType.CACHE: 'CACHE'>, <TokenType.USE: 'USE'>, <TokenType.NUMRANGE: 'NUMRANGE'>, <TokenType.TINYBLOB: 'TINYBLOB'>, <TokenType.INT128: 'INT128'>, <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, <TokenType.MONEY: 'MONEY'>, <TokenType.NVARCHAR: 'NVARCHAR'>, <TokenType.IPV4: 'IPV4'>, <TokenType.RANGE: 'RANGE'>, <TokenType.LIST: 'LIST'>, <TokenType.SUPER: 'SUPER'>, <TokenType.STORAGE_INTEGRATION: 'STORAGE_INTEGRATION'>, <TokenType.NCHAR: 'NCHAR'>, <TokenType.FLOAT: 'FLOAT'>, <TokenType.UUID: 'UUID'>, <TokenType.TEXT: 'TEXT'>, <TokenType.WAREHOUSE: 'WAREHOUSE'>, <TokenType.DATE: 'DATE'>, <TokenType.PROCEDURE: 'PROCEDURE'>, <TokenType.SMALLMONEY: 'SMALLMONEY'>, <TokenType.ALL: 'ALL'>, <TokenType.DESC: 'DESC'>, <TokenType.ROLLUP: 'ROLLUP'>, <TokenType.UNKNOWN: 'UNKNOWN'>, <TokenType.TIMESTAMP_S: 'TIMESTAMP_S'>, <TokenType.CHAR: 'CHAR'>, <TokenType.TINYTEXT: 'TINYTEXT'>, <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, <TokenType.DATERANGE: 'DATERANGE'>, <TokenType.TSTZRANGE: 'TSTZRANGE'>, <TokenType.FUNCTION: 'FUNCTION'>, <TokenType.GEOMETRY: 'GEOMETRY'>, <TokenType.COMMENT: 'COMMENT'>, <TokenType.NAME: 'NAME'>, <TokenType.UPDATE: 'UPDATE'>, <TokenType.MAP: 'MAP'>, <TokenType.LOAD: 'LOAD'>, <TokenType.VIEW: 'VIEW'>, <TokenType.BIT: 'BIT'>, <TokenType.YEAR: 'YEAR'>, <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, <TokenType.CURRENT_DATETIME: 'CURRENT_DATETIME'>, <TokenType.CURRENT_USER: 'CURRENT_USER'>, <TokenType.INDEX: 'INDEX'>, <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, <TokenType.NESTED: 'NESTED'>, <TokenType.SMALLSERIAL: 'SMALLSERIAL'>, <TokenType.ESCAPE: 'ESCAPE'>, <TokenType.TINYINT: 'TINYINT'>, <TokenType.UINT: 'UINT'>, <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, <TokenType.DIV: 'DIV'>, <TokenType.VARIANT: 'VARIANT'>, <TokenType.IS: 'IS'>, <TokenType.LONGBLOB: 'LONGBLOB'>, <TokenType.NULLABLE: 'NULLABLE'>, <TokenType.PIVOT: 'PIVOT'>, <TokenType.VARCHAR: 'VARCHAR'>, <TokenType.XML: 'XML'>, <TokenType.DECIMAL: 'DECIMAL'>, <TokenType.COPY: 'COPY'>, <TokenType.COLLATE: 'COLLATE'>, <TokenType.FIRST: 'FIRST'>, <TokenType.HLLSKETCH: 'HLLSKETCH'>, <TokenType.FALSE: 'FALSE'>, <TokenType.BPCHAR: 'BPCHAR'>, <TokenType.SEQUENCE: 'SEQUENCE'>, <TokenType.BINARY: 'BINARY'>, <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, <TokenType.LONGTEXT: 'LONGTEXT'>, <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, <TokenType.FILTER: 'FILTER'>, <TokenType.NEXT: 'NEXT'>, <TokenType.OVERWRITE: 'OVERWRITE'>, <TokenType.INT4RANGE: 'INT4RANGE'>, <TokenType.PRAGMA: 'PRAGMA'>, <TokenType.COLUMN: 'COLUMN'>, <TokenType.ROWS: 'ROWS'>, <TokenType.UDECIMAL: 'UDECIMAL'>, <TokenType.ROWVERSION: 'ROWVERSION'>, <TokenType.OBJECT_IDENTIFIER: 'OBJECT_IDENTIFIER'>, <TokenType.CONSTRAINT: 'CONSTRAINT'>, <TokenType.TAG: 'TAG'>, <TokenType.KILL: 'KILL'>, <TokenType.REFERENCES: 'REFERENCES'>, <TokenType.FIXEDSTRING: 'FIXEDSTRING'>, <TokenType.UNPIVOT: 'UNPIVOT'>, <TokenType.UBIGINT: 'UBIGINT'>, <TokenType.STREAMLIT: 'STREAMLIT'>, <TokenType.BIGINT: 'BIGINT'>, <TokenType.KEEP: 'KEEP'>, <TokenType.DEFAULT: 'DEFAULT'>, <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, <TokenType.DESCRIBE: 'DESCRIBE'>, <TokenType.UNNEST: 'UNNEST'>, <TokenType.DOUBLE: 'DOUBLE'>, <TokenType.JSONB: 'JSONB'>, <TokenType.INET: 'INET'>, <TokenType.SCHEMA: 'SCHEMA'>, <TokenType.COMMAND: 'COMMAND'>, <TokenType.SMALLINT: 'SMALLINT'>, <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, <TokenType.TEMPORARY: 'TEMPORARY'>, <TokenType.FOREIGN_KEY: 'FOREIGN_KEY'>, <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, <TokenType.STRAIGHT_JOIN: 'STRAIGHT_JOIN'>, <TokenType.MEDIUMINT: 'MEDIUMINT'>, <TokenType.EXISTS: 'EXISTS'>, <TokenType.DATE32: 'DATE32'>, <TokenType.TRUE: 'TRUE'>, <TokenType.BOOLEAN: 'BOOLEAN'>, <TokenType.PARTITION: 'PARTITION'>, <TokenType.USMALLINT: 'USMALLINT'>, <TokenType.OVERLAPS: 'OVERLAPS'>, <TokenType.IPV6: 'IPV6'>, <TokenType.SET: 'SET'>, <TokenType.PERCENT: 'PERCENT'>, <TokenType.TIMESTAMP_NS: 'TIMESTAMP_NS'>, <TokenType.IPPREFIX: 'IPPREFIX'>, <TokenType.DELETE: 'DELETE'>, <TokenType.OBJECT: 'OBJECT'>, <TokenType.ENUM8: 'ENUM8'>, <TokenType.INT8RANGE: 'INT8RANGE'>, <TokenType.PSEUDO_TYPE: 'PSEUDO_TYPE'>, <TokenType.TSRANGE: 'TSRANGE'>, <TokenType.SHOW: 'SHOW'>, <TokenType.TIME: 'TIME'>, <TokenType.AGGREGATEFUNCTION: 'AGGREGATEFUNCTION'>, <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, <TokenType.VOLATILE: 'VOLATILE'>, <TokenType.TABLE: 'TABLE'>, <TokenType.UNIQUE: 'UNIQUE'>, <TokenType.REFRESH: 'REFRESH'>, <TokenType.MODEL: 'MODEL'>, <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, <TokenType.UTINYINT: 'UTINYINT'>, <TokenType.IMAGE: 'IMAGE'>, <TokenType.STRUCT: 'STRUCT'>, <TokenType.RECURSIVE: 'RECURSIVE'>, <TokenType.UMEDIUMINT: 'UMEDIUMINT'>, <TokenType.SERIAL: 'SERIAL'>, <TokenType.VARBINARY: 'VARBINARY'>, <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, <TokenType.SOME: 'SOME'>, <TokenType.EXECUTE: 'EXECUTE'>, <TokenType.ENUM16: 'ENUM16'>, <TokenType.UINT256: 'UINT256'>, <TokenType.TIMETZ: 'TIMETZ'>, <TokenType.IPADDRESS: 'IPADDRESS'>, <TokenType.BIGSERIAL: 'BIGSERIAL'>, <TokenType.TOP: 'TOP'>, <TokenType.INTERVAL: 'INTERVAL'>, <TokenType.END: 'END'>, <TokenType.COMMIT: 'COMMIT'>, <TokenType.TRUNCATE: 'TRUNCATE'>, <TokenType.SIMPLEAGGREGATEFUNCTION: 'SIMPLEAGGREGATEFUNCTION'>, <TokenType.LOWCARDINALITY: 'LOWCARDINALITY'>, <TokenType.INT256: 'INT256'>, <TokenType.UINT128: 'UINT128'>, <TokenType.ISNULL: 'ISNULL'>}
ALIAS_TOKENS = {<TokenType.REPLACE: 'REPLACE'>, <TokenType.TIMESTAMP: 'TIMESTAMP'>, <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, <TokenType.USERDEFINED: 'USERDEFINED'>, <TokenType.HSTORE: 'HSTORE'>, <TokenType.CASE: 'CASE'>, <TokenType.LEFT: 'LEFT'>, <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, <TokenType.VAR: 'VAR'>, <TokenType.TDIGEST: 'TDIGEST'>, <TokenType.ORDINALITY: 'ORDINALITY'>, <TokenType.IDENTIFIER: 'IDENTIFIER'>, <TokenType.WINDOW: 'WINDOW'>, <TokenType.INT: 'INT'>, <TokenType.MERGE: 'MERGE'>, <TokenType.DICTIONARY: 'DICTIONARY'>, <TokenType.ENUM: 'ENUM'>, <TokenType.OPERATOR: 'OPERATOR'>, <TokenType.ASC: 'ASC'>, <TokenType.TIMESTAMP_MS: 'TIMESTAMP_MS'>, <TokenType.DATABASE: 'DATABASE'>, <TokenType.DATETIME64: 'DATETIME64'>, <TokenType.DATETIME: 'DATETIME'>, <TokenType.JSON: 'JSON'>, <TokenType.NULL: 'NULL'>, <TokenType.ROW: 'ROW'>, <TokenType.UNIQUEIDENTIFIER: 'UNIQUEIDENTIFIER'>, <TokenType.BEGIN: 'BEGIN'>, <TokenType.CACHE: 'CACHE'>, <TokenType.USE: 'USE'>, <TokenType.NUMRANGE: 'NUMRANGE'>, <TokenType.TINYBLOB: 'TINYBLOB'>, <TokenType.INT128: 'INT128'>, <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, <TokenType.MONEY: 'MONEY'>, <TokenType.NVARCHAR: 'NVARCHAR'>, <TokenType.IPV4: 'IPV4'>, <TokenType.RANGE: 'RANGE'>, <TokenType.LIST: 'LIST'>, <TokenType.SUPER: 'SUPER'>, <TokenType.STORAGE_INTEGRATION: 'STORAGE_INTEGRATION'>, <TokenType.NCHAR: 'NCHAR'>, <TokenType.FLOAT: 'FLOAT'>, <TokenType.UUID: 'UUID'>, <TokenType.TEXT: 'TEXT'>, <TokenType.WAREHOUSE: 'WAREHOUSE'>, <TokenType.DATE: 'DATE'>, <TokenType.PROCEDURE: 'PROCEDURE'>, <TokenType.SMALLMONEY: 'SMALLMONEY'>, <TokenType.ALL: 'ALL'>, <TokenType.DESC: 'DESC'>, <TokenType.ROLLUP: 'ROLLUP'>, <TokenType.UNKNOWN: 'UNKNOWN'>, <TokenType.TIMESTAMP_S: 'TIMESTAMP_S'>, <TokenType.CHAR: 'CHAR'>, <TokenType.TINYTEXT: 'TINYTEXT'>, <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, <TokenType.DATERANGE: 'DATERANGE'>, <TokenType.TSTZRANGE: 'TSTZRANGE'>, <TokenType.FUNCTION: 'FUNCTION'>, <TokenType.GEOMETRY: 'GEOMETRY'>, <TokenType.COMMENT: 'COMMENT'>, <TokenType.NAME: 'NAME'>, <TokenType.UPDATE: 'UPDATE'>, <TokenType.MAP: 'MAP'>, <TokenType.LOAD: 'LOAD'>, <TokenType.VIEW: 'VIEW'>, <TokenType.BIT: 'BIT'>, <TokenType.YEAR: 'YEAR'>, <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, <TokenType.CURRENT_DATETIME: 'CURRENT_DATETIME'>, <TokenType.CURRENT_USER: 'CURRENT_USER'>, <TokenType.INDEX: 'INDEX'>, <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, <TokenType.RIGHT: 'RIGHT'>, <TokenType.NESTED: 'NESTED'>, <TokenType.SMALLSERIAL: 'SMALLSERIAL'>, <TokenType.ESCAPE: 'ESCAPE'>, <TokenType.SETTINGS: 'SETTINGS'>, <TokenType.TINYINT: 'TINYINT'>, <TokenType.NATURAL: 'NATURAL'>, <TokenType.ANY: 'ANY'>, <TokenType.UINT: 'UINT'>, <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, <TokenType.DIV: 'DIV'>, <TokenType.VARIANT: 'VARIANT'>, <TokenType.IS: 'IS'>, <TokenType.LONGBLOB: 'LONGBLOB'>, <TokenType.NULLABLE: 'NULLABLE'>, <TokenType.PIVOT: 'PIVOT'>, <TokenType.VARCHAR: 'VARCHAR'>, <TokenType.XML: 'XML'>, <TokenType.DECIMAL: 'DECIMAL'>, <TokenType.COPY: 'COPY'>, <TokenType.COLLATE: 'COLLATE'>, <TokenType.FIRST: 'FIRST'>, <TokenType.HLLSKETCH: 'HLLSKETCH'>, <TokenType.FALSE: 'FALSE'>, <TokenType.BPCHAR: 'BPCHAR'>, <TokenType.SEQUENCE: 'SEQUENCE'>, <TokenType.BINARY: 'BINARY'>, <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, <TokenType.LONGTEXT: 'LONGTEXT'>, <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, <TokenType.FILTER: 'FILTER'>, <TokenType.FULL: 'FULL'>, <TokenType.NEXT: 'NEXT'>, <TokenType.OVERWRITE: 'OVERWRITE'>, <TokenType.INT4RANGE: 'INT4RANGE'>, <TokenType.PRAGMA: 'PRAGMA'>, <TokenType.COLUMN: 'COLUMN'>, <TokenType.ROWS: 'ROWS'>, <TokenType.UDECIMAL: 'UDECIMAL'>, <TokenType.ROWVERSION: 'ROWVERSION'>, <TokenType.OBJECT_IDENTIFIER: 'OBJECT_IDENTIFIER'>, <TokenType.CONSTRAINT: 'CONSTRAINT'>, <TokenType.TAG: 'TAG'>, <TokenType.KILL: 'KILL'>, <TokenType.REFERENCES: 'REFERENCES'>, <TokenType.FIXEDSTRING: 'FIXEDSTRING'>, <TokenType.UNPIVOT: 'UNPIVOT'>, <TokenType.UBIGINT: 'UBIGINT'>, <TokenType.FINAL: 'FINAL'>, <TokenType.STREAMLIT: 'STREAMLIT'>, <TokenType.BIGINT: 'BIGINT'>, <TokenType.KEEP: 'KEEP'>, <TokenType.DEFAULT: 'DEFAULT'>, <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, <TokenType.DESCRIBE: 'DESCRIBE'>, <TokenType.UNNEST: 'UNNEST'>, <TokenType.DOUBLE: 'DOUBLE'>, <TokenType.JSONB: 'JSONB'>, <TokenType.INET: 'INET'>, <TokenType.SCHEMA: 'SCHEMA'>, <TokenType.COMMAND: 'COMMAND'>, <TokenType.SMALLINT: 'SMALLINT'>, <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, <TokenType.TEMPORARY: 'TEMPORARY'>, <TokenType.FOREIGN_KEY: 'FOREIGN_KEY'>, <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, <TokenType.MEDIUMINT: 'MEDIUMINT'>, <TokenType.EXISTS: 'EXISTS'>, <TokenType.DATE32: 'DATE32'>, <TokenType.TRUE: 'TRUE'>, <TokenType.BOOLEAN: 'BOOLEAN'>, <TokenType.PARTITION: 'PARTITION'>, <TokenType.USMALLINT: 'USMALLINT'>, <TokenType.OVERLAPS: 'OVERLAPS'>, <TokenType.IPV6: 'IPV6'>, <TokenType.SET: 'SET'>, <TokenType.PERCENT: 'PERCENT'>, <TokenType.OFFSET: 'OFFSET'>, <TokenType.TIMESTAMP_NS: 'TIMESTAMP_NS'>, <TokenType.IPPREFIX: 'IPPREFIX'>, <TokenType.DELETE: 'DELETE'>, <TokenType.ASOF: 'ASOF'>, <TokenType.OBJECT: 'OBJECT'>, <TokenType.ENUM8: 'ENUM8'>, <TokenType.INT8RANGE: 'INT8RANGE'>, <TokenType.PSEUDO_TYPE: 'PSEUDO_TYPE'>, <TokenType.TSRANGE: 'TSRANGE'>, <TokenType.SHOW: 'SHOW'>, <TokenType.TIME: 'TIME'>, <TokenType.AGGREGATEFUNCTION: 'AGGREGATEFUNCTION'>, <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, <TokenType.VOLATILE: 'VOLATILE'>, <TokenType.TABLE: 'TABLE'>, <TokenType.UNIQUE: 'UNIQUE'>, <TokenType.REFRESH: 'REFRESH'>, <TokenType.MODEL: 'MODEL'>, <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, <TokenType.UTINYINT: 'UTINYINT'>, <TokenType.IMAGE: 'IMAGE'>, <TokenType.STRUCT: 'STRUCT'>, <TokenType.RECURSIVE: 'RECURSIVE'>, <TokenType.UMEDIUMINT: 'UMEDIUMINT'>, <TokenType.SERIAL: 'SERIAL'>, <TokenType.VARBINARY: 'VARBINARY'>, <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, <TokenType.SOME: 'SOME'>, <TokenType.ARRAY: 'ARRAY'>, <TokenType.EXECUTE: 'EXECUTE'>, <TokenType.ENUM16: 'ENUM16'>, <TokenType.UINT256: 'UINT256'>, <TokenType.TIMETZ: 'TIMETZ'>, <TokenType.IPADDRESS: 'IPADDRESS'>, <TokenType.BIGSERIAL: 'BIGSERIAL'>, <TokenType.TOP: 'TOP'>, <TokenType.ANTI: 'ANTI'>, <TokenType.SEMI: 'SEMI'>, <TokenType.INTERVAL: 'INTERVAL'>, <TokenType.END: 'END'>, <TokenType.COMMIT: 'COMMIT'>, <TokenType.TRUNCATE: 'TRUNCATE'>, <TokenType.APPLY: 'APPLY'>, <TokenType.SIMPLEAGGREGATEFUNCTION: 'SIMPLEAGGREGATEFUNCTION'>, <TokenType.LOWCARDINALITY: 'LOWCARDINALITY'>, <TokenType.INT256: 'INT256'>, <TokenType.UINT128: 'UINT128'>, <TokenType.ISNULL: 'ISNULL'>}
LOG_DEFAULTS_TO_LN = True
QUERY_MODIFIER_PARSERS = {<TokenType.MATCH_RECOGNIZE: 'MATCH_RECOGNIZE'>: <function Parser.<lambda>>, <TokenType.PREWHERE: 'PREWHERE'>: <function Parser.<lambda>>, <TokenType.WHERE: 'WHERE'>: <function Parser.<lambda>>, <TokenType.GROUP_BY: 'GROUP_BY'>: <function Parser.<lambda>>, <TokenType.HAVING: 'HAVING'>: <function Parser.<lambda>>, <TokenType.QUALIFY: 'QUALIFY'>: <function Parser.<lambda>>, <TokenType.WINDOW: 'WINDOW'>: <function Parser.<lambda>>, <TokenType.ORDER_BY: 'ORDER_BY'>: <function Parser.<lambda>>, <TokenType.LIMIT: 'LIMIT'>: <function Parser.<lambda>>, <TokenType.FETCH: 'FETCH'>: <function Parser.<lambda>>, <TokenType.OFFSET: 'OFFSET'>: <function Parser.<lambda>>, <TokenType.FOR: 'FOR'>: <function Parser.<lambda>>, <TokenType.LOCK: 'LOCK'>: <function Parser.<lambda>>, <TokenType.TABLE_SAMPLE: 'TABLE_SAMPLE'>: <function Parser.<lambda>>, <TokenType.USING: 'USING'>: <function Parser.<lambda>>, <TokenType.CLUSTER_BY: 'CLUSTER_BY'>: <function Parser.<lambda>>, <TokenType.DISTRIBUTE_BY: 'DISTRIBUTE_BY'>: <function Parser.<lambda>>, <TokenType.SORT_BY: 'SORT_BY'>: <function Parser.<lambda>>, <TokenType.CONNECT_BY: 'CONNECT_BY'>: <function Parser.<lambda>>, <TokenType.START_WITH: 'START_WITH'>: <function Parser.<lambda>>, <TokenType.SETTINGS: 'SETTINGS'>: <function ClickHouse.Parser.<lambda>>, <TokenType.FORMAT: 'FORMAT'>: <function ClickHouse.Parser.<lambda>>}
CONSTRAINT_PARSERS = {'AUTOINCREMENT': <function Parser.<lambda>>, 'AUTO_INCREMENT': <function Parser.<lambda>>, 'CASESPECIFIC': <function Parser.<lambda>>, 'CHARACTER SET': <function Parser.<lambda>>, 'CHECK': <function Parser.<lambda>>, 'COLLATE': <function Parser.<lambda>>, 'COMMENT': <function Parser.<lambda>>, 'COMPRESS': <function Parser.<lambda>>, 'CLUSTERED': <function Parser.<lambda>>, 'NONCLUSTERED': <function Parser.<lambda>>, 'DEFAULT': <function Parser.<lambda>>, 'ENCODE': <function Parser.<lambda>>, 'EPHEMERAL': <function Parser.<lambda>>, 'EXCLUDE': <function Parser.<lambda>>, 'FOREIGN KEY': <function Parser.<lambda>>, 'FORMAT': <function Parser.<lambda>>, 'GENERATED': <function Parser.<lambda>>, 'IDENTITY': <function Parser.<lambda>>, 'INLINE': <function Parser.<lambda>>, 'LIKE': <function Parser.<lambda>>, 'NOT': <function Parser.<lambda>>, 'NULL': <function Parser.<lambda>>, 'ON': <function Parser.<lambda>>, 'PATH': <function Parser.<lambda>>, 'PERIOD': <function Parser.<lambda>>, 'PRIMARY KEY': <function Parser.<lambda>>, 'REFERENCES': <function Parser.<lambda>>, 'TITLE': <function Parser.<lambda>>, 'TTL': <function Parser.<lambda>>, 'UNIQUE': <function Parser.<lambda>>, 'UPPERCASE': <function Parser.<lambda>>, 'WITH': <function Parser.<lambda>>, 'INDEX': <function ClickHouse.Parser.<lambda>>, 'CODEC': <function ClickHouse.Parser.<lambda>>}
ALTER_PARSERS = {'ADD': <function Parser.<lambda>>, 'ALTER': <function Parser.<lambda>>, 'CLUSTER BY': <function Parser.<lambda>>, 'DELETE': <function Parser.<lambda>>, 'DROP': <function Parser.<lambda>>, 'RENAME': <function Parser.<lambda>>, 'SET': <function Parser.<lambda>>, 'REPLACE': <function ClickHouse.Parser.<lambda>>}
SCHEMA_UNNAMED_CONSTRAINTS = {'FOREIGN KEY', 'CHECK', 'PRIMARY KEY', 'INDEX', 'PERIOD', 'LIKE', 'EXCLUDE', 'UNIQUE'}
ID_VAR_TOKENS = {<TokenType.REPLACE: 'REPLACE'>, <TokenType.TIMESTAMP: 'TIMESTAMP'>, <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, <TokenType.USERDEFINED: 'USERDEFINED'>, <TokenType.HSTORE: 'HSTORE'>, <TokenType.CASE: 'CASE'>, <TokenType.LEFT: 'LEFT'>, <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, <TokenType.VAR: 'VAR'>, <TokenType.TDIGEST: 'TDIGEST'>, <TokenType.ORDINALITY: 'ORDINALITY'>, <TokenType.IDENTIFIER: 'IDENTIFIER'>, <TokenType.WINDOW: 'WINDOW'>, <TokenType.INT: 'INT'>, <TokenType.MERGE: 'MERGE'>, <TokenType.DICTIONARY: 'DICTIONARY'>, <TokenType.ENUM: 'ENUM'>, <TokenType.OPERATOR: 'OPERATOR'>, <TokenType.ASC: 'ASC'>, <TokenType.TIMESTAMP_MS: 'TIMESTAMP_MS'>, <TokenType.DATABASE: 'DATABASE'>, <TokenType.DATETIME64: 'DATETIME64'>, <TokenType.DATETIME: 'DATETIME'>, <TokenType.JSON: 'JSON'>, <TokenType.NULL: 'NULL'>, <TokenType.ROW: 'ROW'>, <TokenType.UNIQUEIDENTIFIER: 'UNIQUEIDENTIFIER'>, <TokenType.BEGIN: 'BEGIN'>, <TokenType.CACHE: 'CACHE'>, <TokenType.USE: 'USE'>, <TokenType.NUMRANGE: 'NUMRANGE'>, <TokenType.TINYBLOB: 'TINYBLOB'>, <TokenType.INT128: 'INT128'>, <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, <TokenType.MONEY: 'MONEY'>, <TokenType.NVARCHAR: 'NVARCHAR'>, <TokenType.IPV4: 'IPV4'>, <TokenType.RANGE: 'RANGE'>, <TokenType.LIST: 'LIST'>, <TokenType.SUPER: 'SUPER'>, <TokenType.STORAGE_INTEGRATION: 'STORAGE_INTEGRATION'>, <TokenType.NCHAR: 'NCHAR'>, <TokenType.FLOAT: 'FLOAT'>, <TokenType.UUID: 'UUID'>, <TokenType.TEXT: 'TEXT'>, <TokenType.FORMAT: 'FORMAT'>, <TokenType.WAREHOUSE: 'WAREHOUSE'>, <TokenType.DATE: 'DATE'>, <TokenType.PROCEDURE: 'PROCEDURE'>, <TokenType.SMALLMONEY: 'SMALLMONEY'>, <TokenType.ALL: 'ALL'>, <TokenType.DESC: 'DESC'>, <TokenType.ROLLUP: 'ROLLUP'>, <TokenType.UNKNOWN: 'UNKNOWN'>, <TokenType.TIMESTAMP_S: 'TIMESTAMP_S'>, <TokenType.CHAR: 'CHAR'>, <TokenType.TINYTEXT: 'TINYTEXT'>, <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, <TokenType.DATERANGE: 'DATERANGE'>, <TokenType.TSTZRANGE: 'TSTZRANGE'>, <TokenType.FUNCTION: 'FUNCTION'>, <TokenType.GEOMETRY: 'GEOMETRY'>, <TokenType.COMMENT: 'COMMENT'>, <TokenType.NAME: 'NAME'>, <TokenType.UPDATE: 'UPDATE'>, <TokenType.MAP: 'MAP'>, <TokenType.LOAD: 'LOAD'>, <TokenType.VIEW: 'VIEW'>, <TokenType.BIT: 'BIT'>, <TokenType.YEAR: 'YEAR'>, <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, <TokenType.CURRENT_DATETIME: 'CURRENT_DATETIME'>, <TokenType.CURRENT_USER: 'CURRENT_USER'>, <TokenType.INDEX: 'INDEX'>, <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, <TokenType.RIGHT: 'RIGHT'>, <TokenType.NESTED: 'NESTED'>, <TokenType.SMALLSERIAL: 'SMALLSERIAL'>, <TokenType.ESCAPE: 'ESCAPE'>, <TokenType.SETTINGS: 'SETTINGS'>, <TokenType.TINYINT: 'TINYINT'>, <TokenType.NATURAL: 'NATURAL'>, <TokenType.ANY: 'ANY'>, <TokenType.UINT: 'UINT'>, <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, <TokenType.DIV: 'DIV'>, <TokenType.VARIANT: 'VARIANT'>, <TokenType.IS: 'IS'>, <TokenType.LONGBLOB: 'LONGBLOB'>, <TokenType.NULLABLE: 'NULLABLE'>, <TokenType.PIVOT: 'PIVOT'>, <TokenType.VARCHAR: 'VARCHAR'>, <TokenType.XML: 'XML'>, <TokenType.DECIMAL: 'DECIMAL'>, <TokenType.COPY: 'COPY'>, <TokenType.COLLATE: 'COLLATE'>, <TokenType.FIRST: 'FIRST'>, <TokenType.HLLSKETCH: 'HLLSKETCH'>, <TokenType.FALSE: 'FALSE'>, <TokenType.BPCHAR: 'BPCHAR'>, <TokenType.SEQUENCE: 'SEQUENCE'>, <TokenType.BINARY: 'BINARY'>, <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, <TokenType.LONGTEXT: 'LONGTEXT'>, <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, <TokenType.FILTER: 'FILTER'>, <TokenType.FULL: 'FULL'>, <TokenType.NEXT: 'NEXT'>, <TokenType.OVERWRITE: 'OVERWRITE'>, <TokenType.INT4RANGE: 'INT4RANGE'>, <TokenType.PRAGMA: 'PRAGMA'>, <TokenType.COLUMN: 'COLUMN'>, <TokenType.ROWS: 'ROWS'>, <TokenType.UDECIMAL: 'UDECIMAL'>, <TokenType.ROWVERSION: 'ROWVERSION'>, <TokenType.OBJECT_IDENTIFIER: 'OBJECT_IDENTIFIER'>, <TokenType.CONSTRAINT: 'CONSTRAINT'>, <TokenType.TAG: 'TAG'>, <TokenType.KILL: 'KILL'>, <TokenType.REFERENCES: 'REFERENCES'>, <TokenType.FIXEDSTRING: 'FIXEDSTRING'>, <TokenType.UNPIVOT: 'UNPIVOT'>, <TokenType.UBIGINT: 'UBIGINT'>, <TokenType.FINAL: 'FINAL'>, <TokenType.STREAMLIT: 'STREAMLIT'>, <TokenType.BIGINT: 'BIGINT'>, <TokenType.KEEP: 'KEEP'>, <TokenType.DEFAULT: 'DEFAULT'>, <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, <TokenType.DESCRIBE: 'DESCRIBE'>, <TokenType.UNNEST: 'UNNEST'>, <TokenType.DOUBLE: 'DOUBLE'>, <TokenType.JSONB: 'JSONB'>, <TokenType.INET: 'INET'>, <TokenType.SCHEMA: 'SCHEMA'>, <TokenType.COMMAND: 'COMMAND'>, <TokenType.SMALLINT: 'SMALLINT'>, <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, <TokenType.TEMPORARY: 'TEMPORARY'>, <TokenType.FOREIGN_KEY: 'FOREIGN_KEY'>, <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, <TokenType.STRAIGHT_JOIN: 'STRAIGHT_JOIN'>, <TokenType.MEDIUMINT: 'MEDIUMINT'>, <TokenType.EXISTS: 'EXISTS'>, <TokenType.DATE32: 'DATE32'>, <TokenType.TRUE: 'TRUE'>, <TokenType.BOOLEAN: 'BOOLEAN'>, <TokenType.PARTITION: 'PARTITION'>, <TokenType.USMALLINT: 'USMALLINT'>, <TokenType.OVERLAPS: 'OVERLAPS'>, <TokenType.IPV6: 'IPV6'>, <TokenType.SET: 'SET'>, <TokenType.PERCENT: 'PERCENT'>, <TokenType.OFFSET: 'OFFSET'>, <TokenType.TIMESTAMP_NS: 'TIMESTAMP_NS'>, <TokenType.IPPREFIX: 'IPPREFIX'>, <TokenType.DELETE: 'DELETE'>, <TokenType.ASOF: 'ASOF'>, <TokenType.OBJECT: 'OBJECT'>, <TokenType.ENUM8: 'ENUM8'>, <TokenType.INT8RANGE: 'INT8RANGE'>, <TokenType.PSEUDO_TYPE: 'PSEUDO_TYPE'>, <TokenType.TSRANGE: 'TSRANGE'>, <TokenType.SHOW: 'SHOW'>, <TokenType.TIME: 'TIME'>, <TokenType.AGGREGATEFUNCTION: 'AGGREGATEFUNCTION'>, <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, <TokenType.VOLATILE: 'VOLATILE'>, <TokenType.TABLE: 'TABLE'>, <TokenType.UNIQUE: 'UNIQUE'>, <TokenType.REFRESH: 'REFRESH'>, <TokenType.MODEL: 'MODEL'>, <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, <TokenType.UTINYINT: 'UTINYINT'>, <TokenType.IMAGE: 'IMAGE'>, <TokenType.STRUCT: 'STRUCT'>, <TokenType.RECURSIVE: 'RECURSIVE'>, <TokenType.UMEDIUMINT: 'UMEDIUMINT'>, <TokenType.SERIAL: 'SERIAL'>, <TokenType.VARBINARY: 'VARBINARY'>, <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, <TokenType.SOME: 'SOME'>, <TokenType.ARRAY: 'ARRAY'>, <TokenType.EXECUTE: 'EXECUTE'>, <TokenType.ENUM16: 'ENUM16'>, <TokenType.UINT256: 'UINT256'>, <TokenType.TIMETZ: 'TIMETZ'>, <TokenType.IPADDRESS: 'IPADDRESS'>, <TokenType.BIGSERIAL: 'BIGSERIAL'>, <TokenType.TOP: 'TOP'>, <TokenType.ANTI: 'ANTI'>, <TokenType.SEMI: 'SEMI'>, <TokenType.INTERVAL: 'INTERVAL'>, <TokenType.END: 'END'>, <TokenType.COMMIT: 'COMMIT'>, <TokenType.TRUNCATE: 'TRUNCATE'>, <TokenType.APPLY: 'APPLY'>, <TokenType.SIMPLEAGGREGATEFUNCTION: 'SIMPLEAGGREGATEFUNCTION'>, <TokenType.LOWCARDINALITY: 'LOWCARDINALITY'>, <TokenType.INT256: 'INT256'>, <TokenType.UINT128: 'UINT128'>, <TokenType.ISNULL: 'ISNULL'>}
SHOW_TRIE: Dict = {}
SET_TRIE: Dict = {'GLOBAL': {0: True}, 'LOCAL': {0: True}, 'SESSION': {0: True}, 'TRANSACTION': {0: True}}
Inherited Members
sqlglot.parser.Parser
Parser
NO_PAREN_FUNCTIONS
STRUCT_TYPE_TOKENS
NESTED_TYPE_TOKENS
ENUM_TYPE_TOKENS
AGGREGATE_TYPE_TOKENS
TYPE_TOKENS
SIGNED_TO_UNSIGNED_TYPE_TOKEN
SUBQUERY_PREDICATES
RESERVED_TOKENS
DB_CREATABLES
CREATABLES
INTERVAL_VARS
ARRAY_CONSTRUCTORS
COMMENT_TABLE_ALIAS_TOKENS
UPDATE_ALIAS_TOKENS
TRIM_TYPES
CONJUNCTION
ASSIGNMENT
DISJUNCTION
EQUALITY
COMPARISON
BITWISE
TERM
FACTOR
EXPONENT
TIMES
TIMESTAMPS
SET_OPERATIONS
JOIN_METHODS
JOIN_SIDES
JOIN_HINTS
LAMBDAS
EXPRESSION_PARSERS
STATEMENT_PARSERS
UNARY_PARSERS
STRING_PARSERS
NUMERIC_PARSERS
PRIMARY_PARSERS
PLACEHOLDER_PARSERS
PROPERTY_PARSERS
ALTER_ALTER_PARSERS
INVALID_FUNC_NAME_TOKENS
KEY_VALUE_DEFINITIONS
SET_PARSERS
SHOW_PARSERS
TYPE_LITERAL_PARSERS
TYPE_CONVERTERS
DDL_SELECT_TOKENS
PRE_VOLATILE_TOKENS
TRANSACTION_KIND
TRANSACTION_CHARACTERISTICS
CONFLICT_ACTIONS
CREATE_SEQUENCE
ISOLATED_LOADING_OPTIONS
USABLES
CAST_ACTIONS
INSERT_ALTERNATIVES
CLONE_KEYWORDS
HISTORICAL_DATA_KIND
OPCLASS_FOLLOW_KEYWORDS
OPTYPE_FOLLOW_TOKENS
TABLE_INDEX_HINT_TOKENS
VIEW_ATTRIBUTES
WINDOW_ALIAS_TOKENS
WINDOW_BEFORE_PAREN_TOKENS
WINDOW_SIDES
JSON_KEY_VALUE_SEPARATOR_TOKENS
FETCH_TOKENS
ADD_CONSTRAINT_TOKENS
DISTINCT_TOKENS
NULL_TOKENS
UNNEST_OFFSET_ALIAS_TOKENS
SELECT_START_TOKENS
COPY_INTO_VARLEN_OPTIONS
STRICT_CAST
PREFIXED_PIVOT_COLUMNS
IDENTIFY_PIVOT_STRINGS
ALTER_TABLE_ADD_REQUIRED_FOR_EACH_COLUMN
TABLESAMPLE_CSV
DEFAULT_SAMPLING_METHOD
SET_REQUIRES_ASSIGNMENT_DELIMITER
TRIM_PATTERN_FIRST
STRING_ALIASES
SET_OP_MODIFIERS
NO_PAREN_IF_COMMANDS
JSON_ARROWS_REQUIRE_JSON_TYPE
COLON_IS_JSON_EXTRACT
VALUES_FOLLOWED_BY_PAREN
SUPPORTS_IMPLICIT_UNNEST
SUPPORTS_PARTITION_SELECTION
error_level
error_message_context
max_errors
dialect
reset
parse
parse_into
check_errors
raise_error
expression
validate_expression
errors
sql
class ClickHouse.Generator(sqlglot.generator.Generator):
670    class Generator(generator.Generator):
671        QUERY_HINTS = False
672        STRUCT_DELIMITER = ("(", ")")
673        NVL2_SUPPORTED = False
674        TABLESAMPLE_REQUIRES_PARENS = False
675        TABLESAMPLE_SIZE_IS_ROWS = False
676        TABLESAMPLE_KEYWORDS = "SAMPLE"
677        LAST_DAY_SUPPORTS_DATE_PART = False
678        CAN_IMPLEMENT_ARRAY_ANY = True
679        SUPPORTS_TO_NUMBER = False
680        JOIN_HINTS = False
681        TABLE_HINTS = False
682        EXPLICIT_SET_OP = True
683        GROUPINGS_SEP = ""
684        SET_OP_MODIFIERS = False
685
686        STRING_TYPE_MAPPING = {
687            exp.DataType.Type.CHAR: "String",
688            exp.DataType.Type.LONGBLOB: "String",
689            exp.DataType.Type.LONGTEXT: "String",
690            exp.DataType.Type.MEDIUMBLOB: "String",
691            exp.DataType.Type.MEDIUMTEXT: "String",
692            exp.DataType.Type.TINYBLOB: "String",
693            exp.DataType.Type.TINYTEXT: "String",
694            exp.DataType.Type.TEXT: "String",
695            exp.DataType.Type.VARBINARY: "String",
696            exp.DataType.Type.VARCHAR: "String",
697        }
698
699        SUPPORTED_JSON_PATH_PARTS = {
700            exp.JSONPathKey,
701            exp.JSONPathRoot,
702            exp.JSONPathSubscript,
703        }
704
705        TYPE_MAPPING = {
706            **generator.Generator.TYPE_MAPPING,
707            **STRING_TYPE_MAPPING,
708            exp.DataType.Type.ARRAY: "Array",
709            exp.DataType.Type.BIGINT: "Int64",
710            exp.DataType.Type.DATE32: "Date32",
711            exp.DataType.Type.DATETIME64: "DateTime64",
712            exp.DataType.Type.DOUBLE: "Float64",
713            exp.DataType.Type.ENUM: "Enum",
714            exp.DataType.Type.ENUM8: "Enum8",
715            exp.DataType.Type.ENUM16: "Enum16",
716            exp.DataType.Type.FIXEDSTRING: "FixedString",
717            exp.DataType.Type.FLOAT: "Float32",
718            exp.DataType.Type.INT: "Int32",
719            exp.DataType.Type.MEDIUMINT: "Int32",
720            exp.DataType.Type.INT128: "Int128",
721            exp.DataType.Type.INT256: "Int256",
722            exp.DataType.Type.LOWCARDINALITY: "LowCardinality",
723            exp.DataType.Type.MAP: "Map",
724            exp.DataType.Type.NESTED: "Nested",
725            exp.DataType.Type.NULLABLE: "Nullable",
726            exp.DataType.Type.SMALLINT: "Int16",
727            exp.DataType.Type.STRUCT: "Tuple",
728            exp.DataType.Type.TINYINT: "Int8",
729            exp.DataType.Type.UBIGINT: "UInt64",
730            exp.DataType.Type.UINT: "UInt32",
731            exp.DataType.Type.UINT128: "UInt128",
732            exp.DataType.Type.UINT256: "UInt256",
733            exp.DataType.Type.USMALLINT: "UInt16",
734            exp.DataType.Type.UTINYINT: "UInt8",
735            exp.DataType.Type.IPV4: "IPv4",
736            exp.DataType.Type.IPV6: "IPv6",
737            exp.DataType.Type.AGGREGATEFUNCTION: "AggregateFunction",
738            exp.DataType.Type.SIMPLEAGGREGATEFUNCTION: "SimpleAggregateFunction",
739        }
740
741        TRANSFORMS = {
742            **generator.Generator.TRANSFORMS,
743            exp.AnyValue: rename_func("any"),
744            exp.ApproxDistinct: rename_func("uniq"),
745            exp.ArrayFilter: lambda self, e: self.func("arrayFilter", e.expression, e.this),
746            exp.ArraySize: rename_func("LENGTH"),
747            exp.ArraySum: rename_func("arraySum"),
748            exp.ArgMax: arg_max_or_min_no_count("argMax"),
749            exp.ArgMin: arg_max_or_min_no_count("argMin"),
750            exp.Array: inline_array_sql,
751            exp.CastToStrType: rename_func("CAST"),
752            exp.CountIf: rename_func("countIf"),
753            exp.CompressColumnConstraint: lambda self,
754            e: f"CODEC({self.expressions(e, key='this', flat=True)})",
755            exp.ComputedColumnConstraint: lambda self,
756            e: f"{'MATERIALIZED' if e.args.get('persisted') else 'ALIAS'} {self.sql(e, 'this')}",
757            exp.CurrentDate: lambda self, e: self.func("CURRENT_DATE"),
758            exp.DateAdd: _datetime_delta_sql("DATE_ADD"),
759            exp.DateDiff: _datetime_delta_sql("DATE_DIFF"),
760            exp.DateSub: _datetime_delta_sql("DATE_SUB"),
761            exp.Explode: rename_func("arrayJoin"),
762            exp.Final: lambda self, e: f"{self.sql(e, 'this')} FINAL",
763            exp.IsNan: rename_func("isNaN"),
764            exp.JSONExtract: json_extract_segments("JSONExtractString", quoted_index=False),
765            exp.JSONExtractScalar: json_extract_segments("JSONExtractString", quoted_index=False),
766            exp.JSONPathKey: json_path_key_only_name,
767            exp.JSONPathRoot: lambda *_: "",
768            exp.Map: lambda self, e: _lower_func(var_map_sql(self, e)),
769            exp.Nullif: rename_func("nullIf"),
770            exp.PartitionedByProperty: lambda self, e: f"PARTITION BY {self.sql(e, 'this')}",
771            exp.Pivot: no_pivot_sql,
772            exp.Quantile: _quantile_sql,
773            exp.RegexpLike: lambda self, e: self.func("match", e.this, e.expression),
774            exp.Rand: rename_func("randCanonical"),
775            exp.Select: transforms.preprocess([transforms.eliminate_qualify]),
776            exp.StartsWith: rename_func("startsWith"),
777            exp.StrPosition: lambda self, e: self.func(
778                "position", e.this, e.args.get("substr"), e.args.get("position")
779            ),
780            exp.TimeToStr: lambda self, e: self.func(
781                "DATE_FORMAT", e.this, self.format_time(e), e.args.get("timezone")
782            ),
783            exp.TimestampAdd: _datetime_delta_sql("TIMESTAMP_ADD"),
784            exp.TimestampSub: _datetime_delta_sql("TIMESTAMP_SUB"),
785            exp.VarMap: lambda self, e: _lower_func(var_map_sql(self, e)),
786            exp.Xor: lambda self, e: self.func("xor", e.this, e.expression, *e.expressions),
787            exp.MD5Digest: rename_func("MD5"),
788            exp.MD5: lambda self, e: self.func("LOWER", self.func("HEX", self.func("MD5", e.this))),
789            exp.SHA: rename_func("SHA1"),
790            exp.SHA2: sha256_sql,
791            exp.UnixToTime: _unix_to_time_sql,
792            exp.TimestampTrunc: timestamptrunc_sql(zone=True),
793            exp.Variance: rename_func("varSamp"),
794            exp.Stddev: rename_func("stddevSamp"),
795        }
796
797        PROPERTIES_LOCATION = {
798            **generator.Generator.PROPERTIES_LOCATION,
799            exp.VolatileProperty: exp.Properties.Location.UNSUPPORTED,
800            exp.PartitionedByProperty: exp.Properties.Location.POST_SCHEMA,
801            exp.OnCluster: exp.Properties.Location.POST_NAME,
802        }
803
804        # there's no list in docs, but it can be found in Clickhouse code
805        # see `ClickHouse/src/Parsers/ParserCreate*.cpp`
806        ON_CLUSTER_TARGETS = {
807            "DATABASE",
808            "TABLE",
809            "VIEW",
810            "DICTIONARY",
811            "INDEX",
812            "FUNCTION",
813            "NAMED COLLECTION",
814        }
815
816        def _jsonpathsubscript_sql(self, expression: exp.JSONPathSubscript) -> str:
817            this = self.json_path_part(expression.this)
818            return str(int(this) + 1) if is_int(this) else this
819
820        def likeproperty_sql(self, expression: exp.LikeProperty) -> str:
821            return f"AS {self.sql(expression, 'this')}"
822
823        def _any_to_has(
824            self,
825            expression: exp.EQ | exp.NEQ,
826            default: t.Callable[[t.Any], str],
827            prefix: str = "",
828        ) -> str:
829            if isinstance(expression.left, exp.Any):
830                arr = expression.left
831                this = expression.right
832            elif isinstance(expression.right, exp.Any):
833                arr = expression.right
834                this = expression.left
835            else:
836                return default(expression)
837
838            return prefix + self.func("has", arr.this.unnest(), this)
839
840        def eq_sql(self, expression: exp.EQ) -> str:
841            return self._any_to_has(expression, super().eq_sql)
842
843        def neq_sql(self, expression: exp.NEQ) -> str:
844            return self._any_to_has(expression, super().neq_sql, "NOT ")
845
846        def regexpilike_sql(self, expression: exp.RegexpILike) -> str:
847            # Manually add a flag to make the search case-insensitive
848            regex = self.func("CONCAT", "'(?i)'", expression.expression)
849            return self.func("match", expression.this, regex)
850
851        def datatype_sql(self, expression: exp.DataType) -> str:
852            # String is the standard ClickHouse type, every other variant is just an alias.
853            # Additionally, any supplied length parameter will be ignored.
854            #
855            # https://clickhouse.com/docs/en/sql-reference/data-types/string
856            if expression.this in self.STRING_TYPE_MAPPING:
857                return "String"
858
859            return super().datatype_sql(expression)
860
861        def cte_sql(self, expression: exp.CTE) -> str:
862            if expression.args.get("scalar"):
863                this = self.sql(expression, "this")
864                alias = self.sql(expression, "alias")
865                return f"{this} AS {alias}"
866
867            return super().cte_sql(expression)
868
869        def after_limit_modifiers(self, expression: exp.Expression) -> t.List[str]:
870            return super().after_limit_modifiers(expression) + [
871                (
872                    self.seg("SETTINGS ") + self.expressions(expression, key="settings", flat=True)
873                    if expression.args.get("settings")
874                    else ""
875                ),
876                (
877                    self.seg("FORMAT ") + self.sql(expression, "format")
878                    if expression.args.get("format")
879                    else ""
880                ),
881            ]
882
883        def parameterizedagg_sql(self, expression: exp.ParameterizedAgg) -> str:
884            params = self.expressions(expression, key="params", flat=True)
885            return self.func(expression.name, *expression.expressions) + f"({params})"
886
887        def anonymousaggfunc_sql(self, expression: exp.AnonymousAggFunc) -> str:
888            return self.func(expression.name, *expression.expressions)
889
890        def combinedaggfunc_sql(self, expression: exp.CombinedAggFunc) -> str:
891            return self.anonymousaggfunc_sql(expression)
892
893        def combinedparameterizedagg_sql(self, expression: exp.CombinedParameterizedAgg) -> str:
894            return self.parameterizedagg_sql(expression)
895
896        def placeholder_sql(self, expression: exp.Placeholder) -> str:
897            return f"{{{expression.name}: {self.sql(expression, 'kind')}}}"
898
899        def oncluster_sql(self, expression: exp.OnCluster) -> str:
900            return f"ON CLUSTER {self.sql(expression, 'this')}"
901
902        def createable_sql(self, expression: exp.Create, locations: t.DefaultDict) -> str:
903            if expression.kind in self.ON_CLUSTER_TARGETS and locations.get(
904                exp.Properties.Location.POST_NAME
905            ):
906                this_name = self.sql(expression.this, "this")
907                this_properties = " ".join(
908                    [self.sql(prop) for prop in locations[exp.Properties.Location.POST_NAME]]
909                )
910                this_schema = self.schema_columns_sql(expression.this)
911                return f"{this_name}{self.sep()}{this_properties}{self.sep()}{this_schema}"
912
913            return super().createable_sql(expression, locations)
914
915        def prewhere_sql(self, expression: exp.PreWhere) -> str:
916            this = self.indent(self.sql(expression, "this"))
917            return f"{self.seg('PREWHERE')}{self.sep()}{this}"
918
919        def indexcolumnconstraint_sql(self, expression: exp.IndexColumnConstraint) -> str:
920            this = self.sql(expression, "this")
921            this = f" {this}" if this else ""
922            expr = self.sql(expression, "expression")
923            expr = f" {expr}" if expr else ""
924            index_type = self.sql(expression, "index_type")
925            index_type = f" TYPE {index_type}" if index_type else ""
926            granularity = self.sql(expression, "granularity")
927            granularity = f" GRANULARITY {granularity}" if granularity else ""
928
929            return f"INDEX{this}{expr}{index_type}{granularity}"
930
931        def partition_sql(self, expression: exp.Partition) -> str:
932            return f"PARTITION {self.expressions(expression, flat=True)}"
933
934        def partitionid_sql(self, expression: exp.PartitionId) -> str:
935            return f"ID {self.sql(expression.this)}"
936
937        def replacepartition_sql(self, expression: exp.ReplacePartition) -> str:
938            return (
939                f"REPLACE {self.sql(expression.expression)} FROM {self.sql(expression, 'source')}"
940            )
941
942        def projectiondef_sql(self, expression: exp.ProjectionDef) -> str:
943            return f"PROJECTION {self.sql(expression.this)} {self.wrap(expression.expression)}"

Generator converts a given syntax tree to the corresponding SQL string.

Arguments:
  • pretty: Whether to format the produced SQL string. Default: False.
  • identify: Determines when an identifier should be quoted. Possible values are: False (default): Never quote, except in cases where it's mandatory by the dialect. True or 'always': Always quote. 'safe': Only quote identifiers that are case insensitive.
  • normalize: Whether to normalize identifiers to lowercase. Default: False.
  • pad: The pad size in a formatted string. For example, this affects the indentation of a projection in a query, relative to its nesting level. Default: 2.
  • indent: The indentation size in a formatted string. For example, this affects the indentation of subqueries and filters under a WHERE clause. Default: 2.
  • normalize_functions: How to normalize function names. Possible values are: "upper" or True (default): Convert names to uppercase. "lower": Convert names to lowercase. False: Disables function name normalization.
  • unsupported_level: Determines the generator's behavior when it encounters unsupported expressions. Default ErrorLevel.WARN.
  • max_unsupported: Maximum number of unsupported messages to include in a raised UnsupportedError. This is only relevant if unsupported_level is ErrorLevel.RAISE. Default: 3
  • leading_comma: Whether the comma is leading or trailing in select expressions. This is only relevant when generating in pretty mode. Default: False
  • max_text_width: The max number of characters in a segment before creating new lines in pretty mode. The default is on the smaller end because the length only represents a segment and not the true line length. Default: 80
  • comments: Whether to preserve comments in the output SQL code. Default: True
QUERY_HINTS = False
STRUCT_DELIMITER = ('(', ')')
NVL2_SUPPORTED = False
TABLESAMPLE_REQUIRES_PARENS = False
TABLESAMPLE_SIZE_IS_ROWS = False
TABLESAMPLE_KEYWORDS = 'SAMPLE'
LAST_DAY_SUPPORTS_DATE_PART = False
CAN_IMPLEMENT_ARRAY_ANY = True
SUPPORTS_TO_NUMBER = False
JOIN_HINTS = False
TABLE_HINTS = False
EXPLICIT_SET_OP = True
GROUPINGS_SEP = ''
SET_OP_MODIFIERS = False
STRING_TYPE_MAPPING = {<Type.CHAR: 'CHAR'>: 'String', <Type.LONGBLOB: 'LONGBLOB'>: 'String', <Type.LONGTEXT: 'LONGTEXT'>: 'String', <Type.MEDIUMBLOB: 'MEDIUMBLOB'>: 'String', <Type.MEDIUMTEXT: 'MEDIUMTEXT'>: 'String', <Type.TINYBLOB: 'TINYBLOB'>: 'String', <Type.TINYTEXT: 'TINYTEXT'>: 'String', <Type.TEXT: 'TEXT'>: 'String', <Type.VARBINARY: 'VARBINARY'>: 'String', <Type.VARCHAR: 'VARCHAR'>: 'String'}
TYPE_MAPPING = {<Type.NCHAR: 'NCHAR'>: 'CHAR', <Type.NVARCHAR: 'NVARCHAR'>: 'VARCHAR', <Type.MEDIUMTEXT: 'MEDIUMTEXT'>: 'String', <Type.LONGTEXT: 'LONGTEXT'>: 'String', <Type.TINYTEXT: 'TINYTEXT'>: 'String', <Type.MEDIUMBLOB: 'MEDIUMBLOB'>: 'String', <Type.LONGBLOB: 'LONGBLOB'>: 'String', <Type.TINYBLOB: 'TINYBLOB'>: 'String', <Type.INET: 'INET'>: 'INET', <Type.ROWVERSION: 'ROWVERSION'>: 'VARBINARY', <Type.CHAR: 'CHAR'>: 'String', <Type.TEXT: 'TEXT'>: 'String', <Type.VARBINARY: 'VARBINARY'>: 'String', <Type.VARCHAR: 'VARCHAR'>: 'String', <Type.ARRAY: 'ARRAY'>: 'Array', <Type.BIGINT: 'BIGINT'>: 'Int64', <Type.DATE32: 'DATE32'>: 'Date32', <Type.DATETIME64: 'DATETIME64'>: 'DateTime64', <Type.DOUBLE: 'DOUBLE'>: 'Float64', <Type.ENUM: 'ENUM'>: 'Enum', <Type.ENUM8: 'ENUM8'>: 'Enum8', <Type.ENUM16: 'ENUM16'>: 'Enum16', <Type.FIXEDSTRING: 'FIXEDSTRING'>: 'FixedString', <Type.FLOAT: 'FLOAT'>: 'Float32', <Type.INT: 'INT'>: 'Int32', <Type.MEDIUMINT: 'MEDIUMINT'>: 'Int32', <Type.INT128: 'INT128'>: 'Int128', <Type.INT256: 'INT256'>: 'Int256', <Type.LOWCARDINALITY: 'LOWCARDINALITY'>: 'LowCardinality', <Type.MAP: 'MAP'>: 'Map', <Type.NESTED: 'NESTED'>: 'Nested', <Type.NULLABLE: 'NULLABLE'>: 'Nullable', <Type.SMALLINT: 'SMALLINT'>: 'Int16', <Type.STRUCT: 'STRUCT'>: 'Tuple', <Type.TINYINT: 'TINYINT'>: 'Int8', <Type.UBIGINT: 'UBIGINT'>: 'UInt64', <Type.UINT: 'UINT'>: 'UInt32', <Type.UINT128: 'UINT128'>: 'UInt128', <Type.UINT256: 'UINT256'>: 'UInt256', <Type.USMALLINT: 'USMALLINT'>: 'UInt16', <Type.UTINYINT: 'UTINYINT'>: 'UInt8', <Type.IPV4: 'IPV4'>: 'IPv4', <Type.IPV6: 'IPV6'>: 'IPv6', <Type.AGGREGATEFUNCTION: 'AGGREGATEFUNCTION'>: 'AggregateFunction', <Type.SIMPLEAGGREGATEFUNCTION: 'SIMPLEAGGREGATEFUNCTION'>: 'SimpleAggregateFunction'}
TRANSFORMS = {<class 'sqlglot.expressions.JSONPathKey'>: <function json_path_key_only_name>, <class 'sqlglot.expressions.JSONPathRoot'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.JSONPathSubscript'>: <function <lambda>>, <class 'sqlglot.expressions.AllowedValuesProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.AutoRefreshProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.BackupProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.CaseSpecificColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.CharacterSetColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.CharacterSetProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.ClusteredColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.CollateColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.CommentColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.CopyGrantsProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.DateFormatColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.DefaultColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.DynamicProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.EncodeColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.EphemeralColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.ExcludeColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.ExecuteAsProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.ExternalProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.GlobalProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.HeapProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.IcebergProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.InheritsProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.InlineLengthColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.InputModelProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.IntervalSpan'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.JSONExtract'>: <function json_extract_segments.<locals>._json_extract_segments>, <class 'sqlglot.expressions.JSONExtractScalar'>: <function json_extract_segments.<locals>._json_extract_segments>, <class 'sqlglot.expressions.LanguageProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.LocationProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.LogProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.MaterializedProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.NonClusteredColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.NoPrimaryIndexProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.NotForReplicationColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.OnCommitProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.OnProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.OnUpdateColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.OutputModelProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.PathColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.ProjectionPolicyColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.RemoteWithConnectionModelProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.ReturnsProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.SampleProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.SecureProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.SetConfigProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.SetProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.SettingsProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.SharingProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.SqlReadWriteProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.SqlSecurityProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.StabilityProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.StrictProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.TemporaryProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.TagColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.TitleColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.Timestamp'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.ToMap'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.ToTableProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.TransformModelProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.TransientProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.UppercaseColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.UnloggedProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.VarMap'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.ViewAttributeProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.VolatileProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.WithJournalTableProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.WithOperator'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.AnyValue'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.ApproxDistinct'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.ArrayFilter'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.ArraySize'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.ArraySum'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.ArgMax'>: <function arg_max_or_min_no_count.<locals>._arg_max_or_min_sql>, <class 'sqlglot.expressions.ArgMin'>: <function arg_max_or_min_no_count.<locals>._arg_max_or_min_sql>, <class 'sqlglot.expressions.Array'>: <function inline_array_sql>, <class 'sqlglot.expressions.CastToStrType'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.CountIf'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.CompressColumnConstraint'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.ComputedColumnConstraint'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.CurrentDate'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.DateAdd'>: <function _datetime_delta_sql.<locals>._delta_sql>, <class 'sqlglot.expressions.DateDiff'>: <function _datetime_delta_sql.<locals>._delta_sql>, <class 'sqlglot.expressions.DateSub'>: <function _datetime_delta_sql.<locals>._delta_sql>, <class 'sqlglot.expressions.Explode'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.Final'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.IsNan'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.Map'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.Nullif'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.PartitionedByProperty'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.Pivot'>: <function no_pivot_sql>, <class 'sqlglot.expressions.Quantile'>: <function _quantile_sql>, <class 'sqlglot.expressions.RegexpLike'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.Rand'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.Select'>: <function preprocess.<locals>._to_sql>, <class 'sqlglot.expressions.StartsWith'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.StrPosition'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.TimeToStr'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.TimestampAdd'>: <function _datetime_delta_sql.<locals>._delta_sql>, <class 'sqlglot.expressions.TimestampSub'>: <function _datetime_delta_sql.<locals>._delta_sql>, <class 'sqlglot.expressions.Xor'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.MD5Digest'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.MD5'>: <function ClickHouse.Generator.<lambda>>, <class 'sqlglot.expressions.SHA'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.SHA2'>: <function sha256_sql>, <class 'sqlglot.expressions.UnixToTime'>: <function _unix_to_time_sql>, <class 'sqlglot.expressions.TimestampTrunc'>: <function timestamptrunc_sql.<locals>._timestamptrunc_sql>, <class 'sqlglot.expressions.Variance'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.Stddev'>: <function rename_func.<locals>.<lambda>>}
PROPERTIES_LOCATION = {<class 'sqlglot.expressions.AllowedValuesProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.AlgorithmProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.AutoIncrementProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.AutoRefreshProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.BackupProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.BlockCompressionProperty'>: <Location.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.CharacterSetProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.ChecksumProperty'>: <Location.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.CollateProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.CopyGrantsProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.Cluster'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.ClusteredByProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.DataBlocksizeProperty'>: <Location.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.DataDeletionProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.DefinerProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.DictRange'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.DictProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.DynamicProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.DistKeyProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.DistStyleProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.EngineProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.ExecuteAsProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.ExternalProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.FallbackProperty'>: <Location.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.FileFormatProperty'>: <Location.POST_WITH: 'POST_WITH'>, <class 'sqlglot.expressions.FreespaceProperty'>: <Location.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.GlobalProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.HeapProperty'>: <Location.POST_WITH: 'POST_WITH'>, <class 'sqlglot.expressions.InheritsProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.IcebergProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.InputModelProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.IsolatedLoadingProperty'>: <Location.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.JournalProperty'>: <Location.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.LanguageProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.LikeProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.LocationProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.LockProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.LockingProperty'>: <Location.POST_ALIAS: 'POST_ALIAS'>, <class 'sqlglot.expressions.LogProperty'>: <Location.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.MaterializedProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.MergeBlockRatioProperty'>: <Location.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.NoPrimaryIndexProperty'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.OnProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.OnCommitProperty'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.Order'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.OutputModelProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.PartitionedByProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.PartitionedOfProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.PrimaryKey'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.Property'>: <Location.POST_WITH: 'POST_WITH'>, <class 'sqlglot.expressions.RemoteWithConnectionModelProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.ReturnsProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.RowFormatProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.RowFormatDelimitedProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.RowFormatSerdeProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.SampleProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.SchemaCommentProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.SecureProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.SerdeProperties'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.Set'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.SettingsProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.SetProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.SetConfigProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.SharingProperty'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.SequenceProperties'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.SortKeyProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.SqlReadWriteProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.SqlSecurityProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.StabilityProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.StrictProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.TemporaryProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.ToTableProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.TransientProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.TransformModelProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.MergeTreeTTL'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.UnloggedProperty'>: <Location.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.ViewAttributeProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.VolatileProperty'>: <Location.UNSUPPORTED: 'UNSUPPORTED'>, <class 'sqlglot.expressions.WithDataProperty'>: <Location.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.WithJournalTableProperty'>: <Location.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.WithSystemVersioningProperty'>: <Location.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.OnCluster'>: <Location.POST_NAME: 'POST_NAME'>}
ON_CLUSTER_TARGETS = {'DICTIONARY', 'FUNCTION', 'INDEX', 'VIEW', 'DATABASE', 'NAMED COLLECTION', 'TABLE'}
def likeproperty_sql(self, expression: sqlglot.expressions.LikeProperty) -> str:
820        def likeproperty_sql(self, expression: exp.LikeProperty) -> str:
821            return f"AS {self.sql(expression, 'this')}"
def eq_sql(self, expression: sqlglot.expressions.EQ) -> str:
840        def eq_sql(self, expression: exp.EQ) -> str:
841            return self._any_to_has(expression, super().eq_sql)
def neq_sql(self, expression: sqlglot.expressions.NEQ) -> str:
843        def neq_sql(self, expression: exp.NEQ) -> str:
844            return self._any_to_has(expression, super().neq_sql, "NOT ")
def regexpilike_sql(self, expression: sqlglot.expressions.RegexpILike) -> str:
846        def regexpilike_sql(self, expression: exp.RegexpILike) -> str:
847            # Manually add a flag to make the search case-insensitive
848            regex = self.func("CONCAT", "'(?i)'", expression.expression)
849            return self.func("match", expression.this, regex)
def datatype_sql(self, expression: sqlglot.expressions.DataType) -> str:
851        def datatype_sql(self, expression: exp.DataType) -> str:
852            # String is the standard ClickHouse type, every other variant is just an alias.
853            # Additionally, any supplied length parameter will be ignored.
854            #
855            # https://clickhouse.com/docs/en/sql-reference/data-types/string
856            if expression.this in self.STRING_TYPE_MAPPING:
857                return "String"
858
859            return super().datatype_sql(expression)
def cte_sql(self, expression: sqlglot.expressions.CTE) -> str:
861        def cte_sql(self, expression: exp.CTE) -> str:
862            if expression.args.get("scalar"):
863                this = self.sql(expression, "this")
864                alias = self.sql(expression, "alias")
865                return f"{this} AS {alias}"
866
867            return super().cte_sql(expression)
def after_limit_modifiers(self, expression: sqlglot.expressions.Expression) -> List[str]:
869        def after_limit_modifiers(self, expression: exp.Expression) -> t.List[str]:
870            return super().after_limit_modifiers(expression) + [
871                (
872                    self.seg("SETTINGS ") + self.expressions(expression, key="settings", flat=True)
873                    if expression.args.get("settings")
874                    else ""
875                ),
876                (
877                    self.seg("FORMAT ") + self.sql(expression, "format")
878                    if expression.args.get("format")
879                    else ""
880                ),
881            ]
def parameterizedagg_sql(self, expression: sqlglot.expressions.ParameterizedAgg) -> str:
883        def parameterizedagg_sql(self, expression: exp.ParameterizedAgg) -> str:
884            params = self.expressions(expression, key="params", flat=True)
885            return self.func(expression.name, *expression.expressions) + f"({params})"
def anonymousaggfunc_sql(self, expression: sqlglot.expressions.AnonymousAggFunc) -> str:
887        def anonymousaggfunc_sql(self, expression: exp.AnonymousAggFunc) -> str:
888            return self.func(expression.name, *expression.expressions)
def combinedaggfunc_sql(self, expression: sqlglot.expressions.CombinedAggFunc) -> str:
890        def combinedaggfunc_sql(self, expression: exp.CombinedAggFunc) -> str:
891            return self.anonymousaggfunc_sql(expression)
def combinedparameterizedagg_sql(self, expression: sqlglot.expressions.CombinedParameterizedAgg) -> str:
893        def combinedparameterizedagg_sql(self, expression: exp.CombinedParameterizedAgg) -> str:
894            return self.parameterizedagg_sql(expression)
def placeholder_sql(self, expression: sqlglot.expressions.Placeholder) -> str:
896        def placeholder_sql(self, expression: exp.Placeholder) -> str:
897            return f"{{{expression.name}: {self.sql(expression, 'kind')}}}"
def oncluster_sql(self, expression: sqlglot.expressions.OnCluster) -> str:
899        def oncluster_sql(self, expression: exp.OnCluster) -> str:
900            return f"ON CLUSTER {self.sql(expression, 'this')}"
def createable_sql( self, expression: sqlglot.expressions.Create, locations: DefaultDict) -> str:
902        def createable_sql(self, expression: exp.Create, locations: t.DefaultDict) -> str:
903            if expression.kind in self.ON_CLUSTER_TARGETS and locations.get(
904                exp.Properties.Location.POST_NAME
905            ):
906                this_name = self.sql(expression.this, "this")
907                this_properties = " ".join(
908                    [self.sql(prop) for prop in locations[exp.Properties.Location.POST_NAME]]
909                )
910                this_schema = self.schema_columns_sql(expression.this)
911                return f"{this_name}{self.sep()}{this_properties}{self.sep()}{this_schema}"
912
913            return super().createable_sql(expression, locations)
def prewhere_sql(self, expression: sqlglot.expressions.PreWhere) -> str:
915        def prewhere_sql(self, expression: exp.PreWhere) -> str:
916            this = self.indent(self.sql(expression, "this"))
917            return f"{self.seg('PREWHERE')}{self.sep()}{this}"
def indexcolumnconstraint_sql(self, expression: sqlglot.expressions.IndexColumnConstraint) -> str:
919        def indexcolumnconstraint_sql(self, expression: exp.IndexColumnConstraint) -> str:
920            this = self.sql(expression, "this")
921            this = f" {this}" if this else ""
922            expr = self.sql(expression, "expression")
923            expr = f" {expr}" if expr else ""
924            index_type = self.sql(expression, "index_type")
925            index_type = f" TYPE {index_type}" if index_type else ""
926            granularity = self.sql(expression, "granularity")
927            granularity = f" GRANULARITY {granularity}" if granularity else ""
928
929            return f"INDEX{this}{expr}{index_type}{granularity}"
def partition_sql(self, expression: sqlglot.expressions.Partition) -> str:
931        def partition_sql(self, expression: exp.Partition) -> str:
932            return f"PARTITION {self.expressions(expression, flat=True)}"
def partitionid_sql(self, expression: sqlglot.expressions.PartitionId) -> str:
934        def partitionid_sql(self, expression: exp.PartitionId) -> str:
935            return f"ID {self.sql(expression.this)}"
def replacepartition_sql(self, expression: sqlglot.expressions.ReplacePartition) -> str:
937        def replacepartition_sql(self, expression: exp.ReplacePartition) -> str:
938            return (
939                f"REPLACE {self.sql(expression.expression)} FROM {self.sql(expression, 'source')}"
940            )
def projectiondef_sql(self, expression: sqlglot.expressions.ProjectionDef) -> str:
942        def projectiondef_sql(self, expression: exp.ProjectionDef) -> str:
943            return f"PROJECTION {self.sql(expression.this)} {self.wrap(expression.expression)}"
SELECT_KINDS: Tuple[str, ...] = ()
TRY_SUPPORTED = False
SUPPORTS_UESCAPE = False
AFTER_HAVING_MODIFIER_TRANSFORMS = {'qualify': <function Generator.<lambda>>, 'windows': <function Generator.<lambda>>}
Inherited Members
sqlglot.generator.Generator
Generator
NULL_ORDERING_SUPPORTED
IGNORE_NULLS_IN_FUNC
LOCKING_READS_SUPPORTED
WRAP_DERIVED_VALUES
CREATE_FUNCTION_RETURN_AS
MATCHED_BY_SOURCE
SINGLE_STRING_INTERVAL
INTERVAL_ALLOWS_PLURAL_FORM
LIMIT_FETCH
LIMIT_ONLY_LITERALS
RENAME_TABLE_WITH_DB
INDEX_ON
QUERY_HINT_SEP
IS_BOOL_ALLOWED
DUPLICATE_KEY_UPDATE_WITH_SET
LIMIT_IS_TOP
RETURNING_END
EXTRACT_ALLOWS_QUOTES
TZ_TO_WITH_TIME_ZONE
VALUES_AS_TABLE
ALTER_TABLE_INCLUDE_COLUMN_KEYWORD
UNNEST_WITH_ORDINALITY
AGGREGATE_FILTER_SUPPORTED
SEMI_ANTI_JOIN_WITH_SIDE
COMPUTED_COLUMN_WITH_TYPE
SUPPORTS_TABLE_COPY
TABLESAMPLE_WITH_METHOD
TABLESAMPLE_SEED_KEYWORD
COLLATE_IS_FUNC
DATA_TYPE_SPECIFIERS_ALLOWED
ENSURE_BOOLS
CTE_RECURSIVE_KEYWORD_REQUIRED
SUPPORTS_SINGLE_ARG_CONCAT
SUPPORTS_TABLE_ALIAS_COLUMNS
UNPIVOT_ALIASES_ARE_IDENTIFIERS
JSON_KEY_VALUE_PAIR_SEP
INSERT_OVERWRITE
SUPPORTS_SELECT_INTO
SUPPORTS_UNLOGGED_TABLES
SUPPORTS_CREATE_TABLE_LIKE
LIKE_PROPERTY_INSIDE_SCHEMA
MULTI_ARG_DISTINCT
JSON_TYPE_REQUIRED_FOR_EXTRACTION
JSON_PATH_BRACKETED_KEY_SUPPORTED
JSON_PATH_SINGLE_QUOTE_ESCAPE
COPY_PARAMS_ARE_WRAPPED
COPY_PARAMS_EQ_REQUIRED
COPY_HAS_INTO_KEYWORD
STAR_EXCEPT
HEX_FUNC
WITH_PROPERTIES_PREFIX
QUOTE_JSON_PATH
TIME_PART_SINGULARS
TOKEN_MAPPING
PARAMETER_TOKEN
NAMED_PLACEHOLDER_TOKEN
RESERVED_KEYWORDS
WITH_SEPARATED_COMMENTS
EXCLUDE_COMMENTS
UNWRAPPED_INTERVAL_VALUES
PARAMETERIZABLE_TEXT_TYPES
EXPRESSIONS_WITHOUT_NESTED_CTES
SENTINEL_LINE_BREAK
pretty
identify
normalize
pad
unsupported_level
max_unsupported
leading_comma
max_text_width
comments
dialect
normalize_functions
unsupported_messages
generate
preprocess
unsupported
sep
seg
pad_comment
maybe_comment
wrap
no_identify
normalize_func
indent
sql
uncache_sql
cache_sql
characterset_sql
column_parts
column_sql
columnposition_sql
columndef_sql
columnconstraint_sql
computedcolumnconstraint_sql
autoincrementcolumnconstraint_sql
compresscolumnconstraint_sql
generatedasidentitycolumnconstraint_sql
generatedasrowcolumnconstraint_sql
periodforsystemtimeconstraint_sql
notnullcolumnconstraint_sql
transformcolumnconstraint_sql
primarykeycolumnconstraint_sql
uniquecolumnconstraint_sql
create_sql
sequenceproperties_sql
clone_sql
describe_sql
heredoc_sql
prepend_ctes
with_sql
tablealias_sql
bitstring_sql
hexstring_sql
bytestring_sql
unicodestring_sql
rawstring_sql
datatypeparam_sql
directory_sql
delete_sql
drop_sql
except_sql
except_op
fetch_sql
filter_sql
hint_sql
indexparameters_sql
index_sql
identifier_sql
hex_sql
lowerhex_sql
inputoutputformat_sql
national_sql
properties_sql
root_properties
properties
with_properties
locate_properties
property_name
property_sql
fallbackproperty_sql
journalproperty_sql
freespaceproperty_sql
checksumproperty_sql
mergeblockratioproperty_sql
datablocksizeproperty_sql
blockcompressionproperty_sql
isolatedloadingproperty_sql
partitionboundspec_sql
partitionedofproperty_sql
lockingproperty_sql
withdataproperty_sql
withsystemversioningproperty_sql
insert_sql
intersect_sql
intersect_op
introducer_sql
kill_sql
pseudotype_sql
objectidentifier_sql
onconflict_sql
returning_sql
rowformatdelimitedproperty_sql
withtablehint_sql
indextablehint_sql
historicaldata_sql
table_parts
table_sql
tablesample_sql
pivot_sql
version_sql
tuple_sql
update_sql
values_sql
var_sql
into_sql
from_sql
group_sql
having_sql
connect_sql
prior_sql
join_sql
lambda_sql
lateral_op
lateral_sql
limit_sql
offset_sql
setitem_sql
set_sql
pragma_sql
lock_sql
literal_sql
escape_str
loaddata_sql
null_sql
boolean_sql
order_sql
withfill_sql
cluster_sql
distribute_sql
sort_sql
ordered_sql
matchrecognizemeasure_sql
matchrecognize_sql
query_modifiers
options_modifier
queryoption_sql
offset_limit_modifiers
select_sql
schema_sql
schema_columns_sql
star_sql
parameter_sql
sessionparameter_sql
subquery_sql
qualify_sql
set_operations
union_sql
union_op
unnest_sql
where_sql
window_sql
partition_by_sql
windowspec_sql
withingroup_sql
between_sql
bracket_offset_expressions
bracket_sql
all_sql
any_sql
exists_sql
case_sql
constraint_sql
nextvaluefor_sql
extract_sql
trim_sql
convert_concat_args
concat_sql
concatws_sql
check_sql
foreignkey_sql
primarykey_sql
if_sql
matchagainst_sql
jsonkeyvalue_sql
jsonpath_sql
json_path_part
formatjson_sql
jsonobject_sql
jsonobjectagg_sql
jsonarray_sql
jsonarrayagg_sql
jsoncolumndef_sql
jsonschema_sql
jsontable_sql
openjsoncolumndef_sql
openjson_sql
in_sql
in_unnest_op
interval_sql
return_sql
reference_sql
anonymous_sql
paren_sql
neg_sql
not_sql
alias_sql
pivotalias_sql
aliases_sql
atindex_sql
attimezone_sql
fromtimezone_sql
add_sql
and_sql
or_sql
xor_sql
connector_sql
bitwiseand_sql
bitwiseleftshift_sql
bitwisenot_sql
bitwiseor_sql
bitwiserightshift_sql
bitwisexor_sql
cast_sql
currentdate_sql
currenttimestamp_sql
collate_sql
command_sql
comment_sql
mergetreettlaction_sql
mergetreettl_sql
transaction_sql
commit_sql
rollback_sql
altercolumn_sql
alterdiststyle_sql
altersortkey_sql
renametable_sql
renamecolumn_sql
alterset_sql
altertable_sql
add_column_sql
droppartition_sql
addconstraint_sql
distinct_sql
ignorenulls_sql
respectnulls_sql
havingmax_sql
intdiv_sql
dpipe_sql
div_sql
overlaps_sql
distance_sql
dot_sql
propertyeq_sql
escape_sql
glob_sql
gt_sql
gte_sql
ilike_sql
ilikeany_sql
is_sql
like_sql
likeany_sql
similarto_sql
lt_sql
lte_sql
mod_sql
mul_sql
nullsafeeq_sql
nullsafeneq_sql
slice_sql
sub_sql
trycast_sql
try_sql
log_sql
use_sql
binary
function_fallback_sql
func
format_args
too_wide
format_time
expressions
op_expressions
naked_property
tag_sql
token_sql
userdefinedfunction_sql
joinhint_sql
kwarg_sql
when_sql
merge_sql
tochar_sql
tonumber_sql
dictproperty_sql
dictrange_sql
dictsubproperty_sql
clusteredbyproperty_sql
anyvalue_sql
querytransform_sql
indexconstraintoption_sql
checkcolumnconstraint_sql
nvl2_sql
comprehension_sql
columnprefix_sql
opclass_sql
predict_sql
forin_sql
refresh_sql
operator_sql
toarray_sql
tsordstotime_sql
tsordstotimestamp_sql
tsordstodate_sql
unixdate_sql
lastday_sql
dateadd_sql
arrayany_sql
generateseries_sql
struct_sql
partitionrange_sql
truncatetable_sql
convert_sql
copyparameter_sql
credentials_sql
copy_sql
semicolon_sql
datadeletionproperty_sql
maskingpolicycolumnconstraint_sql
gapfill_sql
scope_resolution
scoperesolution_sql