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

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 ( ).

tokenizer_class = <class 'ClickHouse.Tokenizer'>
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):
 69    class Tokenizer(tokens.Tokenizer):
 70        COMMENTS = ["--", "#", "#!", ("/*", "*/")]
 71        IDENTIFIERS = ['"', "`"]
 72        STRING_ESCAPES = ["'", "\\"]
 73        BIT_STRINGS = [("0b", "")]
 74        HEX_STRINGS = [("0x", ""), ("0X", "")]
 75        HEREDOC_STRINGS = ["$"]
 76
 77        KEYWORDS = {
 78            **tokens.Tokenizer.KEYWORDS,
 79            "ATTACH": TokenType.COMMAND,
 80            "DATE32": TokenType.DATE32,
 81            "DATETIME64": TokenType.DATETIME64,
 82            "DICTIONARY": TokenType.DICTIONARY,
 83            "ENUM8": TokenType.ENUM8,
 84            "ENUM16": TokenType.ENUM16,
 85            "FINAL": TokenType.FINAL,
 86            "FIXEDSTRING": TokenType.FIXEDSTRING,
 87            "FLOAT32": TokenType.FLOAT,
 88            "FLOAT64": TokenType.DOUBLE,
 89            "GLOBAL": TokenType.GLOBAL,
 90            "INT256": TokenType.INT256,
 91            "LOWCARDINALITY": TokenType.LOWCARDINALITY,
 92            "MAP": TokenType.MAP,
 93            "NESTED": TokenType.NESTED,
 94            "SAMPLE": TokenType.TABLE_SAMPLE,
 95            "TUPLE": TokenType.STRUCT,
 96            "UINT128": TokenType.UINT128,
 97            "UINT16": TokenType.USMALLINT,
 98            "UINT256": TokenType.UINT256,
 99            "UINT32": TokenType.UINT,
100            "UINT64": TokenType.UBIGINT,
101            "UINT8": TokenType.UTINYINT,
102            "IPV4": TokenType.IPV4,
103            "IPV6": TokenType.IPV6,
104            "AGGREGATEFUNCTION": TokenType.AGGREGATEFUNCTION,
105            "SIMPLEAGGREGATEFUNCTION": TokenType.SIMPLEAGGREGATEFUNCTION,
106            "SYSTEM": TokenType.COMMAND,
107            "PREWHERE": TokenType.PREWHERE,
108        }
109
110        SINGLE_TOKENS = {
111            **tokens.Tokenizer.SINGLE_TOKENS,
112            "$": TokenType.HEREDOC_STRING,
113        }
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.HINT: 'HINT'>, '==': <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'>, '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'>, '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'>, '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):
115    class Parser(parser.Parser):
116        # Tested in ClickHouse's playground, it seems that the following two queries do the same thing
117        # * select x from t1 union all select x from t2 limit 1;
118        # * select x from t1 union all (select x from t2 limit 1);
119        MODIFIERS_ATTACHED_TO_UNION = False
120        INTERVAL_SPANS = False
121
122        FUNCTIONS = {
123            **parser.Parser.FUNCTIONS,
124            "ANY": exp.AnyValue.from_arg_list,
125            "ARRAYSUM": exp.ArraySum.from_arg_list,
126            "COUNTIF": _build_count_if,
127            "DATE_ADD": lambda args: exp.DateAdd(
128                this=seq_get(args, 2), expression=seq_get(args, 1), unit=seq_get(args, 0)
129            ),
130            "DATEADD": lambda args: exp.DateAdd(
131                this=seq_get(args, 2), expression=seq_get(args, 1), unit=seq_get(args, 0)
132            ),
133            "DATE_DIFF": lambda args: exp.DateDiff(
134                this=seq_get(args, 2), expression=seq_get(args, 1), unit=seq_get(args, 0)
135            ),
136            "DATEDIFF": lambda args: exp.DateDiff(
137                this=seq_get(args, 2), expression=seq_get(args, 1), unit=seq_get(args, 0)
138            ),
139            "DATE_FORMAT": _build_date_format,
140            "FORMATDATETIME": _build_date_format,
141            "JSONEXTRACTSTRING": build_json_extract_path(
142                exp.JSONExtractScalar, zero_based_indexing=False
143            ),
144            "MAP": parser.build_var_map,
145            "MATCH": exp.RegexpLike.from_arg_list,
146            "RANDCANONICAL": exp.Rand.from_arg_list,
147            "TUPLE": exp.Struct.from_arg_list,
148            "UNIQ": exp.ApproxDistinct.from_arg_list,
149            "XOR": lambda args: exp.Xor(expressions=args),
150            "MD5": exp.MD5Digest.from_arg_list,
151            "SHA256": lambda args: exp.SHA2(this=seq_get(args, 0), length=exp.Literal.number(256)),
152            "SHA512": lambda args: exp.SHA2(this=seq_get(args, 0), length=exp.Literal.number(512)),
153        }
154
155        AGG_FUNCTIONS = {
156            "count",
157            "min",
158            "max",
159            "sum",
160            "avg",
161            "any",
162            "stddevPop",
163            "stddevSamp",
164            "varPop",
165            "varSamp",
166            "corr",
167            "covarPop",
168            "covarSamp",
169            "entropy",
170            "exponentialMovingAverage",
171            "intervalLengthSum",
172            "kolmogorovSmirnovTest",
173            "mannWhitneyUTest",
174            "median",
175            "rankCorr",
176            "sumKahan",
177            "studentTTest",
178            "welchTTest",
179            "anyHeavy",
180            "anyLast",
181            "boundingRatio",
182            "first_value",
183            "last_value",
184            "argMin",
185            "argMax",
186            "avgWeighted",
187            "topK",
188            "topKWeighted",
189            "deltaSum",
190            "deltaSumTimestamp",
191            "groupArray",
192            "groupArrayLast",
193            "groupUniqArray",
194            "groupArrayInsertAt",
195            "groupArrayMovingAvg",
196            "groupArrayMovingSum",
197            "groupArraySample",
198            "groupBitAnd",
199            "groupBitOr",
200            "groupBitXor",
201            "groupBitmap",
202            "groupBitmapAnd",
203            "groupBitmapOr",
204            "groupBitmapXor",
205            "sumWithOverflow",
206            "sumMap",
207            "minMap",
208            "maxMap",
209            "skewSamp",
210            "skewPop",
211            "kurtSamp",
212            "kurtPop",
213            "uniq",
214            "uniqExact",
215            "uniqCombined",
216            "uniqCombined64",
217            "uniqHLL12",
218            "uniqTheta",
219            "quantile",
220            "quantiles",
221            "quantileExact",
222            "quantilesExact",
223            "quantileExactLow",
224            "quantilesExactLow",
225            "quantileExactHigh",
226            "quantilesExactHigh",
227            "quantileExactWeighted",
228            "quantilesExactWeighted",
229            "quantileTiming",
230            "quantilesTiming",
231            "quantileTimingWeighted",
232            "quantilesTimingWeighted",
233            "quantileDeterministic",
234            "quantilesDeterministic",
235            "quantileTDigest",
236            "quantilesTDigest",
237            "quantileTDigestWeighted",
238            "quantilesTDigestWeighted",
239            "quantileBFloat16",
240            "quantilesBFloat16",
241            "quantileBFloat16Weighted",
242            "quantilesBFloat16Weighted",
243            "simpleLinearRegression",
244            "stochasticLinearRegression",
245            "stochasticLogisticRegression",
246            "categoricalInformationValue",
247            "contingency",
248            "cramersV",
249            "cramersVBiasCorrected",
250            "theilsU",
251            "maxIntersections",
252            "maxIntersectionsPosition",
253            "meanZTest",
254            "quantileInterpolatedWeighted",
255            "quantilesInterpolatedWeighted",
256            "quantileGK",
257            "quantilesGK",
258            "sparkBar",
259            "sumCount",
260            "largestTriangleThreeBuckets",
261            "histogram",
262            "sequenceMatch",
263            "sequenceCount",
264            "windowFunnel",
265            "retention",
266            "uniqUpTo",
267            "sequenceNextNode",
268            "exponentialTimeDecayedAvg",
269        }
270
271        AGG_FUNCTIONS_SUFFIXES = [
272            "If",
273            "Array",
274            "ArrayIf",
275            "Map",
276            "SimpleState",
277            "State",
278            "Merge",
279            "MergeState",
280            "ForEach",
281            "Distinct",
282            "OrDefault",
283            "OrNull",
284            "Resample",
285            "ArgMin",
286            "ArgMax",
287        ]
288
289        FUNC_TOKENS = {
290            *parser.Parser.FUNC_TOKENS,
291            TokenType.SET,
292        }
293
294        AGG_FUNC_MAPPING = (
295            lambda functions, suffixes: {
296                f"{f}{sfx}": (f, sfx) for sfx in (suffixes + [""]) for f in functions
297            }
298        )(AGG_FUNCTIONS, AGG_FUNCTIONS_SUFFIXES)
299
300        FUNCTIONS_WITH_ALIASED_ARGS = {*parser.Parser.FUNCTIONS_WITH_ALIASED_ARGS, "TUPLE"}
301
302        FUNCTION_PARSERS = {
303            **parser.Parser.FUNCTION_PARSERS,
304            "ARRAYJOIN": lambda self: self.expression(exp.Explode, this=self._parse_expression()),
305            "QUANTILE": lambda self: self._parse_quantile(),
306        }
307
308        FUNCTION_PARSERS.pop("MATCH")
309
310        NO_PAREN_FUNCTION_PARSERS = parser.Parser.NO_PAREN_FUNCTION_PARSERS.copy()
311        NO_PAREN_FUNCTION_PARSERS.pop("ANY")
312
313        RANGE_PARSERS = {
314            **parser.Parser.RANGE_PARSERS,
315            TokenType.GLOBAL: lambda self, this: self._match(TokenType.IN)
316            and self._parse_in(this, is_global=True),
317        }
318
319        # The PLACEHOLDER entry is popped because 1) it doesn't affect Clickhouse (it corresponds to
320        # the postgres-specific JSONBContains parser) and 2) it makes parsing the ternary op simpler.
321        COLUMN_OPERATORS = parser.Parser.COLUMN_OPERATORS.copy()
322        COLUMN_OPERATORS.pop(TokenType.PLACEHOLDER)
323
324        JOIN_KINDS = {
325            *parser.Parser.JOIN_KINDS,
326            TokenType.ANY,
327            TokenType.ASOF,
328            TokenType.ARRAY,
329        }
330
331        TABLE_ALIAS_TOKENS = parser.Parser.TABLE_ALIAS_TOKENS - {
332            TokenType.ANY,
333            TokenType.ARRAY,
334            TokenType.FINAL,
335            TokenType.FORMAT,
336            TokenType.SETTINGS,
337        }
338
339        ALIAS_TOKENS = parser.Parser.ALIAS_TOKENS - {
340            TokenType.FORMAT,
341        }
342
343        LOG_DEFAULTS_TO_LN = True
344
345        QUERY_MODIFIER_PARSERS = {
346            **parser.Parser.QUERY_MODIFIER_PARSERS,
347            TokenType.SETTINGS: lambda self: (
348                "settings",
349                self._advance() or self._parse_csv(self._parse_conjunction),
350            ),
351            TokenType.FORMAT: lambda self: ("format", self._advance() or self._parse_id_var()),
352        }
353
354        CONSTRAINT_PARSERS = {
355            **parser.Parser.CONSTRAINT_PARSERS,
356            "INDEX": lambda self: self._parse_index_constraint(),
357            "CODEC": lambda self: self._parse_compress(),
358        }
359
360        ALTER_PARSERS = {
361            **parser.Parser.ALTER_PARSERS,
362            "REPLACE": lambda self: self._parse_alter_table_replace(),
363        }
364
365        SCHEMA_UNNAMED_CONSTRAINTS = {
366            *parser.Parser.SCHEMA_UNNAMED_CONSTRAINTS,
367            "INDEX",
368        }
369
370        def _parse_conjunction(self) -> t.Optional[exp.Expression]:
371            this = super()._parse_conjunction()
372
373            if self._match(TokenType.PLACEHOLDER):
374                return self.expression(
375                    exp.If,
376                    this=this,
377                    true=self._parse_conjunction(),
378                    false=self._match(TokenType.COLON) and self._parse_conjunction(),
379                )
380
381            return this
382
383        def _parse_placeholder(self) -> t.Optional[exp.Expression]:
384            """
385            Parse a placeholder expression like SELECT {abc: UInt32} or FROM {table: Identifier}
386            https://clickhouse.com/docs/en/sql-reference/syntax#defining-and-using-query-parameters
387            """
388            if not self._match(TokenType.L_BRACE):
389                return None
390
391            this = self._parse_id_var()
392            self._match(TokenType.COLON)
393            kind = self._parse_types(check_func=False, allow_identifiers=False) or (
394                self._match_text_seq("IDENTIFIER") and "Identifier"
395            )
396
397            if not kind:
398                self.raise_error("Expecting a placeholder type or 'Identifier' for tables")
399            elif not self._match(TokenType.R_BRACE):
400                self.raise_error("Expecting }")
401
402            return self.expression(exp.Placeholder, this=this, kind=kind)
403
404        def _parse_in(self, this: t.Optional[exp.Expression], is_global: bool = False) -> exp.In:
405            this = super()._parse_in(this)
406            this.set("is_global", is_global)
407            return this
408
409        def _parse_table(
410            self,
411            schema: bool = False,
412            joins: bool = False,
413            alias_tokens: t.Optional[t.Collection[TokenType]] = None,
414            parse_bracket: bool = False,
415            is_db_reference: bool = False,
416            parse_partition: bool = False,
417        ) -> t.Optional[exp.Expression]:
418            this = super()._parse_table(
419                schema=schema,
420                joins=joins,
421                alias_tokens=alias_tokens,
422                parse_bracket=parse_bracket,
423                is_db_reference=is_db_reference,
424            )
425
426            if self._match(TokenType.FINAL):
427                this = self.expression(exp.Final, this=this)
428
429            return this
430
431        def _parse_position(self, haystack_first: bool = False) -> exp.StrPosition:
432            return super()._parse_position(haystack_first=True)
433
434        # https://clickhouse.com/docs/en/sql-reference/statements/select/with/
435        def _parse_cte(self) -> exp.CTE:
436            # WITH <identifier> AS <subquery expression>
437            cte: t.Optional[exp.CTE] = self._try_parse(super()._parse_cte)
438
439            if not cte:
440                # WITH <expression> AS <identifier>
441                cte = self.expression(
442                    exp.CTE,
443                    this=self._parse_conjunction(),
444                    alias=self._parse_table_alias(),
445                    scalar=True,
446                )
447
448            return cte
449
450        def _parse_join_parts(
451            self,
452        ) -> t.Tuple[t.Optional[Token], t.Optional[Token], t.Optional[Token]]:
453            is_global = self._match(TokenType.GLOBAL) and self._prev
454            kind_pre = self._match_set(self.JOIN_KINDS, advance=False) and self._prev
455
456            if kind_pre:
457                kind = self._match_set(self.JOIN_KINDS) and self._prev
458                side = self._match_set(self.JOIN_SIDES) and self._prev
459                return is_global, side, kind
460
461            return (
462                is_global,
463                self._match_set(self.JOIN_SIDES) and self._prev,
464                self._match_set(self.JOIN_KINDS) and self._prev,
465            )
466
467        def _parse_join(
468            self, skip_join_token: bool = False, parse_bracket: bool = False
469        ) -> t.Optional[exp.Join]:
470            join = super()._parse_join(skip_join_token=skip_join_token, parse_bracket=True)
471            if join:
472                join.set("global", join.args.pop("method", None))
473
474            return join
475
476        def _parse_function(
477            self,
478            functions: t.Optional[t.Dict[str, t.Callable]] = None,
479            anonymous: bool = False,
480            optional_parens: bool = True,
481            any_token: bool = False,
482        ) -> t.Optional[exp.Expression]:
483            expr = super()._parse_function(
484                functions=functions,
485                anonymous=anonymous,
486                optional_parens=optional_parens,
487                any_token=any_token,
488            )
489
490            func = expr.this if isinstance(expr, exp.Window) else expr
491
492            # Aggregate functions can be split in 2 parts: <func_name><suffix>
493            parts = (
494                self.AGG_FUNC_MAPPING.get(func.this) if isinstance(func, exp.Anonymous) else None
495            )
496
497            if parts:
498                params = self._parse_func_params(func)
499
500                kwargs = {
501                    "this": func.this,
502                    "expressions": func.expressions,
503                }
504                if parts[1]:
505                    kwargs["parts"] = parts
506                    exp_class = exp.CombinedParameterizedAgg if params else exp.CombinedAggFunc
507                else:
508                    exp_class = exp.ParameterizedAgg if params else exp.AnonymousAggFunc
509
510                kwargs["exp_class"] = exp_class
511                if params:
512                    kwargs["params"] = params
513
514                func = self.expression(**kwargs)
515
516                if isinstance(expr, exp.Window):
517                    # The window's func was parsed as Anonymous in base parser, fix its
518                    # type to be CH style CombinedAnonymousAggFunc / AnonymousAggFunc
519                    expr.set("this", func)
520                elif params:
521                    # Params have blocked super()._parse_function() from parsing the following window
522                    # (if that exists) as they're standing between the function call and the window spec
523                    expr = self._parse_window(func)
524                else:
525                    expr = func
526
527            return expr
528
529        def _parse_func_params(
530            self, this: t.Optional[exp.Func] = None
531        ) -> t.Optional[t.List[exp.Expression]]:
532            if self._match_pair(TokenType.R_PAREN, TokenType.L_PAREN):
533                return self._parse_csv(self._parse_lambda)
534
535            if self._match(TokenType.L_PAREN):
536                params = self._parse_csv(self._parse_lambda)
537                self._match_r_paren(this)
538                return params
539
540            return None
541
542        def _parse_quantile(self) -> exp.Quantile:
543            this = self._parse_lambda()
544            params = self._parse_func_params()
545            if params:
546                return self.expression(exp.Quantile, this=params[0], quantile=this)
547            return self.expression(exp.Quantile, this=this, quantile=exp.Literal.number(0.5))
548
549        def _parse_wrapped_id_vars(self, optional: bool = False) -> t.List[exp.Expression]:
550            return super()._parse_wrapped_id_vars(optional=True)
551
552        def _parse_primary_key(
553            self, wrapped_optional: bool = False, in_props: bool = False
554        ) -> exp.PrimaryKeyColumnConstraint | exp.PrimaryKey:
555            return super()._parse_primary_key(
556                wrapped_optional=wrapped_optional or in_props, in_props=in_props
557            )
558
559        def _parse_on_property(self) -> t.Optional[exp.Expression]:
560            index = self._index
561            if self._match_text_seq("CLUSTER"):
562                this = self._parse_id_var()
563                if this:
564                    return self.expression(exp.OnCluster, this=this)
565                else:
566                    self._retreat(index)
567            return None
568
569        def _parse_index_constraint(
570            self, kind: t.Optional[str] = None
571        ) -> exp.IndexColumnConstraint:
572            # INDEX name1 expr TYPE type1(args) GRANULARITY value
573            this = self._parse_id_var()
574            expression = self._parse_conjunction()
575
576            index_type = self._match_text_seq("TYPE") and (
577                self._parse_function() or self._parse_var()
578            )
579
580            granularity = self._match_text_seq("GRANULARITY") and self._parse_term()
581
582            return self.expression(
583                exp.IndexColumnConstraint,
584                this=this,
585                expression=expression,
586                index_type=index_type,
587                granularity=granularity,
588            )
589
590        def _parse_partition(self) -> t.Optional[exp.Partition]:
591            # https://clickhouse.com/docs/en/sql-reference/statements/alter/partition#how-to-set-partition-expression
592            if not self._match(TokenType.PARTITION):
593                return None
594
595            if self._match_text_seq("ID"):
596                # Corresponds to the PARTITION ID <string_value> syntax
597                expressions: t.List[exp.Expression] = [
598                    self.expression(exp.PartitionId, this=self._parse_string())
599                ]
600            else:
601                expressions = self._parse_expressions()
602
603            return self.expression(exp.Partition, expressions=expressions)
604
605        def _parse_alter_table_replace(self) -> t.Optional[exp.Expression]:
606            partition = self._parse_partition()
607
608            if not partition or not self._match(TokenType.FROM):
609                return None
610
611            return self.expression(
612                exp.ReplacePartition, expression=partition, source=self._parse_table_parts()
613            )

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_UNION = 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_CONTAINS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ArrayContains'>>, '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 ClickHouse.Parser.<lambda>>, 'DATEDIFF': <function ClickHouse.Parser.<lambda>>, 'DATE_DIFF': <function ClickHouse.Parser.<lambda>>, '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': <bound method Func.from_arg_list of <class 'sqlglot.expressions.DateSub'>>, '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_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'>>, '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': <bound method Func.from_arg_list of <class 'sqlglot.expressions.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_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'>>, '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': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Lower'>>, 'LCASE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.Lower'>>, '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'>>, '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_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': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimestampAdd'>>, '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': <bound method Func.from_arg_list of <class 'sqlglot.expressions.TimestampSub'>>, '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'>>, 'UPPER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.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>, '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 ClickHouse.Parser.<lambda>>, 'DATE_FORMAT': <function _build_date_format>, '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'>>, 'UNIQ': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ApproxDistinct'>>, 'SHA256': <function ClickHouse.Parser.<lambda>>, 'SHA512': <function ClickHouse.Parser.<lambda>>}
AGG_FUNCTIONS = {'count', 'rankCorr', 'entropy', 'skewSamp', 'anyHeavy', 'maxIntersections', 'exponentialMovingAverage', 'quantilesBFloat16', 'quantiles', 'quantilesTDigest', 'quantilesExact', 'studentTTest', 'avg', 'quantileExactHigh', 'quantileExactLow', 'simpleLinearRegression', 'groupBitXor', 'histogram', 'covarPop', 'stochasticLinearRegression', 'meanZTest', 'cramersVBiasCorrected', 'argMin', 'quantileInterpolatedWeighted', 'groupArrayMovingSum', 'quantilesDeterministic', 'theilsU', 'groupUniqArray', 'quantileExact', 'uniqExact', 'quantileBFloat16', 'exponentialTimeDecayedAvg', 'deltaSum', 'maxMap', 'categoricalInformationValue', 'groupBitOr', 'groupArrayInsertAt', 'sum', 'sumMap', 'skewPop', 'uniqHLL12', 'sumCount', 'sumKahan', 'groupBitmap', 'quantileGK', 'quantilesTimingWeighted', 'mannWhitneyUTest', 'sumWithOverflow', 'welchTTest', 'quantilesBFloat16Weighted', 'quantilesExactWeighted', 'maxIntersectionsPosition', 'stochasticLogisticRegression', 'uniqCombined', 'avgWeighted', 'windowFunnel', 'quantilesExactHigh', 'groupBitmapAnd', 'topKWeighted', 'min', 'contingency', 'sequenceCount', 'quantilesGK', 'last_value', 'uniqTheta', 'sequenceNextNode', 'deltaSumTimestamp', 'groupArrayMovingAvg', 'quantileTimingWeighted', 'quantileDeterministic', 'quantileTDigest', 'groupArraySample', 'argMax', 'kurtSamp', 'varSamp', 'intervalLengthSum', 'uniqUpTo', 'kolmogorovSmirnovTest', 'quantileTDigestWeighted', 'stddevSamp', 'quantile', 'covarSamp', 'boundingRatio', 'uniq', 'sparkBar', 'anyLast', 'groupArrayLast', 'quantileTiming', 'retention', 'kurtPop', 'quantileBFloat16Weighted', 'varPop', 'corr', 'sequenceMatch', 'largestTriangleThreeBuckets', 'any', 'cramersV', 'groupBitmapXor', 'quantilesTDigestWeighted', 'minMap', 'groupBitAnd', 'groupBitmapOr', 'median', 'stddevPop', 'uniqCombined64', 'quantilesInterpolatedWeighted', 'max', 'quantileExactWeighted', 'quantilesExactLow', 'groupArray', 'quantilesTiming', 'topK', 'first_value'}
AGG_FUNCTIONS_SUFFIXES = ['If', 'Array', 'ArrayIf', 'Map', 'SimpleState', 'State', 'Merge', 'MergeState', 'ForEach', 'Distinct', 'OrDefault', 'OrNull', 'Resample', 'ArgMin', 'ArgMax']
FUNC_TOKENS = {<TokenType.NULL: 'NULL'>, <TokenType.GLOB: 'GLOB'>, <TokenType.BOOLEAN: 'BOOLEAN'>, <TokenType.LONGTEXT: 'LONGTEXT'>, <TokenType.ROW: 'ROW'>, <TokenType.FORMAT: 'FORMAT'>, <TokenType.XML: 'XML'>, <TokenType.LOWCARDINALITY: 'LOWCARDINALITY'>, <TokenType.INET: 'INET'>, <TokenType.CURRENT_DATETIME: 'CURRENT_DATETIME'>, <TokenType.PRIMARY_KEY: 'PRIMARY_KEY'>, <TokenType.ENUM16: 'ENUM16'>, <TokenType.IPADDRESS: 'IPADDRESS'>, <TokenType.ARRAY: 'ARRAY'>, <TokenType.DATETIME: 'DATETIME'>, <TokenType.GEOMETRY: 'GEOMETRY'>, <TokenType.ANY: 'ANY'>, <TokenType.STRUCT: 'STRUCT'>, <TokenType.IDENTIFIER: 'IDENTIFIER'>, <TokenType.MERGE: 'MERGE'>, <TokenType.TSTZRANGE: 'TSTZRANGE'>, <TokenType.LIKE: 'LIKE'>, <TokenType.ENUM: 'ENUM'>, <TokenType.IPV6: 'IPV6'>, <TokenType.ILIKE: 'ILIKE'>, <TokenType.DATETIME64: 'DATETIME64'>, <TokenType.NESTED: 'NESTED'>, <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, <TokenType.HLLSKETCH: 'HLLSKETCH'>, <TokenType.COLLATE: 'COLLATE'>, <TokenType.FIRST: 'FIRST'>, <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, <TokenType.DATE: 'DATE'>, <TokenType.TIMETZ: 'TIMETZ'>, <TokenType.UDECIMAL: 'UDECIMAL'>, <TokenType.VARBINARY: 'VARBINARY'>, <TokenType.RLIKE: 'RLIKE'>, <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, <TokenType.ALL: 'ALL'>, <TokenType.DATE32: 'DATE32'>, <TokenType.UTINYINT: 'UTINYINT'>, <TokenType.TIMESTAMP: 'TIMESTAMP'>, <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, <TokenType.UUID: 'UUID'>, <TokenType.INT8RANGE: 'INT8RANGE'>, <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, <TokenType.ROWVERSION: 'ROWVERSION'>, <TokenType.INSERT: 'INSERT'>, <TokenType.REPLACE: 'REPLACE'>, <TokenType.PSEUDO_TYPE: 'PSEUDO_TYPE'>, <TokenType.NCHAR: 'NCHAR'>, <TokenType.LONGBLOB: 'LONGBLOB'>, <TokenType.TDIGEST: 'TDIGEST'>, <TokenType.BINARY: 'BINARY'>, <TokenType.TIMESTAMP_S: 'TIMESTAMP_S'>, <TokenType.VARCHAR: 'VARCHAR'>, <TokenType.COMMAND: 'COMMAND'>, <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, <TokenType.UNIQUEIDENTIFIER: 'UNIQUEIDENTIFIER'>, <TokenType.VAR: 'VAR'>, <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, <TokenType.DOUBLE: 'DOUBLE'>, <TokenType.IPPREFIX: 'IPPREFIX'>, <TokenType.INT4RANGE: 'INT4RANGE'>, <TokenType.SIMPLEAGGREGATEFUNCTION: 'SIMPLEAGGREGATEFUNCTION'>, <TokenType.CURRENT_USER: 'CURRENT_USER'>, <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, <TokenType.UINT256: 'UINT256'>, <TokenType.CHAR: 'CHAR'>, <TokenType.BIGINT: 'BIGINT'>, <TokenType.SMALLSERIAL: 'SMALLSERIAL'>, <TokenType.SEQUENCE: 'SEQUENCE'>, <TokenType.INT128: 'INT128'>, <TokenType.HSTORE: 'HSTORE'>, <TokenType.USMALLINT: 'USMALLINT'>, <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, <TokenType.MEDIUMINT: 'MEDIUMINT'>, <TokenType.SMALLMONEY: 'SMALLMONEY'>, <TokenType.EXISTS: 'EXISTS'>, <TokenType.WINDOW: 'WINDOW'>, <TokenType.NUMRANGE: 'NUMRANGE'>, <TokenType.ENUM8: 'ENUM8'>, <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, <TokenType.NAME: 'NAME'>, <TokenType.FLOAT: 'FLOAT'>, <TokenType.NVARCHAR: 'NVARCHAR'>, <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, <TokenType.TIMESTAMP_NS: 'TIMESTAMP_NS'>, <TokenType.XOR: 'XOR'>, <TokenType.DATERANGE: 'DATERANGE'>, <TokenType.SMALLINT: 'SMALLINT'>, <TokenType.OBJECT: 'OBJECT'>, <TokenType.BIGSERIAL: 'BIGSERIAL'>, <TokenType.UBIGINT: 'UBIGINT'>, <TokenType.UNKNOWN: 'UNKNOWN'>, <TokenType.ISNULL: 'ISNULL'>, <TokenType.BPCHAR: 'BPCHAR'>, <TokenType.TIME: 'TIME'>, <TokenType.TABLE: 'TABLE'>, <TokenType.UINT: 'UINT'>, <TokenType.TEXT: 'TEXT'>, <TokenType.TINYINT: 'TINYINT'>, <TokenType.UMEDIUMINT: 'UMEDIUMINT'>, <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, <TokenType.TIMESTAMP_MS: 'TIMESTAMP_MS'>, <TokenType.DECIMAL: 'DECIMAL'>, <TokenType.TRUNCATE: 'TRUNCATE'>, <TokenType.MONEY: 'MONEY'>, <TokenType.BIT: 'BIT'>, <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, <TokenType.UNNEST: 'UNNEST'>, <TokenType.NULLABLE: 'NULLABLE'>, <TokenType.YEAR: 'YEAR'>, <TokenType.SUPER: 'SUPER'>, <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, <TokenType.INTERVAL: 'INTERVAL'>, <TokenType.IMAGE: 'IMAGE'>, <TokenType.AGGREGATEFUNCTION: 'AGGREGATEFUNCTION'>, <TokenType.JSONB: 'JSONB'>, <TokenType.MAP: 'MAP'>, <TokenType.LEFT: 'LEFT'>, <TokenType.USERDEFINED: 'USERDEFINED'>, <TokenType.TINYTEXT: 'TINYTEXT'>, <TokenType.TSRANGE: 'TSRANGE'>, <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, <TokenType.RANGE: 'RANGE'>, <TokenType.JSON: 'JSON'>, <TokenType.SERIAL: 'SERIAL'>, <TokenType.RIGHT: 'RIGHT'>, <TokenType.TINYBLOB: 'TINYBLOB'>, <TokenType.VARIANT: 'VARIANT'>, <TokenType.INDEX: 'INDEX'>, <TokenType.UINT128: 'UINT128'>, <TokenType.FIXEDSTRING: 'FIXEDSTRING'>, <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, <TokenType.INT: 'INT'>, <TokenType.OBJECT_IDENTIFIER: 'OBJECT_IDENTIFIER'>, <TokenType.SOME: 'SOME'>, <TokenType.SET: 'SET'>, <TokenType.IPV4: 'IPV4'>, <TokenType.FILTER: 'FILTER'>, <TokenType.INT256: 'INT256'>, <TokenType.OFFSET: 'OFFSET'>}
AGG_FUNC_MAPPING = {'countIf': ('count', 'If'), 'rankCorrIf': ('rankCorr', 'If'), 'entropyIf': ('entropy', 'If'), 'skewSampIf': ('skewSamp', 'If'), 'anyHeavyIf': ('anyHeavy', 'If'), 'maxIntersectionsIf': ('maxIntersections', 'If'), 'exponentialMovingAverageIf': ('exponentialMovingAverage', 'If'), 'quantilesBFloat16If': ('quantilesBFloat16', 'If'), 'quantilesIf': ('quantiles', 'If'), 'quantilesTDigestIf': ('quantilesTDigest', 'If'), 'quantilesExactIf': ('quantilesExact', 'If'), 'studentTTestIf': ('studentTTest', 'If'), 'avgIf': ('avg', 'If'), 'quantileExactHighIf': ('quantileExactHigh', 'If'), 'quantileExactLowIf': ('quantileExactLow', 'If'), 'simpleLinearRegressionIf': ('simpleLinearRegression', 'If'), 'groupBitXorIf': ('groupBitXor', 'If'), 'histogramIf': ('histogram', 'If'), 'covarPopIf': ('covarPop', 'If'), 'stochasticLinearRegressionIf': ('stochasticLinearRegression', 'If'), 'meanZTestIf': ('meanZTest', 'If'), 'cramersVBiasCorrectedIf': ('cramersVBiasCorrected', 'If'), 'argMinIf': ('argMin', 'If'), 'quantileInterpolatedWeightedIf': ('quantileInterpolatedWeighted', 'If'), 'groupArrayMovingSumIf': ('groupArrayMovingSum', 'If'), 'quantilesDeterministicIf': ('quantilesDeterministic', 'If'), 'theilsUIf': ('theilsU', 'If'), 'groupUniqArrayIf': ('groupUniqArray', 'If'), 'quantileExactIf': ('quantileExact', 'If'), 'uniqExactIf': ('uniqExact', 'If'), 'quantileBFloat16If': ('quantileBFloat16', 'If'), 'exponentialTimeDecayedAvgIf': ('exponentialTimeDecayedAvg', 'If'), 'deltaSumIf': ('deltaSum', 'If'), 'maxMapIf': ('maxMap', 'If'), 'categoricalInformationValueIf': ('categoricalInformationValue', 'If'), 'groupBitOrIf': ('groupBitOr', 'If'), 'groupArrayInsertAtIf': ('groupArrayInsertAt', 'If'), 'sumIf': ('sum', 'If'), 'sumMapIf': ('sumMap', 'If'), 'skewPopIf': ('skewPop', 'If'), 'uniqHLL12If': ('uniqHLL12', 'If'), 'sumCountIf': ('sumCount', 'If'), 'sumKahanIf': ('sumKahan', 'If'), 'groupBitmapIf': ('groupBitmap', 'If'), 'quantileGKIf': ('quantileGK', 'If'), 'quantilesTimingWeightedIf': ('quantilesTimingWeighted', 'If'), 'mannWhitneyUTestIf': ('mannWhitneyUTest', 'If'), 'sumWithOverflowIf': ('sumWithOverflow', 'If'), 'welchTTestIf': ('welchTTest', 'If'), 'quantilesBFloat16WeightedIf': ('quantilesBFloat16Weighted', 'If'), 'quantilesExactWeightedIf': ('quantilesExactWeighted', 'If'), 'maxIntersectionsPositionIf': ('maxIntersectionsPosition', 'If'), 'stochasticLogisticRegressionIf': ('stochasticLogisticRegression', 'If'), 'uniqCombinedIf': ('uniqCombined', 'If'), 'avgWeightedIf': ('avgWeighted', 'If'), 'windowFunnelIf': ('windowFunnel', 'If'), 'quantilesExactHighIf': ('quantilesExactHigh', 'If'), 'groupBitmapAndIf': ('groupBitmapAnd', 'If'), 'topKWeightedIf': ('topKWeighted', 'If'), 'minIf': ('min', 'If'), 'contingencyIf': ('contingency', 'If'), 'sequenceCountIf': ('sequenceCount', 'If'), 'quantilesGKIf': ('quantilesGK', 'If'), 'last_valueIf': ('last_value', 'If'), 'uniqThetaIf': ('uniqTheta', 'If'), 'sequenceNextNodeIf': ('sequenceNextNode', 'If'), 'deltaSumTimestampIf': ('deltaSumTimestamp', 'If'), 'groupArrayMovingAvgIf': ('groupArrayMovingAvg', 'If'), 'quantileTimingWeightedIf': ('quantileTimingWeighted', 'If'), 'quantileDeterministicIf': ('quantileDeterministic', 'If'), 'quantileTDigestIf': ('quantileTDigest', 'If'), 'groupArraySampleIf': ('groupArraySample', 'If'), 'argMaxIf': ('argMax', 'If'), 'kurtSampIf': ('kurtSamp', 'If'), 'varSampIf': ('varSamp', 'If'), 'intervalLengthSumIf': ('intervalLengthSum', 'If'), 'uniqUpToIf': ('uniqUpTo', 'If'), 'kolmogorovSmirnovTestIf': ('kolmogorovSmirnovTest', 'If'), 'quantileTDigestWeightedIf': ('quantileTDigestWeighted', 'If'), 'stddevSampIf': ('stddevSamp', 'If'), 'quantileIf': ('quantile', 'If'), 'covarSampIf': ('covarSamp', 'If'), 'boundingRatioIf': ('boundingRatio', 'If'), 'uniqIf': ('uniq', 'If'), 'sparkBarIf': ('sparkBar', 'If'), 'anyLastIf': ('anyLast', 'If'), 'groupArrayLastIf': ('groupArrayLast', 'If'), 'quantileTimingIf': ('quantileTiming', 'If'), 'retentionIf': ('retention', 'If'), 'kurtPopIf': ('kurtPop', 'If'), 'quantileBFloat16WeightedIf': ('quantileBFloat16Weighted', 'If'), 'varPopIf': ('varPop', 'If'), 'corrIf': ('corr', 'If'), 'sequenceMatchIf': ('sequenceMatch', 'If'), 'largestTriangleThreeBucketsIf': ('largestTriangleThreeBuckets', 'If'), 'anyIf': ('any', 'If'), 'cramersVIf': ('cramersV', 'If'), 'groupBitmapXorIf': ('groupBitmapXor', 'If'), 'quantilesTDigestWeightedIf': ('quantilesTDigestWeighted', 'If'), 'minMapIf': ('minMap', 'If'), 'groupBitAndIf': ('groupBitAnd', 'If'), 'groupBitmapOrIf': ('groupBitmapOr', 'If'), 'medianIf': ('median', 'If'), 'stddevPopIf': ('stddevPop', 'If'), 'uniqCombined64If': ('uniqCombined64', 'If'), 'quantilesInterpolatedWeightedIf': ('quantilesInterpolatedWeighted', 'If'), 'maxIf': ('max', 'If'), 'quantileExactWeightedIf': ('quantileExactWeighted', 'If'), 'quantilesExactLowIf': ('quantilesExactLow', 'If'), 'groupArrayIf': ('groupArray', 'If'), 'quantilesTimingIf': ('quantilesTiming', 'If'), 'topKIf': ('topK', 'If'), 'first_valueIf': ('first_value', 'If'), 'countArray': ('count', 'Array'), 'rankCorrArray': ('rankCorr', 'Array'), 'entropyArray': ('entropy', 'Array'), 'skewSampArray': ('skewSamp', 'Array'), 'anyHeavyArray': ('anyHeavy', 'Array'), 'maxIntersectionsArray': ('maxIntersections', 'Array'), 'exponentialMovingAverageArray': ('exponentialMovingAverage', 'Array'), 'quantilesBFloat16Array': ('quantilesBFloat16', 'Array'), 'quantilesArray': ('quantiles', 'Array'), 'quantilesTDigestArray': ('quantilesTDigest', 'Array'), 'quantilesExactArray': ('quantilesExact', 'Array'), 'studentTTestArray': ('studentTTest', 'Array'), 'avgArray': ('avg', 'Array'), 'quantileExactHighArray': ('quantileExactHigh', 'Array'), 'quantileExactLowArray': ('quantileExactLow', 'Array'), 'simpleLinearRegressionArray': ('simpleLinearRegression', 'Array'), 'groupBitXorArray': ('groupBitXor', 'Array'), 'histogramArray': ('histogram', 'Array'), 'covarPopArray': ('covarPop', 'Array'), 'stochasticLinearRegressionArray': ('stochasticLinearRegression', 'Array'), 'meanZTestArray': ('meanZTest', 'Array'), 'cramersVBiasCorrectedArray': ('cramersVBiasCorrected', 'Array'), 'argMinArray': ('argMin', 'Array'), 'quantileInterpolatedWeightedArray': ('quantileInterpolatedWeighted', 'Array'), 'groupArrayMovingSumArray': ('groupArrayMovingSum', 'Array'), 'quantilesDeterministicArray': ('quantilesDeterministic', 'Array'), 'theilsUArray': ('theilsU', 'Array'), 'groupUniqArrayArray': ('groupUniqArray', 'Array'), 'quantileExactArray': ('quantileExact', 'Array'), 'uniqExactArray': ('uniqExact', 'Array'), 'quantileBFloat16Array': ('quantileBFloat16', 'Array'), 'exponentialTimeDecayedAvgArray': ('exponentialTimeDecayedAvg', 'Array'), 'deltaSumArray': ('deltaSum', 'Array'), 'maxMapArray': ('maxMap', 'Array'), 'categoricalInformationValueArray': ('categoricalInformationValue', 'Array'), 'groupBitOrArray': ('groupBitOr', 'Array'), 'groupArrayInsertAtArray': ('groupArrayInsertAt', 'Array'), 'sumArray': ('sum', 'Array'), 'sumMapArray': ('sumMap', 'Array'), 'skewPopArray': ('skewPop', 'Array'), 'uniqHLL12Array': ('uniqHLL12', 'Array'), 'sumCountArray': ('sumCount', 'Array'), 'sumKahanArray': ('sumKahan', 'Array'), 'groupBitmapArray': ('groupBitmap', 'Array'), 'quantileGKArray': ('quantileGK', 'Array'), 'quantilesTimingWeightedArray': ('quantilesTimingWeighted', 'Array'), 'mannWhitneyUTestArray': ('mannWhitneyUTest', 'Array'), 'sumWithOverflowArray': ('sumWithOverflow', 'Array'), 'welchTTestArray': ('welchTTest', 'Array'), 'quantilesBFloat16WeightedArray': ('quantilesBFloat16Weighted', 'Array'), 'quantilesExactWeightedArray': ('quantilesExactWeighted', 'Array'), 'maxIntersectionsPositionArray': ('maxIntersectionsPosition', 'Array'), 'stochasticLogisticRegressionArray': ('stochasticLogisticRegression', 'Array'), 'uniqCombinedArray': ('uniqCombined', 'Array'), 'avgWeightedArray': ('avgWeighted', 'Array'), 'windowFunnelArray': ('windowFunnel', 'Array'), 'quantilesExactHighArray': ('quantilesExactHigh', 'Array'), 'groupBitmapAndArray': ('groupBitmapAnd', 'Array'), 'topKWeightedArray': ('topKWeighted', 'Array'), 'minArray': ('min', 'Array'), 'contingencyArray': ('contingency', 'Array'), 'sequenceCountArray': ('sequenceCount', 'Array'), 'quantilesGKArray': ('quantilesGK', 'Array'), 'last_valueArray': ('last_value', 'Array'), 'uniqThetaArray': ('uniqTheta', 'Array'), 'sequenceNextNodeArray': ('sequenceNextNode', 'Array'), 'deltaSumTimestampArray': ('deltaSumTimestamp', 'Array'), 'groupArrayMovingAvgArray': ('groupArrayMovingAvg', 'Array'), 'quantileTimingWeightedArray': ('quantileTimingWeighted', 'Array'), 'quantileDeterministicArray': ('quantileDeterministic', 'Array'), 'quantileTDigestArray': ('quantileTDigest', 'Array'), 'groupArraySampleArray': ('groupArraySample', 'Array'), 'argMaxArray': ('argMax', 'Array'), 'kurtSampArray': ('kurtSamp', 'Array'), 'varSampArray': ('varSamp', 'Array'), 'intervalLengthSumArray': ('intervalLengthSum', 'Array'), 'uniqUpToArray': ('uniqUpTo', 'Array'), 'kolmogorovSmirnovTestArray': ('kolmogorovSmirnovTest', 'Array'), 'quantileTDigestWeightedArray': ('quantileTDigestWeighted', 'Array'), 'stddevSampArray': ('stddevSamp', 'Array'), 'quantileArray': ('quantile', 'Array'), 'covarSampArray': ('covarSamp', 'Array'), 'boundingRatioArray': ('boundingRatio', 'Array'), 'uniqArray': ('uniq', 'Array'), 'sparkBarArray': ('sparkBar', 'Array'), 'anyLastArray': ('anyLast', 'Array'), 'groupArrayLastArray': ('groupArrayLast', 'Array'), 'quantileTimingArray': ('quantileTiming', 'Array'), 'retentionArray': ('retention', 'Array'), 'kurtPopArray': ('kurtPop', 'Array'), 'quantileBFloat16WeightedArray': ('quantileBFloat16Weighted', 'Array'), 'varPopArray': ('varPop', 'Array'), 'corrArray': ('corr', 'Array'), 'sequenceMatchArray': ('sequenceMatch', 'Array'), 'largestTriangleThreeBucketsArray': ('largestTriangleThreeBuckets', 'Array'), 'anyArray': ('any', 'Array'), 'cramersVArray': ('cramersV', 'Array'), 'groupBitmapXorArray': ('groupBitmapXor', 'Array'), 'quantilesTDigestWeightedArray': ('quantilesTDigestWeighted', 'Array'), 'minMapArray': ('minMap', 'Array'), 'groupBitAndArray': ('groupBitAnd', 'Array'), 'groupBitmapOrArray': ('groupBitmapOr', 'Array'), 'medianArray': ('median', 'Array'), 'stddevPopArray': ('stddevPop', 'Array'), 'uniqCombined64Array': ('uniqCombined64', 'Array'), 'quantilesInterpolatedWeightedArray': ('quantilesInterpolatedWeighted', 'Array'), 'maxArray': ('max', 'Array'), 'quantileExactWeightedArray': ('quantileExactWeighted', 'Array'), 'quantilesExactLowArray': ('quantilesExactLow', 'Array'), 'groupArrayArray': ('groupArray', 'Array'), 'quantilesTimingArray': ('quantilesTiming', 'Array'), 'topKArray': ('topK', 'Array'), 'first_valueArray': ('first_value', 'Array'), 'countArrayIf': ('count', 'ArrayIf'), 'rankCorrArrayIf': ('rankCorr', 'ArrayIf'), 'entropyArrayIf': ('entropy', 'ArrayIf'), 'skewSampArrayIf': ('skewSamp', 'ArrayIf'), 'anyHeavyArrayIf': ('anyHeavy', 'ArrayIf'), 'maxIntersectionsArrayIf': ('maxIntersections', 'ArrayIf'), 'exponentialMovingAverageArrayIf': ('exponentialMovingAverage', 'ArrayIf'), 'quantilesBFloat16ArrayIf': ('quantilesBFloat16', 'ArrayIf'), 'quantilesArrayIf': ('quantiles', 'ArrayIf'), 'quantilesTDigestArrayIf': ('quantilesTDigest', 'ArrayIf'), 'quantilesExactArrayIf': ('quantilesExact', 'ArrayIf'), 'studentTTestArrayIf': ('studentTTest', 'ArrayIf'), 'avgArrayIf': ('avg', 'ArrayIf'), 'quantileExactHighArrayIf': ('quantileExactHigh', 'ArrayIf'), 'quantileExactLowArrayIf': ('quantileExactLow', 'ArrayIf'), 'simpleLinearRegressionArrayIf': ('simpleLinearRegression', 'ArrayIf'), 'groupBitXorArrayIf': ('groupBitXor', 'ArrayIf'), 'histogramArrayIf': ('histogram', 'ArrayIf'), 'covarPopArrayIf': ('covarPop', 'ArrayIf'), 'stochasticLinearRegressionArrayIf': ('stochasticLinearRegression', 'ArrayIf'), 'meanZTestArrayIf': ('meanZTest', 'ArrayIf'), 'cramersVBiasCorrectedArrayIf': ('cramersVBiasCorrected', 'ArrayIf'), 'argMinArrayIf': ('argMin', 'ArrayIf'), 'quantileInterpolatedWeightedArrayIf': ('quantileInterpolatedWeighted', 'ArrayIf'), 'groupArrayMovingSumArrayIf': ('groupArrayMovingSum', 'ArrayIf'), 'quantilesDeterministicArrayIf': ('quantilesDeterministic', 'ArrayIf'), 'theilsUArrayIf': ('theilsU', 'ArrayIf'), 'groupUniqArrayArrayIf': ('groupUniqArray', 'ArrayIf'), 'quantileExactArrayIf': ('quantileExact', 'ArrayIf'), 'uniqExactArrayIf': ('uniqExact', 'ArrayIf'), 'quantileBFloat16ArrayIf': ('quantileBFloat16', 'ArrayIf'), 'exponentialTimeDecayedAvgArrayIf': ('exponentialTimeDecayedAvg', 'ArrayIf'), 'deltaSumArrayIf': ('deltaSum', 'ArrayIf'), 'maxMapArrayIf': ('maxMap', 'ArrayIf'), 'categoricalInformationValueArrayIf': ('categoricalInformationValue', 'ArrayIf'), 'groupBitOrArrayIf': ('groupBitOr', 'ArrayIf'), 'groupArrayInsertAtArrayIf': ('groupArrayInsertAt', 'ArrayIf'), 'sumArrayIf': ('sum', 'ArrayIf'), 'sumMapArrayIf': ('sumMap', 'ArrayIf'), 'skewPopArrayIf': ('skewPop', 'ArrayIf'), 'uniqHLL12ArrayIf': ('uniqHLL12', 'ArrayIf'), 'sumCountArrayIf': ('sumCount', 'ArrayIf'), 'sumKahanArrayIf': ('sumKahan', 'ArrayIf'), 'groupBitmapArrayIf': ('groupBitmap', 'ArrayIf'), 'quantileGKArrayIf': ('quantileGK', 'ArrayIf'), 'quantilesTimingWeightedArrayIf': ('quantilesTimingWeighted', 'ArrayIf'), 'mannWhitneyUTestArrayIf': ('mannWhitneyUTest', 'ArrayIf'), 'sumWithOverflowArrayIf': ('sumWithOverflow', 'ArrayIf'), 'welchTTestArrayIf': ('welchTTest', 'ArrayIf'), 'quantilesBFloat16WeightedArrayIf': ('quantilesBFloat16Weighted', 'ArrayIf'), 'quantilesExactWeightedArrayIf': ('quantilesExactWeighted', 'ArrayIf'), 'maxIntersectionsPositionArrayIf': ('maxIntersectionsPosition', 'ArrayIf'), 'stochasticLogisticRegressionArrayIf': ('stochasticLogisticRegression', 'ArrayIf'), 'uniqCombinedArrayIf': ('uniqCombined', 'ArrayIf'), 'avgWeightedArrayIf': ('avgWeighted', 'ArrayIf'), 'windowFunnelArrayIf': ('windowFunnel', 'ArrayIf'), 'quantilesExactHighArrayIf': ('quantilesExactHigh', 'ArrayIf'), 'groupBitmapAndArrayIf': ('groupBitmapAnd', 'ArrayIf'), 'topKWeightedArrayIf': ('topKWeighted', 'ArrayIf'), 'minArrayIf': ('min', 'ArrayIf'), 'contingencyArrayIf': ('contingency', 'ArrayIf'), 'sequenceCountArrayIf': ('sequenceCount', 'ArrayIf'), 'quantilesGKArrayIf': ('quantilesGK', 'ArrayIf'), 'last_valueArrayIf': ('last_value', 'ArrayIf'), 'uniqThetaArrayIf': ('uniqTheta', 'ArrayIf'), 'sequenceNextNodeArrayIf': ('sequenceNextNode', 'ArrayIf'), 'deltaSumTimestampArrayIf': ('deltaSumTimestamp', 'ArrayIf'), 'groupArrayMovingAvgArrayIf': ('groupArrayMovingAvg', 'ArrayIf'), 'quantileTimingWeightedArrayIf': ('quantileTimingWeighted', 'ArrayIf'), 'quantileDeterministicArrayIf': ('quantileDeterministic', 'ArrayIf'), 'quantileTDigestArrayIf': ('quantileTDigest', 'ArrayIf'), 'groupArraySampleArrayIf': ('groupArraySample', 'ArrayIf'), 'argMaxArrayIf': ('argMax', 'ArrayIf'), 'kurtSampArrayIf': ('kurtSamp', 'ArrayIf'), 'varSampArrayIf': ('varSamp', 'ArrayIf'), 'intervalLengthSumArrayIf': ('intervalLengthSum', 'ArrayIf'), 'uniqUpToArrayIf': ('uniqUpTo', 'ArrayIf'), 'kolmogorovSmirnovTestArrayIf': ('kolmogorovSmirnovTest', 'ArrayIf'), 'quantileTDigestWeightedArrayIf': ('quantileTDigestWeighted', 'ArrayIf'), 'stddevSampArrayIf': ('stddevSamp', 'ArrayIf'), 'quantileArrayIf': ('quantile', 'ArrayIf'), 'covarSampArrayIf': ('covarSamp', 'ArrayIf'), 'boundingRatioArrayIf': ('boundingRatio', 'ArrayIf'), 'uniqArrayIf': ('uniq', 'ArrayIf'), 'sparkBarArrayIf': ('sparkBar', 'ArrayIf'), 'anyLastArrayIf': ('anyLast', 'ArrayIf'), 'groupArrayLastArrayIf': ('groupArrayLast', 'ArrayIf'), 'quantileTimingArrayIf': ('quantileTiming', 'ArrayIf'), 'retentionArrayIf': ('retention', 'ArrayIf'), 'kurtPopArrayIf': ('kurtPop', 'ArrayIf'), 'quantileBFloat16WeightedArrayIf': ('quantileBFloat16Weighted', 'ArrayIf'), 'varPopArrayIf': ('varPop', 'ArrayIf'), 'corrArrayIf': ('corr', 'ArrayIf'), 'sequenceMatchArrayIf': ('sequenceMatch', 'ArrayIf'), 'largestTriangleThreeBucketsArrayIf': ('largestTriangleThreeBuckets', 'ArrayIf'), 'anyArrayIf': ('any', 'ArrayIf'), 'cramersVArrayIf': ('cramersV', 'ArrayIf'), 'groupBitmapXorArrayIf': ('groupBitmapXor', 'ArrayIf'), 'quantilesTDigestWeightedArrayIf': ('quantilesTDigestWeighted', 'ArrayIf'), 'minMapArrayIf': ('minMap', 'ArrayIf'), 'groupBitAndArrayIf': ('groupBitAnd', 'ArrayIf'), 'groupBitmapOrArrayIf': ('groupBitmapOr', 'ArrayIf'), 'medianArrayIf': ('median', 'ArrayIf'), 'stddevPopArrayIf': ('stddevPop', 'ArrayIf'), 'uniqCombined64ArrayIf': ('uniqCombined64', 'ArrayIf'), 'quantilesInterpolatedWeightedArrayIf': ('quantilesInterpolatedWeighted', 'ArrayIf'), 'maxArrayIf': ('max', 'ArrayIf'), 'quantileExactWeightedArrayIf': ('quantileExactWeighted', 'ArrayIf'), 'quantilesExactLowArrayIf': ('quantilesExactLow', 'ArrayIf'), 'groupArrayArrayIf': ('groupArray', 'ArrayIf'), 'quantilesTimingArrayIf': ('quantilesTiming', 'ArrayIf'), 'topKArrayIf': ('topK', 'ArrayIf'), 'first_valueArrayIf': ('first_value', 'ArrayIf'), 'countMap': ('count', 'Map'), 'rankCorrMap': ('rankCorr', 'Map'), 'entropyMap': ('entropy', 'Map'), 'skewSampMap': ('skewSamp', 'Map'), 'anyHeavyMap': ('anyHeavy', 'Map'), 'maxIntersectionsMap': ('maxIntersections', 'Map'), 'exponentialMovingAverageMap': ('exponentialMovingAverage', 'Map'), 'quantilesBFloat16Map': ('quantilesBFloat16', 'Map'), 'quantilesMap': ('quantiles', 'Map'), 'quantilesTDigestMap': ('quantilesTDigest', 'Map'), 'quantilesExactMap': ('quantilesExact', 'Map'), 'studentTTestMap': ('studentTTest', 'Map'), 'avgMap': ('avg', 'Map'), 'quantileExactHighMap': ('quantileExactHigh', 'Map'), 'quantileExactLowMap': ('quantileExactLow', 'Map'), 'simpleLinearRegressionMap': ('simpleLinearRegression', 'Map'), 'groupBitXorMap': ('groupBitXor', 'Map'), 'histogramMap': ('histogram', 'Map'), 'covarPopMap': ('covarPop', 'Map'), 'stochasticLinearRegressionMap': ('stochasticLinearRegression', 'Map'), 'meanZTestMap': ('meanZTest', 'Map'), 'cramersVBiasCorrectedMap': ('cramersVBiasCorrected', 'Map'), 'argMinMap': ('argMin', 'Map'), 'quantileInterpolatedWeightedMap': ('quantileInterpolatedWeighted', 'Map'), 'groupArrayMovingSumMap': ('groupArrayMovingSum', 'Map'), 'quantilesDeterministicMap': ('quantilesDeterministic', 'Map'), 'theilsUMap': ('theilsU', 'Map'), 'groupUniqArrayMap': ('groupUniqArray', 'Map'), 'quantileExactMap': ('quantileExact', 'Map'), 'uniqExactMap': ('uniqExact', 'Map'), 'quantileBFloat16Map': ('quantileBFloat16', 'Map'), 'exponentialTimeDecayedAvgMap': ('exponentialTimeDecayedAvg', 'Map'), 'deltaSumMap': ('deltaSum', 'Map'), 'maxMapMap': ('maxMap', 'Map'), 'categoricalInformationValueMap': ('categoricalInformationValue', 'Map'), 'groupBitOrMap': ('groupBitOr', 'Map'), 'groupArrayInsertAtMap': ('groupArrayInsertAt', 'Map'), 'sumMap': ('sumMap', ''), 'sumMapMap': ('sumMap', 'Map'), 'skewPopMap': ('skewPop', 'Map'), 'uniqHLL12Map': ('uniqHLL12', 'Map'), 'sumCountMap': ('sumCount', 'Map'), 'sumKahanMap': ('sumKahan', 'Map'), 'groupBitmapMap': ('groupBitmap', 'Map'), 'quantileGKMap': ('quantileGK', 'Map'), 'quantilesTimingWeightedMap': ('quantilesTimingWeighted', 'Map'), 'mannWhitneyUTestMap': ('mannWhitneyUTest', 'Map'), 'sumWithOverflowMap': ('sumWithOverflow', 'Map'), 'welchTTestMap': ('welchTTest', 'Map'), 'quantilesBFloat16WeightedMap': ('quantilesBFloat16Weighted', 'Map'), 'quantilesExactWeightedMap': ('quantilesExactWeighted', 'Map'), 'maxIntersectionsPositionMap': ('maxIntersectionsPosition', 'Map'), 'stochasticLogisticRegressionMap': ('stochasticLogisticRegression', 'Map'), 'uniqCombinedMap': ('uniqCombined', 'Map'), 'avgWeightedMap': ('avgWeighted', 'Map'), 'windowFunnelMap': ('windowFunnel', 'Map'), 'quantilesExactHighMap': ('quantilesExactHigh', 'Map'), 'groupBitmapAndMap': ('groupBitmapAnd', 'Map'), 'topKWeightedMap': ('topKWeighted', 'Map'), 'minMap': ('minMap', ''), 'contingencyMap': ('contingency', 'Map'), 'sequenceCountMap': ('sequenceCount', 'Map'), 'quantilesGKMap': ('quantilesGK', 'Map'), 'last_valueMap': ('last_value', 'Map'), 'uniqThetaMap': ('uniqTheta', 'Map'), 'sequenceNextNodeMap': ('sequenceNextNode', 'Map'), 'deltaSumTimestampMap': ('deltaSumTimestamp', 'Map'), 'groupArrayMovingAvgMap': ('groupArrayMovingAvg', 'Map'), 'quantileTimingWeightedMap': ('quantileTimingWeighted', 'Map'), 'quantileDeterministicMap': ('quantileDeterministic', 'Map'), 'quantileTDigestMap': ('quantileTDigest', 'Map'), 'groupArraySampleMap': ('groupArraySample', 'Map'), 'argMaxMap': ('argMax', 'Map'), 'kurtSampMap': ('kurtSamp', 'Map'), 'varSampMap': ('varSamp', 'Map'), 'intervalLengthSumMap': ('intervalLengthSum', 'Map'), 'uniqUpToMap': ('uniqUpTo', 'Map'), 'kolmogorovSmirnovTestMap': ('kolmogorovSmirnovTest', 'Map'), 'quantileTDigestWeightedMap': ('quantileTDigestWeighted', 'Map'), 'stddevSampMap': ('stddevSamp', 'Map'), 'quantileMap': ('quantile', 'Map'), 'covarSampMap': ('covarSamp', 'Map'), 'boundingRatioMap': ('boundingRatio', 'Map'), 'uniqMap': ('uniq', 'Map'), 'sparkBarMap': ('sparkBar', 'Map'), 'anyLastMap': ('anyLast', 'Map'), 'groupArrayLastMap': ('groupArrayLast', 'Map'), 'quantileTimingMap': ('quantileTiming', 'Map'), 'retentionMap': ('retention', 'Map'), 'kurtPopMap': ('kurtPop', 'Map'), 'quantileBFloat16WeightedMap': ('quantileBFloat16Weighted', 'Map'), 'varPopMap': ('varPop', 'Map'), 'corrMap': ('corr', 'Map'), 'sequenceMatchMap': ('sequenceMatch', 'Map'), 'largestTriangleThreeBucketsMap': ('largestTriangleThreeBuckets', 'Map'), 'anyMap': ('any', 'Map'), 'cramersVMap': ('cramersV', 'Map'), 'groupBitmapXorMap': ('groupBitmapXor', 'Map'), 'quantilesTDigestWeightedMap': ('quantilesTDigestWeighted', 'Map'), 'minMapMap': ('minMap', 'Map'), 'groupBitAndMap': ('groupBitAnd', 'Map'), 'groupBitmapOrMap': ('groupBitmapOr', 'Map'), 'medianMap': ('median', 'Map'), 'stddevPopMap': ('stddevPop', 'Map'), 'uniqCombined64Map': ('uniqCombined64', 'Map'), 'quantilesInterpolatedWeightedMap': ('quantilesInterpolatedWeighted', 'Map'), 'maxMap': ('maxMap', ''), 'quantileExactWeightedMap': ('quantileExactWeighted', 'Map'), 'quantilesExactLowMap': ('quantilesExactLow', 'Map'), 'groupArrayMap': ('groupArray', 'Map'), 'quantilesTimingMap': ('quantilesTiming', 'Map'), 'topKMap': ('topK', 'Map'), 'first_valueMap': ('first_value', 'Map'), 'countSimpleState': ('count', 'SimpleState'), 'rankCorrSimpleState': ('rankCorr', 'SimpleState'), 'entropySimpleState': ('entropy', 'SimpleState'), 'skewSampSimpleState': ('skewSamp', 'SimpleState'), 'anyHeavySimpleState': ('anyHeavy', 'SimpleState'), 'maxIntersectionsSimpleState': ('maxIntersections', 'SimpleState'), 'exponentialMovingAverageSimpleState': ('exponentialMovingAverage', 'SimpleState'), 'quantilesBFloat16SimpleState': ('quantilesBFloat16', 'SimpleState'), 'quantilesSimpleState': ('quantiles', 'SimpleState'), 'quantilesTDigestSimpleState': ('quantilesTDigest', 'SimpleState'), 'quantilesExactSimpleState': ('quantilesExact', 'SimpleState'), 'studentTTestSimpleState': ('studentTTest', 'SimpleState'), 'avgSimpleState': ('avg', 'SimpleState'), 'quantileExactHighSimpleState': ('quantileExactHigh', 'SimpleState'), 'quantileExactLowSimpleState': ('quantileExactLow', 'SimpleState'), 'simpleLinearRegressionSimpleState': ('simpleLinearRegression', 'SimpleState'), 'groupBitXorSimpleState': ('groupBitXor', 'SimpleState'), 'histogramSimpleState': ('histogram', 'SimpleState'), 'covarPopSimpleState': ('covarPop', 'SimpleState'), 'stochasticLinearRegressionSimpleState': ('stochasticLinearRegression', 'SimpleState'), 'meanZTestSimpleState': ('meanZTest', 'SimpleState'), 'cramersVBiasCorrectedSimpleState': ('cramersVBiasCorrected', 'SimpleState'), 'argMinSimpleState': ('argMin', 'SimpleState'), 'quantileInterpolatedWeightedSimpleState': ('quantileInterpolatedWeighted', 'SimpleState'), 'groupArrayMovingSumSimpleState': ('groupArrayMovingSum', 'SimpleState'), 'quantilesDeterministicSimpleState': ('quantilesDeterministic', 'SimpleState'), 'theilsUSimpleState': ('theilsU', 'SimpleState'), 'groupUniqArraySimpleState': ('groupUniqArray', 'SimpleState'), 'quantileExactSimpleState': ('quantileExact', 'SimpleState'), 'uniqExactSimpleState': ('uniqExact', 'SimpleState'), 'quantileBFloat16SimpleState': ('quantileBFloat16', 'SimpleState'), 'exponentialTimeDecayedAvgSimpleState': ('exponentialTimeDecayedAvg', 'SimpleState'), 'deltaSumSimpleState': ('deltaSum', 'SimpleState'), 'maxMapSimpleState': ('maxMap', 'SimpleState'), 'categoricalInformationValueSimpleState': ('categoricalInformationValue', 'SimpleState'), 'groupBitOrSimpleState': ('groupBitOr', 'SimpleState'), 'groupArrayInsertAtSimpleState': ('groupArrayInsertAt', 'SimpleState'), 'sumSimpleState': ('sum', 'SimpleState'), 'sumMapSimpleState': ('sumMap', 'SimpleState'), 'skewPopSimpleState': ('skewPop', 'SimpleState'), 'uniqHLL12SimpleState': ('uniqHLL12', 'SimpleState'), 'sumCountSimpleState': ('sumCount', 'SimpleState'), 'sumKahanSimpleState': ('sumKahan', 'SimpleState'), 'groupBitmapSimpleState': ('groupBitmap', 'SimpleState'), 'quantileGKSimpleState': ('quantileGK', 'SimpleState'), 'quantilesTimingWeightedSimpleState': ('quantilesTimingWeighted', 'SimpleState'), 'mannWhitneyUTestSimpleState': ('mannWhitneyUTest', 'SimpleState'), 'sumWithOverflowSimpleState': ('sumWithOverflow', 'SimpleState'), 'welchTTestSimpleState': ('welchTTest', 'SimpleState'), 'quantilesBFloat16WeightedSimpleState': ('quantilesBFloat16Weighted', 'SimpleState'), 'quantilesExactWeightedSimpleState': ('quantilesExactWeighted', 'SimpleState'), 'maxIntersectionsPositionSimpleState': ('maxIntersectionsPosition', 'SimpleState'), 'stochasticLogisticRegressionSimpleState': ('stochasticLogisticRegression', 'SimpleState'), 'uniqCombinedSimpleState': ('uniqCombined', 'SimpleState'), 'avgWeightedSimpleState': ('avgWeighted', 'SimpleState'), 'windowFunnelSimpleState': ('windowFunnel', 'SimpleState'), 'quantilesExactHighSimpleState': ('quantilesExactHigh', 'SimpleState'), 'groupBitmapAndSimpleState': ('groupBitmapAnd', 'SimpleState'), 'topKWeightedSimpleState': ('topKWeighted', 'SimpleState'), 'minSimpleState': ('min', 'SimpleState'), 'contingencySimpleState': ('contingency', 'SimpleState'), 'sequenceCountSimpleState': ('sequenceCount', 'SimpleState'), 'quantilesGKSimpleState': ('quantilesGK', 'SimpleState'), 'last_valueSimpleState': ('last_value', 'SimpleState'), 'uniqThetaSimpleState': ('uniqTheta', 'SimpleState'), 'sequenceNextNodeSimpleState': ('sequenceNextNode', 'SimpleState'), 'deltaSumTimestampSimpleState': ('deltaSumTimestamp', 'SimpleState'), 'groupArrayMovingAvgSimpleState': ('groupArrayMovingAvg', 'SimpleState'), 'quantileTimingWeightedSimpleState': ('quantileTimingWeighted', 'SimpleState'), 'quantileDeterministicSimpleState': ('quantileDeterministic', 'SimpleState'), 'quantileTDigestSimpleState': ('quantileTDigest', 'SimpleState'), 'groupArraySampleSimpleState': ('groupArraySample', 'SimpleState'), 'argMaxSimpleState': ('argMax', 'SimpleState'), 'kurtSampSimpleState': ('kurtSamp', 'SimpleState'), 'varSampSimpleState': ('varSamp', 'SimpleState'), 'intervalLengthSumSimpleState': ('intervalLengthSum', 'SimpleState'), 'uniqUpToSimpleState': ('uniqUpTo', 'SimpleState'), 'kolmogorovSmirnovTestSimpleState': ('kolmogorovSmirnovTest', 'SimpleState'), 'quantileTDigestWeightedSimpleState': ('quantileTDigestWeighted', 'SimpleState'), 'stddevSampSimpleState': ('stddevSamp', 'SimpleState'), 'quantileSimpleState': ('quantile', 'SimpleState'), 'covarSampSimpleState': ('covarSamp', 'SimpleState'), 'boundingRatioSimpleState': ('boundingRatio', 'SimpleState'), 'uniqSimpleState': ('uniq', 'SimpleState'), 'sparkBarSimpleState': ('sparkBar', 'SimpleState'), 'anyLastSimpleState': ('anyLast', 'SimpleState'), 'groupArrayLastSimpleState': ('groupArrayLast', 'SimpleState'), 'quantileTimingSimpleState': ('quantileTiming', 'SimpleState'), 'retentionSimpleState': ('retention', 'SimpleState'), 'kurtPopSimpleState': ('kurtPop', 'SimpleState'), 'quantileBFloat16WeightedSimpleState': ('quantileBFloat16Weighted', 'SimpleState'), 'varPopSimpleState': ('varPop', 'SimpleState'), 'corrSimpleState': ('corr', 'SimpleState'), 'sequenceMatchSimpleState': ('sequenceMatch', 'SimpleState'), 'largestTriangleThreeBucketsSimpleState': ('largestTriangleThreeBuckets', 'SimpleState'), 'anySimpleState': ('any', 'SimpleState'), 'cramersVSimpleState': ('cramersV', 'SimpleState'), 'groupBitmapXorSimpleState': ('groupBitmapXor', 'SimpleState'), 'quantilesTDigestWeightedSimpleState': ('quantilesTDigestWeighted', 'SimpleState'), 'minMapSimpleState': ('minMap', 'SimpleState'), 'groupBitAndSimpleState': ('groupBitAnd', 'SimpleState'), 'groupBitmapOrSimpleState': ('groupBitmapOr', 'SimpleState'), 'medianSimpleState': ('median', 'SimpleState'), 'stddevPopSimpleState': ('stddevPop', 'SimpleState'), 'uniqCombined64SimpleState': ('uniqCombined64', 'SimpleState'), 'quantilesInterpolatedWeightedSimpleState': ('quantilesInterpolatedWeighted', 'SimpleState'), 'maxSimpleState': ('max', 'SimpleState'), 'quantileExactWeightedSimpleState': ('quantileExactWeighted', 'SimpleState'), 'quantilesExactLowSimpleState': ('quantilesExactLow', 'SimpleState'), 'groupArraySimpleState': ('groupArray', 'SimpleState'), 'quantilesTimingSimpleState': ('quantilesTiming', 'SimpleState'), 'topKSimpleState': ('topK', 'SimpleState'), 'first_valueSimpleState': ('first_value', 'SimpleState'), 'countState': ('count', 'State'), 'rankCorrState': ('rankCorr', 'State'), 'entropyState': ('entropy', 'State'), 'skewSampState': ('skewSamp', 'State'), 'anyHeavyState': ('anyHeavy', 'State'), 'maxIntersectionsState': ('maxIntersections', 'State'), 'exponentialMovingAverageState': ('exponentialMovingAverage', 'State'), 'quantilesBFloat16State': ('quantilesBFloat16', 'State'), 'quantilesState': ('quantiles', 'State'), 'quantilesTDigestState': ('quantilesTDigest', 'State'), 'quantilesExactState': ('quantilesExact', 'State'), 'studentTTestState': ('studentTTest', 'State'), 'avgState': ('avg', 'State'), 'quantileExactHighState': ('quantileExactHigh', 'State'), 'quantileExactLowState': ('quantileExactLow', 'State'), 'simpleLinearRegressionState': ('simpleLinearRegression', 'State'), 'groupBitXorState': ('groupBitXor', 'State'), 'histogramState': ('histogram', 'State'), 'covarPopState': ('covarPop', 'State'), 'stochasticLinearRegressionState': ('stochasticLinearRegression', 'State'), 'meanZTestState': ('meanZTest', 'State'), 'cramersVBiasCorrectedState': ('cramersVBiasCorrected', 'State'), 'argMinState': ('argMin', 'State'), 'quantileInterpolatedWeightedState': ('quantileInterpolatedWeighted', 'State'), 'groupArrayMovingSumState': ('groupArrayMovingSum', 'State'), 'quantilesDeterministicState': ('quantilesDeterministic', 'State'), 'theilsUState': ('theilsU', 'State'), 'groupUniqArrayState': ('groupUniqArray', 'State'), 'quantileExactState': ('quantileExact', 'State'), 'uniqExactState': ('uniqExact', 'State'), 'quantileBFloat16State': ('quantileBFloat16', 'State'), 'exponentialTimeDecayedAvgState': ('exponentialTimeDecayedAvg', 'State'), 'deltaSumState': ('deltaSum', 'State'), 'maxMapState': ('maxMap', 'State'), 'categoricalInformationValueState': ('categoricalInformationValue', 'State'), 'groupBitOrState': ('groupBitOr', 'State'), 'groupArrayInsertAtState': ('groupArrayInsertAt', 'State'), 'sumState': ('sum', 'State'), 'sumMapState': ('sumMap', 'State'), 'skewPopState': ('skewPop', 'State'), 'uniqHLL12State': ('uniqHLL12', 'State'), 'sumCountState': ('sumCount', 'State'), 'sumKahanState': ('sumKahan', 'State'), 'groupBitmapState': ('groupBitmap', 'State'), 'quantileGKState': ('quantileGK', 'State'), 'quantilesTimingWeightedState': ('quantilesTimingWeighted', 'State'), 'mannWhitneyUTestState': ('mannWhitneyUTest', 'State'), 'sumWithOverflowState': ('sumWithOverflow', 'State'), 'welchTTestState': ('welchTTest', 'State'), 'quantilesBFloat16WeightedState': ('quantilesBFloat16Weighted', 'State'), 'quantilesExactWeightedState': ('quantilesExactWeighted', 'State'), 'maxIntersectionsPositionState': ('maxIntersectionsPosition', 'State'), 'stochasticLogisticRegressionState': ('stochasticLogisticRegression', 'State'), 'uniqCombinedState': ('uniqCombined', 'State'), 'avgWeightedState': ('avgWeighted', 'State'), 'windowFunnelState': ('windowFunnel', 'State'), 'quantilesExactHighState': ('quantilesExactHigh', 'State'), 'groupBitmapAndState': ('groupBitmapAnd', 'State'), 'topKWeightedState': ('topKWeighted', 'State'), 'minState': ('min', 'State'), 'contingencyState': ('contingency', 'State'), 'sequenceCountState': ('sequenceCount', 'State'), 'quantilesGKState': ('quantilesGK', 'State'), 'last_valueState': ('last_value', 'State'), 'uniqThetaState': ('uniqTheta', 'State'), 'sequenceNextNodeState': ('sequenceNextNode', 'State'), 'deltaSumTimestampState': ('deltaSumTimestamp', 'State'), 'groupArrayMovingAvgState': ('groupArrayMovingAvg', 'State'), 'quantileTimingWeightedState': ('quantileTimingWeighted', 'State'), 'quantileDeterministicState': ('quantileDeterministic', 'State'), 'quantileTDigestState': ('quantileTDigest', 'State'), 'groupArraySampleState': ('groupArraySample', 'State'), 'argMaxState': ('argMax', 'State'), 'kurtSampState': ('kurtSamp', 'State'), 'varSampState': ('varSamp', 'State'), 'intervalLengthSumState': ('intervalLengthSum', 'State'), 'uniqUpToState': ('uniqUpTo', 'State'), 'kolmogorovSmirnovTestState': ('kolmogorovSmirnovTest', 'State'), 'quantileTDigestWeightedState': ('quantileTDigestWeighted', 'State'), 'stddevSampState': ('stddevSamp', 'State'), 'quantileState': ('quantile', 'State'), 'covarSampState': ('covarSamp', 'State'), 'boundingRatioState': ('boundingRatio', 'State'), 'uniqState': ('uniq', 'State'), 'sparkBarState': ('sparkBar', 'State'), 'anyLastState': ('anyLast', 'State'), 'groupArrayLastState': ('groupArrayLast', 'State'), 'quantileTimingState': ('quantileTiming', 'State'), 'retentionState': ('retention', 'State'), 'kurtPopState': ('kurtPop', 'State'), 'quantileBFloat16WeightedState': ('quantileBFloat16Weighted', 'State'), 'varPopState': ('varPop', 'State'), 'corrState': ('corr', 'State'), 'sequenceMatchState': ('sequenceMatch', 'State'), 'largestTriangleThreeBucketsState': ('largestTriangleThreeBuckets', 'State'), 'anyState': ('any', 'State'), 'cramersVState': ('cramersV', 'State'), 'groupBitmapXorState': ('groupBitmapXor', 'State'), 'quantilesTDigestWeightedState': ('quantilesTDigestWeighted', 'State'), 'minMapState': ('minMap', 'State'), 'groupBitAndState': ('groupBitAnd', 'State'), 'groupBitmapOrState': ('groupBitmapOr', 'State'), 'medianState': ('median', 'State'), 'stddevPopState': ('stddevPop', 'State'), 'uniqCombined64State': ('uniqCombined64', 'State'), 'quantilesInterpolatedWeightedState': ('quantilesInterpolatedWeighted', 'State'), 'maxState': ('max', 'State'), 'quantileExactWeightedState': ('quantileExactWeighted', 'State'), 'quantilesExactLowState': ('quantilesExactLow', 'State'), 'groupArrayState': ('groupArray', 'State'), 'quantilesTimingState': ('quantilesTiming', 'State'), 'topKState': ('topK', 'State'), 'first_valueState': ('first_value', 'State'), 'countMerge': ('count', 'Merge'), 'rankCorrMerge': ('rankCorr', 'Merge'), 'entropyMerge': ('entropy', 'Merge'), 'skewSampMerge': ('skewSamp', 'Merge'), 'anyHeavyMerge': ('anyHeavy', 'Merge'), 'maxIntersectionsMerge': ('maxIntersections', 'Merge'), 'exponentialMovingAverageMerge': ('exponentialMovingAverage', 'Merge'), 'quantilesBFloat16Merge': ('quantilesBFloat16', 'Merge'), 'quantilesMerge': ('quantiles', 'Merge'), 'quantilesTDigestMerge': ('quantilesTDigest', 'Merge'), 'quantilesExactMerge': ('quantilesExact', 'Merge'), 'studentTTestMerge': ('studentTTest', 'Merge'), 'avgMerge': ('avg', 'Merge'), 'quantileExactHighMerge': ('quantileExactHigh', 'Merge'), 'quantileExactLowMerge': ('quantileExactLow', 'Merge'), 'simpleLinearRegressionMerge': ('simpleLinearRegression', 'Merge'), 'groupBitXorMerge': ('groupBitXor', 'Merge'), 'histogramMerge': ('histogram', 'Merge'), 'covarPopMerge': ('covarPop', 'Merge'), 'stochasticLinearRegressionMerge': ('stochasticLinearRegression', 'Merge'), 'meanZTestMerge': ('meanZTest', 'Merge'), 'cramersVBiasCorrectedMerge': ('cramersVBiasCorrected', 'Merge'), 'argMinMerge': ('argMin', 'Merge'), 'quantileInterpolatedWeightedMerge': ('quantileInterpolatedWeighted', 'Merge'), 'groupArrayMovingSumMerge': ('groupArrayMovingSum', 'Merge'), 'quantilesDeterministicMerge': ('quantilesDeterministic', 'Merge'), 'theilsUMerge': ('theilsU', 'Merge'), 'groupUniqArrayMerge': ('groupUniqArray', 'Merge'), 'quantileExactMerge': ('quantileExact', 'Merge'), 'uniqExactMerge': ('uniqExact', 'Merge'), 'quantileBFloat16Merge': ('quantileBFloat16', 'Merge'), 'exponentialTimeDecayedAvgMerge': ('exponentialTimeDecayedAvg', 'Merge'), 'deltaSumMerge': ('deltaSum', 'Merge'), 'maxMapMerge': ('maxMap', 'Merge'), 'categoricalInformationValueMerge': ('categoricalInformationValue', 'Merge'), 'groupBitOrMerge': ('groupBitOr', 'Merge'), 'groupArrayInsertAtMerge': ('groupArrayInsertAt', 'Merge'), 'sumMerge': ('sum', 'Merge'), 'sumMapMerge': ('sumMap', 'Merge'), 'skewPopMerge': ('skewPop', 'Merge'), 'uniqHLL12Merge': ('uniqHLL12', 'Merge'), 'sumCountMerge': ('sumCount', 'Merge'), 'sumKahanMerge': ('sumKahan', 'Merge'), 'groupBitmapMerge': ('groupBitmap', 'Merge'), 'quantileGKMerge': ('quantileGK', 'Merge'), 'quantilesTimingWeightedMerge': ('quantilesTimingWeighted', 'Merge'), 'mannWhitneyUTestMerge': ('mannWhitneyUTest', 'Merge'), 'sumWithOverflowMerge': ('sumWithOverflow', 'Merge'), 'welchTTestMerge': ('welchTTest', 'Merge'), 'quantilesBFloat16WeightedMerge': ('quantilesBFloat16Weighted', 'Merge'), 'quantilesExactWeightedMerge': ('quantilesExactWeighted', 'Merge'), 'maxIntersectionsPositionMerge': ('maxIntersectionsPosition', 'Merge'), 'stochasticLogisticRegressionMerge': ('stochasticLogisticRegression', 'Merge'), 'uniqCombinedMerge': ('uniqCombined', 'Merge'), 'avgWeightedMerge': ('avgWeighted', 'Merge'), 'windowFunnelMerge': ('windowFunnel', 'Merge'), 'quantilesExactHighMerge': ('quantilesExactHigh', 'Merge'), 'groupBitmapAndMerge': ('groupBitmapAnd', 'Merge'), 'topKWeightedMerge': ('topKWeighted', 'Merge'), 'minMerge': ('min', 'Merge'), 'contingencyMerge': ('contingency', 'Merge'), 'sequenceCountMerge': ('sequenceCount', 'Merge'), 'quantilesGKMerge': ('quantilesGK', 'Merge'), 'last_valueMerge': ('last_value', 'Merge'), 'uniqThetaMerge': ('uniqTheta', 'Merge'), 'sequenceNextNodeMerge': ('sequenceNextNode', 'Merge'), 'deltaSumTimestampMerge': ('deltaSumTimestamp', 'Merge'), 'groupArrayMovingAvgMerge': ('groupArrayMovingAvg', 'Merge'), 'quantileTimingWeightedMerge': ('quantileTimingWeighted', 'Merge'), 'quantileDeterministicMerge': ('quantileDeterministic', 'Merge'), 'quantileTDigestMerge': ('quantileTDigest', 'Merge'), 'groupArraySampleMerge': ('groupArraySample', 'Merge'), 'argMaxMerge': ('argMax', 'Merge'), 'kurtSampMerge': ('kurtSamp', 'Merge'), 'varSampMerge': ('varSamp', 'Merge'), 'intervalLengthSumMerge': ('intervalLengthSum', 'Merge'), 'uniqUpToMerge': ('uniqUpTo', 'Merge'), 'kolmogorovSmirnovTestMerge': ('kolmogorovSmirnovTest', 'Merge'), 'quantileTDigestWeightedMerge': ('quantileTDigestWeighted', 'Merge'), 'stddevSampMerge': ('stddevSamp', 'Merge'), 'quantileMerge': ('quantile', 'Merge'), 'covarSampMerge': ('covarSamp', 'Merge'), 'boundingRatioMerge': ('boundingRatio', 'Merge'), 'uniqMerge': ('uniq', 'Merge'), 'sparkBarMerge': ('sparkBar', 'Merge'), 'anyLastMerge': ('anyLast', 'Merge'), 'groupArrayLastMerge': ('groupArrayLast', 'Merge'), 'quantileTimingMerge': ('quantileTiming', 'Merge'), 'retentionMerge': ('retention', 'Merge'), 'kurtPopMerge': ('kurtPop', 'Merge'), 'quantileBFloat16WeightedMerge': ('quantileBFloat16Weighted', 'Merge'), 'varPopMerge': ('varPop', 'Merge'), 'corrMerge': ('corr', 'Merge'), 'sequenceMatchMerge': ('sequenceMatch', 'Merge'), 'largestTriangleThreeBucketsMerge': ('largestTriangleThreeBuckets', 'Merge'), 'anyMerge': ('any', 'Merge'), 'cramersVMerge': ('cramersV', 'Merge'), 'groupBitmapXorMerge': ('groupBitmapXor', 'Merge'), 'quantilesTDigestWeightedMerge': ('quantilesTDigestWeighted', 'Merge'), 'minMapMerge': ('minMap', 'Merge'), 'groupBitAndMerge': ('groupBitAnd', 'Merge'), 'groupBitmapOrMerge': ('groupBitmapOr', 'Merge'), 'medianMerge': ('median', 'Merge'), 'stddevPopMerge': ('stddevPop', 'Merge'), 'uniqCombined64Merge': ('uniqCombined64', 'Merge'), 'quantilesInterpolatedWeightedMerge': ('quantilesInterpolatedWeighted', 'Merge'), 'maxMerge': ('max', 'Merge'), 'quantileExactWeightedMerge': ('quantileExactWeighted', 'Merge'), 'quantilesExactLowMerge': ('quantilesExactLow', 'Merge'), 'groupArrayMerge': ('groupArray', 'Merge'), 'quantilesTimingMerge': ('quantilesTiming', 'Merge'), 'topKMerge': ('topK', 'Merge'), 'first_valueMerge': ('first_value', 'Merge'), 'countMergeState': ('count', 'MergeState'), 'rankCorrMergeState': ('rankCorr', 'MergeState'), 'entropyMergeState': ('entropy', 'MergeState'), 'skewSampMergeState': ('skewSamp', 'MergeState'), 'anyHeavyMergeState': ('anyHeavy', 'MergeState'), 'maxIntersectionsMergeState': ('maxIntersections', 'MergeState'), 'exponentialMovingAverageMergeState': ('exponentialMovingAverage', 'MergeState'), 'quantilesBFloat16MergeState': ('quantilesBFloat16', 'MergeState'), 'quantilesMergeState': ('quantiles', 'MergeState'), 'quantilesTDigestMergeState': ('quantilesTDigest', 'MergeState'), 'quantilesExactMergeState': ('quantilesExact', 'MergeState'), 'studentTTestMergeState': ('studentTTest', 'MergeState'), 'avgMergeState': ('avg', 'MergeState'), 'quantileExactHighMergeState': ('quantileExactHigh', 'MergeState'), 'quantileExactLowMergeState': ('quantileExactLow', 'MergeState'), 'simpleLinearRegressionMergeState': ('simpleLinearRegression', 'MergeState'), 'groupBitXorMergeState': ('groupBitXor', 'MergeState'), 'histogramMergeState': ('histogram', 'MergeState'), 'covarPopMergeState': ('covarPop', 'MergeState'), 'stochasticLinearRegressionMergeState': ('stochasticLinearRegression', 'MergeState'), 'meanZTestMergeState': ('meanZTest', 'MergeState'), 'cramersVBiasCorrectedMergeState': ('cramersVBiasCorrected', 'MergeState'), 'argMinMergeState': ('argMin', 'MergeState'), 'quantileInterpolatedWeightedMergeState': ('quantileInterpolatedWeighted', 'MergeState'), 'groupArrayMovingSumMergeState': ('groupArrayMovingSum', 'MergeState'), 'quantilesDeterministicMergeState': ('quantilesDeterministic', 'MergeState'), 'theilsUMergeState': ('theilsU', 'MergeState'), 'groupUniqArrayMergeState': ('groupUniqArray', 'MergeState'), 'quantileExactMergeState': ('quantileExact', 'MergeState'), 'uniqExactMergeState': ('uniqExact', 'MergeState'), 'quantileBFloat16MergeState': ('quantileBFloat16', 'MergeState'), 'exponentialTimeDecayedAvgMergeState': ('exponentialTimeDecayedAvg', 'MergeState'), 'deltaSumMergeState': ('deltaSum', 'MergeState'), 'maxMapMergeState': ('maxMap', 'MergeState'), 'categoricalInformationValueMergeState': ('categoricalInformationValue', 'MergeState'), 'groupBitOrMergeState': ('groupBitOr', 'MergeState'), 'groupArrayInsertAtMergeState': ('groupArrayInsertAt', 'MergeState'), 'sumMergeState': ('sum', 'MergeState'), 'sumMapMergeState': ('sumMap', 'MergeState'), 'skewPopMergeState': ('skewPop', 'MergeState'), 'uniqHLL12MergeState': ('uniqHLL12', 'MergeState'), 'sumCountMergeState': ('sumCount', 'MergeState'), 'sumKahanMergeState': ('sumKahan', 'MergeState'), 'groupBitmapMergeState': ('groupBitmap', 'MergeState'), 'quantileGKMergeState': ('quantileGK', 'MergeState'), 'quantilesTimingWeightedMergeState': ('quantilesTimingWeighted', 'MergeState'), 'mannWhitneyUTestMergeState': ('mannWhitneyUTest', 'MergeState'), 'sumWithOverflowMergeState': ('sumWithOverflow', 'MergeState'), 'welchTTestMergeState': ('welchTTest', 'MergeState'), 'quantilesBFloat16WeightedMergeState': ('quantilesBFloat16Weighted', 'MergeState'), 'quantilesExactWeightedMergeState': ('quantilesExactWeighted', 'MergeState'), 'maxIntersectionsPositionMergeState': ('maxIntersectionsPosition', 'MergeState'), 'stochasticLogisticRegressionMergeState': ('stochasticLogisticRegression', 'MergeState'), 'uniqCombinedMergeState': ('uniqCombined', 'MergeState'), 'avgWeightedMergeState': ('avgWeighted', 'MergeState'), 'windowFunnelMergeState': ('windowFunnel', 'MergeState'), 'quantilesExactHighMergeState': ('quantilesExactHigh', 'MergeState'), 'groupBitmapAndMergeState': ('groupBitmapAnd', 'MergeState'), 'topKWeightedMergeState': ('topKWeighted', 'MergeState'), 'minMergeState': ('min', 'MergeState'), 'contingencyMergeState': ('contingency', 'MergeState'), 'sequenceCountMergeState': ('sequenceCount', 'MergeState'), 'quantilesGKMergeState': ('quantilesGK', 'MergeState'), 'last_valueMergeState': ('last_value', 'MergeState'), 'uniqThetaMergeState': ('uniqTheta', 'MergeState'), 'sequenceNextNodeMergeState': ('sequenceNextNode', 'MergeState'), 'deltaSumTimestampMergeState': ('deltaSumTimestamp', 'MergeState'), 'groupArrayMovingAvgMergeState': ('groupArrayMovingAvg', 'MergeState'), 'quantileTimingWeightedMergeState': ('quantileTimingWeighted', 'MergeState'), 'quantileDeterministicMergeState': ('quantileDeterministic', 'MergeState'), 'quantileTDigestMergeState': ('quantileTDigest', 'MergeState'), 'groupArraySampleMergeState': ('groupArraySample', 'MergeState'), 'argMaxMergeState': ('argMax', 'MergeState'), 'kurtSampMergeState': ('kurtSamp', 'MergeState'), 'varSampMergeState': ('varSamp', 'MergeState'), 'intervalLengthSumMergeState': ('intervalLengthSum', 'MergeState'), 'uniqUpToMergeState': ('uniqUpTo', 'MergeState'), 'kolmogorovSmirnovTestMergeState': ('kolmogorovSmirnovTest', 'MergeState'), 'quantileTDigestWeightedMergeState': ('quantileTDigestWeighted', 'MergeState'), 'stddevSampMergeState': ('stddevSamp', 'MergeState'), 'quantileMergeState': ('quantile', 'MergeState'), 'covarSampMergeState': ('covarSamp', 'MergeState'), 'boundingRatioMergeState': ('boundingRatio', 'MergeState'), 'uniqMergeState': ('uniq', 'MergeState'), 'sparkBarMergeState': ('sparkBar', 'MergeState'), 'anyLastMergeState': ('anyLast', 'MergeState'), 'groupArrayLastMergeState': ('groupArrayLast', 'MergeState'), 'quantileTimingMergeState': ('quantileTiming', 'MergeState'), 'retentionMergeState': ('retention', 'MergeState'), 'kurtPopMergeState': ('kurtPop', 'MergeState'), 'quantileBFloat16WeightedMergeState': ('quantileBFloat16Weighted', 'MergeState'), 'varPopMergeState': ('varPop', 'MergeState'), 'corrMergeState': ('corr', 'MergeState'), 'sequenceMatchMergeState': ('sequenceMatch', 'MergeState'), 'largestTriangleThreeBucketsMergeState': ('largestTriangleThreeBuckets', 'MergeState'), 'anyMergeState': ('any', 'MergeState'), 'cramersVMergeState': ('cramersV', 'MergeState'), 'groupBitmapXorMergeState': ('groupBitmapXor', 'MergeState'), 'quantilesTDigestWeightedMergeState': ('quantilesTDigestWeighted', 'MergeState'), 'minMapMergeState': ('minMap', 'MergeState'), 'groupBitAndMergeState': ('groupBitAnd', 'MergeState'), 'groupBitmapOrMergeState': ('groupBitmapOr', 'MergeState'), 'medianMergeState': ('median', 'MergeState'), 'stddevPopMergeState': ('stddevPop', 'MergeState'), 'uniqCombined64MergeState': ('uniqCombined64', 'MergeState'), 'quantilesInterpolatedWeightedMergeState': ('quantilesInterpolatedWeighted', 'MergeState'), 'maxMergeState': ('max', 'MergeState'), 'quantileExactWeightedMergeState': ('quantileExactWeighted', 'MergeState'), 'quantilesExactLowMergeState': ('quantilesExactLow', 'MergeState'), 'groupArrayMergeState': ('groupArray', 'MergeState'), 'quantilesTimingMergeState': ('quantilesTiming', 'MergeState'), 'topKMergeState': ('topK', 'MergeState'), 'first_valueMergeState': ('first_value', 'MergeState'), 'countForEach': ('count', 'ForEach'), 'rankCorrForEach': ('rankCorr', 'ForEach'), 'entropyForEach': ('entropy', 'ForEach'), 'skewSampForEach': ('skewSamp', 'ForEach'), 'anyHeavyForEach': ('anyHeavy', 'ForEach'), 'maxIntersectionsForEach': ('maxIntersections', 'ForEach'), 'exponentialMovingAverageForEach': ('exponentialMovingAverage', 'ForEach'), 'quantilesBFloat16ForEach': ('quantilesBFloat16', 'ForEach'), 'quantilesForEach': ('quantiles', 'ForEach'), 'quantilesTDigestForEach': ('quantilesTDigest', 'ForEach'), 'quantilesExactForEach': ('quantilesExact', 'ForEach'), 'studentTTestForEach': ('studentTTest', 'ForEach'), 'avgForEach': ('avg', 'ForEach'), 'quantileExactHighForEach': ('quantileExactHigh', 'ForEach'), 'quantileExactLowForEach': ('quantileExactLow', 'ForEach'), 'simpleLinearRegressionForEach': ('simpleLinearRegression', 'ForEach'), 'groupBitXorForEach': ('groupBitXor', 'ForEach'), 'histogramForEach': ('histogram', 'ForEach'), 'covarPopForEach': ('covarPop', 'ForEach'), 'stochasticLinearRegressionForEach': ('stochasticLinearRegression', 'ForEach'), 'meanZTestForEach': ('meanZTest', 'ForEach'), 'cramersVBiasCorrectedForEach': ('cramersVBiasCorrected', 'ForEach'), 'argMinForEach': ('argMin', 'ForEach'), 'quantileInterpolatedWeightedForEach': ('quantileInterpolatedWeighted', 'ForEach'), 'groupArrayMovingSumForEach': ('groupArrayMovingSum', 'ForEach'), 'quantilesDeterministicForEach': ('quantilesDeterministic', 'ForEach'), 'theilsUForEach': ('theilsU', 'ForEach'), 'groupUniqArrayForEach': ('groupUniqArray', 'ForEach'), 'quantileExactForEach': ('quantileExact', 'ForEach'), 'uniqExactForEach': ('uniqExact', 'ForEach'), 'quantileBFloat16ForEach': ('quantileBFloat16', 'ForEach'), 'exponentialTimeDecayedAvgForEach': ('exponentialTimeDecayedAvg', 'ForEach'), 'deltaSumForEach': ('deltaSum', 'ForEach'), 'maxMapForEach': ('maxMap', 'ForEach'), 'categoricalInformationValueForEach': ('categoricalInformationValue', 'ForEach'), 'groupBitOrForEach': ('groupBitOr', 'ForEach'), 'groupArrayInsertAtForEach': ('groupArrayInsertAt', 'ForEach'), 'sumForEach': ('sum', 'ForEach'), 'sumMapForEach': ('sumMap', 'ForEach'), 'skewPopForEach': ('skewPop', 'ForEach'), 'uniqHLL12ForEach': ('uniqHLL12', 'ForEach'), 'sumCountForEach': ('sumCount', 'ForEach'), 'sumKahanForEach': ('sumKahan', 'ForEach'), 'groupBitmapForEach': ('groupBitmap', 'ForEach'), 'quantileGKForEach': ('quantileGK', 'ForEach'), 'quantilesTimingWeightedForEach': ('quantilesTimingWeighted', 'ForEach'), 'mannWhitneyUTestForEach': ('mannWhitneyUTest', 'ForEach'), 'sumWithOverflowForEach': ('sumWithOverflow', 'ForEach'), 'welchTTestForEach': ('welchTTest', 'ForEach'), 'quantilesBFloat16WeightedForEach': ('quantilesBFloat16Weighted', 'ForEach'), 'quantilesExactWeightedForEach': ('quantilesExactWeighted', 'ForEach'), 'maxIntersectionsPositionForEach': ('maxIntersectionsPosition', 'ForEach'), 'stochasticLogisticRegressionForEach': ('stochasticLogisticRegression', 'ForEach'), 'uniqCombinedForEach': ('uniqCombined', 'ForEach'), 'avgWeightedForEach': ('avgWeighted', 'ForEach'), 'windowFunnelForEach': ('windowFunnel', 'ForEach'), 'quantilesExactHighForEach': ('quantilesExactHigh', 'ForEach'), 'groupBitmapAndForEach': ('groupBitmapAnd', 'ForEach'), 'topKWeightedForEach': ('topKWeighted', 'ForEach'), 'minForEach': ('min', 'ForEach'), 'contingencyForEach': ('contingency', 'ForEach'), 'sequenceCountForEach': ('sequenceCount', 'ForEach'), 'quantilesGKForEach': ('quantilesGK', 'ForEach'), 'last_valueForEach': ('last_value', 'ForEach'), 'uniqThetaForEach': ('uniqTheta', 'ForEach'), 'sequenceNextNodeForEach': ('sequenceNextNode', 'ForEach'), 'deltaSumTimestampForEach': ('deltaSumTimestamp', 'ForEach'), 'groupArrayMovingAvgForEach': ('groupArrayMovingAvg', 'ForEach'), 'quantileTimingWeightedForEach': ('quantileTimingWeighted', 'ForEach'), 'quantileDeterministicForEach': ('quantileDeterministic', 'ForEach'), 'quantileTDigestForEach': ('quantileTDigest', 'ForEach'), 'groupArraySampleForEach': ('groupArraySample', 'ForEach'), 'argMaxForEach': ('argMax', 'ForEach'), 'kurtSampForEach': ('kurtSamp', 'ForEach'), 'varSampForEach': ('varSamp', 'ForEach'), 'intervalLengthSumForEach': ('intervalLengthSum', 'ForEach'), 'uniqUpToForEach': ('uniqUpTo', 'ForEach'), 'kolmogorovSmirnovTestForEach': ('kolmogorovSmirnovTest', 'ForEach'), 'quantileTDigestWeightedForEach': ('quantileTDigestWeighted', 'ForEach'), 'stddevSampForEach': ('stddevSamp', 'ForEach'), 'quantileForEach': ('quantile', 'ForEach'), 'covarSampForEach': ('covarSamp', 'ForEach'), 'boundingRatioForEach': ('boundingRatio', 'ForEach'), 'uniqForEach': ('uniq', 'ForEach'), 'sparkBarForEach': ('sparkBar', 'ForEach'), 'anyLastForEach': ('anyLast', 'ForEach'), 'groupArrayLastForEach': ('groupArrayLast', 'ForEach'), 'quantileTimingForEach': ('quantileTiming', 'ForEach'), 'retentionForEach': ('retention', 'ForEach'), 'kurtPopForEach': ('kurtPop', 'ForEach'), 'quantileBFloat16WeightedForEach': ('quantileBFloat16Weighted', 'ForEach'), 'varPopForEach': ('varPop', 'ForEach'), 'corrForEach': ('corr', 'ForEach'), 'sequenceMatchForEach': ('sequenceMatch', 'ForEach'), 'largestTriangleThreeBucketsForEach': ('largestTriangleThreeBuckets', 'ForEach'), 'anyForEach': ('any', 'ForEach'), 'cramersVForEach': ('cramersV', 'ForEach'), 'groupBitmapXorForEach': ('groupBitmapXor', 'ForEach'), 'quantilesTDigestWeightedForEach': ('quantilesTDigestWeighted', 'ForEach'), 'minMapForEach': ('minMap', 'ForEach'), 'groupBitAndForEach': ('groupBitAnd', 'ForEach'), 'groupBitmapOrForEach': ('groupBitmapOr', 'ForEach'), 'medianForEach': ('median', 'ForEach'), 'stddevPopForEach': ('stddevPop', 'ForEach'), 'uniqCombined64ForEach': ('uniqCombined64', 'ForEach'), 'quantilesInterpolatedWeightedForEach': ('quantilesInterpolatedWeighted', 'ForEach'), 'maxForEach': ('max', 'ForEach'), 'quantileExactWeightedForEach': ('quantileExactWeighted', 'ForEach'), 'quantilesExactLowForEach': ('quantilesExactLow', 'ForEach'), 'groupArrayForEach': ('groupArray', 'ForEach'), 'quantilesTimingForEach': ('quantilesTiming', 'ForEach'), 'topKForEach': ('topK', 'ForEach'), 'first_valueForEach': ('first_value', 'ForEach'), 'countDistinct': ('count', 'Distinct'), 'rankCorrDistinct': ('rankCorr', 'Distinct'), 'entropyDistinct': ('entropy', 'Distinct'), 'skewSampDistinct': ('skewSamp', 'Distinct'), 'anyHeavyDistinct': ('anyHeavy', 'Distinct'), 'maxIntersectionsDistinct': ('maxIntersections', 'Distinct'), 'exponentialMovingAverageDistinct': ('exponentialMovingAverage', 'Distinct'), 'quantilesBFloat16Distinct': ('quantilesBFloat16', 'Distinct'), 'quantilesDistinct': ('quantiles', 'Distinct'), 'quantilesTDigestDistinct': ('quantilesTDigest', 'Distinct'), 'quantilesExactDistinct': ('quantilesExact', 'Distinct'), 'studentTTestDistinct': ('studentTTest', 'Distinct'), 'avgDistinct': ('avg', 'Distinct'), 'quantileExactHighDistinct': ('quantileExactHigh', 'Distinct'), 'quantileExactLowDistinct': ('quantileExactLow', 'Distinct'), 'simpleLinearRegressionDistinct': ('simpleLinearRegression', 'Distinct'), 'groupBitXorDistinct': ('groupBitXor', 'Distinct'), 'histogramDistinct': ('histogram', 'Distinct'), 'covarPopDistinct': ('covarPop', 'Distinct'), 'stochasticLinearRegressionDistinct': ('stochasticLinearRegression', 'Distinct'), 'meanZTestDistinct': ('meanZTest', 'Distinct'), 'cramersVBiasCorrectedDistinct': ('cramersVBiasCorrected', 'Distinct'), 'argMinDistinct': ('argMin', 'Distinct'), 'quantileInterpolatedWeightedDistinct': ('quantileInterpolatedWeighted', 'Distinct'), 'groupArrayMovingSumDistinct': ('groupArrayMovingSum', 'Distinct'), 'quantilesDeterministicDistinct': ('quantilesDeterministic', 'Distinct'), 'theilsUDistinct': ('theilsU', 'Distinct'), 'groupUniqArrayDistinct': ('groupUniqArray', 'Distinct'), 'quantileExactDistinct': ('quantileExact', 'Distinct'), 'uniqExactDistinct': ('uniqExact', 'Distinct'), 'quantileBFloat16Distinct': ('quantileBFloat16', 'Distinct'), 'exponentialTimeDecayedAvgDistinct': ('exponentialTimeDecayedAvg', 'Distinct'), 'deltaSumDistinct': ('deltaSum', 'Distinct'), 'maxMapDistinct': ('maxMap', 'Distinct'), 'categoricalInformationValueDistinct': ('categoricalInformationValue', 'Distinct'), 'groupBitOrDistinct': ('groupBitOr', 'Distinct'), 'groupArrayInsertAtDistinct': ('groupArrayInsertAt', 'Distinct'), 'sumDistinct': ('sum', 'Distinct'), 'sumMapDistinct': ('sumMap', 'Distinct'), 'skewPopDistinct': ('skewPop', 'Distinct'), 'uniqHLL12Distinct': ('uniqHLL12', 'Distinct'), 'sumCountDistinct': ('sumCount', 'Distinct'), 'sumKahanDistinct': ('sumKahan', 'Distinct'), 'groupBitmapDistinct': ('groupBitmap', 'Distinct'), 'quantileGKDistinct': ('quantileGK', 'Distinct'), 'quantilesTimingWeightedDistinct': ('quantilesTimingWeighted', 'Distinct'), 'mannWhitneyUTestDistinct': ('mannWhitneyUTest', 'Distinct'), 'sumWithOverflowDistinct': ('sumWithOverflow', 'Distinct'), 'welchTTestDistinct': ('welchTTest', 'Distinct'), 'quantilesBFloat16WeightedDistinct': ('quantilesBFloat16Weighted', 'Distinct'), 'quantilesExactWeightedDistinct': ('quantilesExactWeighted', 'Distinct'), 'maxIntersectionsPositionDistinct': ('maxIntersectionsPosition', 'Distinct'), 'stochasticLogisticRegressionDistinct': ('stochasticLogisticRegression', 'Distinct'), 'uniqCombinedDistinct': ('uniqCombined', 'Distinct'), 'avgWeightedDistinct': ('avgWeighted', 'Distinct'), 'windowFunnelDistinct': ('windowFunnel', 'Distinct'), 'quantilesExactHighDistinct': ('quantilesExactHigh', 'Distinct'), 'groupBitmapAndDistinct': ('groupBitmapAnd', 'Distinct'), 'topKWeightedDistinct': ('topKWeighted', 'Distinct'), 'minDistinct': ('min', 'Distinct'), 'contingencyDistinct': ('contingency', 'Distinct'), 'sequenceCountDistinct': ('sequenceCount', 'Distinct'), 'quantilesGKDistinct': ('quantilesGK', 'Distinct'), 'last_valueDistinct': ('last_value', 'Distinct'), 'uniqThetaDistinct': ('uniqTheta', 'Distinct'), 'sequenceNextNodeDistinct': ('sequenceNextNode', 'Distinct'), 'deltaSumTimestampDistinct': ('deltaSumTimestamp', 'Distinct'), 'groupArrayMovingAvgDistinct': ('groupArrayMovingAvg', 'Distinct'), 'quantileTimingWeightedDistinct': ('quantileTimingWeighted', 'Distinct'), 'quantileDeterministicDistinct': ('quantileDeterministic', 'Distinct'), 'quantileTDigestDistinct': ('quantileTDigest', 'Distinct'), 'groupArraySampleDistinct': ('groupArraySample', 'Distinct'), 'argMaxDistinct': ('argMax', 'Distinct'), 'kurtSampDistinct': ('kurtSamp', 'Distinct'), 'varSampDistinct': ('varSamp', 'Distinct'), 'intervalLengthSumDistinct': ('intervalLengthSum', 'Distinct'), 'uniqUpToDistinct': ('uniqUpTo', 'Distinct'), 'kolmogorovSmirnovTestDistinct': ('kolmogorovSmirnovTest', 'Distinct'), 'quantileTDigestWeightedDistinct': ('quantileTDigestWeighted', 'Distinct'), 'stddevSampDistinct': ('stddevSamp', 'Distinct'), 'quantileDistinct': ('quantile', 'Distinct'), 'covarSampDistinct': ('covarSamp', 'Distinct'), 'boundingRatioDistinct': ('boundingRatio', 'Distinct'), 'uniqDistinct': ('uniq', 'Distinct'), 'sparkBarDistinct': ('sparkBar', 'Distinct'), 'anyLastDistinct': ('anyLast', 'Distinct'), 'groupArrayLastDistinct': ('groupArrayLast', 'Distinct'), 'quantileTimingDistinct': ('quantileTiming', 'Distinct'), 'retentionDistinct': ('retention', 'Distinct'), 'kurtPopDistinct': ('kurtPop', 'Distinct'), 'quantileBFloat16WeightedDistinct': ('quantileBFloat16Weighted', 'Distinct'), 'varPopDistinct': ('varPop', 'Distinct'), 'corrDistinct': ('corr', 'Distinct'), 'sequenceMatchDistinct': ('sequenceMatch', 'Distinct'), 'largestTriangleThreeBucketsDistinct': ('largestTriangleThreeBuckets', 'Distinct'), 'anyDistinct': ('any', 'Distinct'), 'cramersVDistinct': ('cramersV', 'Distinct'), 'groupBitmapXorDistinct': ('groupBitmapXor', 'Distinct'), 'quantilesTDigestWeightedDistinct': ('quantilesTDigestWeighted', 'Distinct'), 'minMapDistinct': ('minMap', 'Distinct'), 'groupBitAndDistinct': ('groupBitAnd', 'Distinct'), 'groupBitmapOrDistinct': ('groupBitmapOr', 'Distinct'), 'medianDistinct': ('median', 'Distinct'), 'stddevPopDistinct': ('stddevPop', 'Distinct'), 'uniqCombined64Distinct': ('uniqCombined64', 'Distinct'), 'quantilesInterpolatedWeightedDistinct': ('quantilesInterpolatedWeighted', 'Distinct'), 'maxDistinct': ('max', 'Distinct'), 'quantileExactWeightedDistinct': ('quantileExactWeighted', 'Distinct'), 'quantilesExactLowDistinct': ('quantilesExactLow', 'Distinct'), 'groupArrayDistinct': ('groupArray', 'Distinct'), 'quantilesTimingDistinct': ('quantilesTiming', 'Distinct'), 'topKDistinct': ('topK', 'Distinct'), 'first_valueDistinct': ('first_value', 'Distinct'), 'countOrDefault': ('count', 'OrDefault'), 'rankCorrOrDefault': ('rankCorr', 'OrDefault'), 'entropyOrDefault': ('entropy', 'OrDefault'), 'skewSampOrDefault': ('skewSamp', 'OrDefault'), 'anyHeavyOrDefault': ('anyHeavy', 'OrDefault'), 'maxIntersectionsOrDefault': ('maxIntersections', 'OrDefault'), 'exponentialMovingAverageOrDefault': ('exponentialMovingAverage', 'OrDefault'), 'quantilesBFloat16OrDefault': ('quantilesBFloat16', 'OrDefault'), 'quantilesOrDefault': ('quantiles', 'OrDefault'), 'quantilesTDigestOrDefault': ('quantilesTDigest', 'OrDefault'), 'quantilesExactOrDefault': ('quantilesExact', 'OrDefault'), 'studentTTestOrDefault': ('studentTTest', 'OrDefault'), 'avgOrDefault': ('avg', 'OrDefault'), 'quantileExactHighOrDefault': ('quantileExactHigh', 'OrDefault'), 'quantileExactLowOrDefault': ('quantileExactLow', 'OrDefault'), 'simpleLinearRegressionOrDefault': ('simpleLinearRegression', 'OrDefault'), 'groupBitXorOrDefault': ('groupBitXor', 'OrDefault'), 'histogramOrDefault': ('histogram', 'OrDefault'), 'covarPopOrDefault': ('covarPop', 'OrDefault'), 'stochasticLinearRegressionOrDefault': ('stochasticLinearRegression', 'OrDefault'), 'meanZTestOrDefault': ('meanZTest', 'OrDefault'), 'cramersVBiasCorrectedOrDefault': ('cramersVBiasCorrected', 'OrDefault'), 'argMinOrDefault': ('argMin', 'OrDefault'), 'quantileInterpolatedWeightedOrDefault': ('quantileInterpolatedWeighted', 'OrDefault'), 'groupArrayMovingSumOrDefault': ('groupArrayMovingSum', 'OrDefault'), 'quantilesDeterministicOrDefault': ('quantilesDeterministic', 'OrDefault'), 'theilsUOrDefault': ('theilsU', 'OrDefault'), 'groupUniqArrayOrDefault': ('groupUniqArray', 'OrDefault'), 'quantileExactOrDefault': ('quantileExact', 'OrDefault'), 'uniqExactOrDefault': ('uniqExact', 'OrDefault'), 'quantileBFloat16OrDefault': ('quantileBFloat16', 'OrDefault'), 'exponentialTimeDecayedAvgOrDefault': ('exponentialTimeDecayedAvg', 'OrDefault'), 'deltaSumOrDefault': ('deltaSum', 'OrDefault'), 'maxMapOrDefault': ('maxMap', 'OrDefault'), 'categoricalInformationValueOrDefault': ('categoricalInformationValue', 'OrDefault'), 'groupBitOrOrDefault': ('groupBitOr', 'OrDefault'), 'groupArrayInsertAtOrDefault': ('groupArrayInsertAt', 'OrDefault'), 'sumOrDefault': ('sum', 'OrDefault'), 'sumMapOrDefault': ('sumMap', 'OrDefault'), 'skewPopOrDefault': ('skewPop', 'OrDefault'), 'uniqHLL12OrDefault': ('uniqHLL12', 'OrDefault'), 'sumCountOrDefault': ('sumCount', 'OrDefault'), 'sumKahanOrDefault': ('sumKahan', 'OrDefault'), 'groupBitmapOrDefault': ('groupBitmap', 'OrDefault'), 'quantileGKOrDefault': ('quantileGK', 'OrDefault'), 'quantilesTimingWeightedOrDefault': ('quantilesTimingWeighted', 'OrDefault'), 'mannWhitneyUTestOrDefault': ('mannWhitneyUTest', 'OrDefault'), 'sumWithOverflowOrDefault': ('sumWithOverflow', 'OrDefault'), 'welchTTestOrDefault': ('welchTTest', 'OrDefault'), 'quantilesBFloat16WeightedOrDefault': ('quantilesBFloat16Weighted', 'OrDefault'), 'quantilesExactWeightedOrDefault': ('quantilesExactWeighted', 'OrDefault'), 'maxIntersectionsPositionOrDefault': ('maxIntersectionsPosition', 'OrDefault'), 'stochasticLogisticRegressionOrDefault': ('stochasticLogisticRegression', 'OrDefault'), 'uniqCombinedOrDefault': ('uniqCombined', 'OrDefault'), 'avgWeightedOrDefault': ('avgWeighted', 'OrDefault'), 'windowFunnelOrDefault': ('windowFunnel', 'OrDefault'), 'quantilesExactHighOrDefault': ('quantilesExactHigh', 'OrDefault'), 'groupBitmapAndOrDefault': ('groupBitmapAnd', 'OrDefault'), 'topKWeightedOrDefault': ('topKWeighted', 'OrDefault'), 'minOrDefault': ('min', 'OrDefault'), 'contingencyOrDefault': ('contingency', 'OrDefault'), 'sequenceCountOrDefault': ('sequenceCount', 'OrDefault'), 'quantilesGKOrDefault': ('quantilesGK', 'OrDefault'), 'last_valueOrDefault': ('last_value', 'OrDefault'), 'uniqThetaOrDefault': ('uniqTheta', 'OrDefault'), 'sequenceNextNodeOrDefault': ('sequenceNextNode', 'OrDefault'), 'deltaSumTimestampOrDefault': ('deltaSumTimestamp', 'OrDefault'), 'groupArrayMovingAvgOrDefault': ('groupArrayMovingAvg', 'OrDefault'), 'quantileTimingWeightedOrDefault': ('quantileTimingWeighted', 'OrDefault'), 'quantileDeterministicOrDefault': ('quantileDeterministic', 'OrDefault'), 'quantileTDigestOrDefault': ('quantileTDigest', 'OrDefault'), 'groupArraySampleOrDefault': ('groupArraySample', 'OrDefault'), 'argMaxOrDefault': ('argMax', 'OrDefault'), 'kurtSampOrDefault': ('kurtSamp', 'OrDefault'), 'varSampOrDefault': ('varSamp', 'OrDefault'), 'intervalLengthSumOrDefault': ('intervalLengthSum', 'OrDefault'), 'uniqUpToOrDefault': ('uniqUpTo', 'OrDefault'), 'kolmogorovSmirnovTestOrDefault': ('kolmogorovSmirnovTest', 'OrDefault'), 'quantileTDigestWeightedOrDefault': ('quantileTDigestWeighted', 'OrDefault'), 'stddevSampOrDefault': ('stddevSamp', 'OrDefault'), 'quantileOrDefault': ('quantile', 'OrDefault'), 'covarSampOrDefault': ('covarSamp', 'OrDefault'), 'boundingRatioOrDefault': ('boundingRatio', 'OrDefault'), 'uniqOrDefault': ('uniq', 'OrDefault'), 'sparkBarOrDefault': ('sparkBar', 'OrDefault'), 'anyLastOrDefault': ('anyLast', 'OrDefault'), 'groupArrayLastOrDefault': ('groupArrayLast', 'OrDefault'), 'quantileTimingOrDefault': ('quantileTiming', 'OrDefault'), 'retentionOrDefault': ('retention', 'OrDefault'), 'kurtPopOrDefault': ('kurtPop', 'OrDefault'), 'quantileBFloat16WeightedOrDefault': ('quantileBFloat16Weighted', 'OrDefault'), 'varPopOrDefault': ('varPop', 'OrDefault'), 'corrOrDefault': ('corr', 'OrDefault'), 'sequenceMatchOrDefault': ('sequenceMatch', 'OrDefault'), 'largestTriangleThreeBucketsOrDefault': ('largestTriangleThreeBuckets', 'OrDefault'), 'anyOrDefault': ('any', 'OrDefault'), 'cramersVOrDefault': ('cramersV', 'OrDefault'), 'groupBitmapXorOrDefault': ('groupBitmapXor', 'OrDefault'), 'quantilesTDigestWeightedOrDefault': ('quantilesTDigestWeighted', 'OrDefault'), 'minMapOrDefault': ('minMap', 'OrDefault'), 'groupBitAndOrDefault': ('groupBitAnd', 'OrDefault'), 'groupBitmapOrOrDefault': ('groupBitmapOr', 'OrDefault'), 'medianOrDefault': ('median', 'OrDefault'), 'stddevPopOrDefault': ('stddevPop', 'OrDefault'), 'uniqCombined64OrDefault': ('uniqCombined64', 'OrDefault'), 'quantilesInterpolatedWeightedOrDefault': ('quantilesInterpolatedWeighted', 'OrDefault'), 'maxOrDefault': ('max', 'OrDefault'), 'quantileExactWeightedOrDefault': ('quantileExactWeighted', 'OrDefault'), 'quantilesExactLowOrDefault': ('quantilesExactLow', 'OrDefault'), 'groupArrayOrDefault': ('groupArray', 'OrDefault'), 'quantilesTimingOrDefault': ('quantilesTiming', 'OrDefault'), 'topKOrDefault': ('topK', 'OrDefault'), 'first_valueOrDefault': ('first_value', 'OrDefault'), 'countOrNull': ('count', 'OrNull'), 'rankCorrOrNull': ('rankCorr', 'OrNull'), 'entropyOrNull': ('entropy', 'OrNull'), 'skewSampOrNull': ('skewSamp', 'OrNull'), 'anyHeavyOrNull': ('anyHeavy', 'OrNull'), 'maxIntersectionsOrNull': ('maxIntersections', 'OrNull'), 'exponentialMovingAverageOrNull': ('exponentialMovingAverage', 'OrNull'), 'quantilesBFloat16OrNull': ('quantilesBFloat16', 'OrNull'), 'quantilesOrNull': ('quantiles', 'OrNull'), 'quantilesTDigestOrNull': ('quantilesTDigest', 'OrNull'), 'quantilesExactOrNull': ('quantilesExact', 'OrNull'), 'studentTTestOrNull': ('studentTTest', 'OrNull'), 'avgOrNull': ('avg', 'OrNull'), 'quantileExactHighOrNull': ('quantileExactHigh', 'OrNull'), 'quantileExactLowOrNull': ('quantileExactLow', 'OrNull'), 'simpleLinearRegressionOrNull': ('simpleLinearRegression', 'OrNull'), 'groupBitXorOrNull': ('groupBitXor', 'OrNull'), 'histogramOrNull': ('histogram', 'OrNull'), 'covarPopOrNull': ('covarPop', 'OrNull'), 'stochasticLinearRegressionOrNull': ('stochasticLinearRegression', 'OrNull'), 'meanZTestOrNull': ('meanZTest', 'OrNull'), 'cramersVBiasCorrectedOrNull': ('cramersVBiasCorrected', 'OrNull'), 'argMinOrNull': ('argMin', 'OrNull'), 'quantileInterpolatedWeightedOrNull': ('quantileInterpolatedWeighted', 'OrNull'), 'groupArrayMovingSumOrNull': ('groupArrayMovingSum', 'OrNull'), 'quantilesDeterministicOrNull': ('quantilesDeterministic', 'OrNull'), 'theilsUOrNull': ('theilsU', 'OrNull'), 'groupUniqArrayOrNull': ('groupUniqArray', 'OrNull'), 'quantileExactOrNull': ('quantileExact', 'OrNull'), 'uniqExactOrNull': ('uniqExact', 'OrNull'), 'quantileBFloat16OrNull': ('quantileBFloat16', 'OrNull'), 'exponentialTimeDecayedAvgOrNull': ('exponentialTimeDecayedAvg', 'OrNull'), 'deltaSumOrNull': ('deltaSum', 'OrNull'), 'maxMapOrNull': ('maxMap', 'OrNull'), 'categoricalInformationValueOrNull': ('categoricalInformationValue', 'OrNull'), 'groupBitOrOrNull': ('groupBitOr', 'OrNull'), 'groupArrayInsertAtOrNull': ('groupArrayInsertAt', 'OrNull'), 'sumOrNull': ('sum', 'OrNull'), 'sumMapOrNull': ('sumMap', 'OrNull'), 'skewPopOrNull': ('skewPop', 'OrNull'), 'uniqHLL12OrNull': ('uniqHLL12', 'OrNull'), 'sumCountOrNull': ('sumCount', 'OrNull'), 'sumKahanOrNull': ('sumKahan', 'OrNull'), 'groupBitmapOrNull': ('groupBitmap', 'OrNull'), 'quantileGKOrNull': ('quantileGK', 'OrNull'), 'quantilesTimingWeightedOrNull': ('quantilesTimingWeighted', 'OrNull'), 'mannWhitneyUTestOrNull': ('mannWhitneyUTest', 'OrNull'), 'sumWithOverflowOrNull': ('sumWithOverflow', 'OrNull'), 'welchTTestOrNull': ('welchTTest', 'OrNull'), 'quantilesBFloat16WeightedOrNull': ('quantilesBFloat16Weighted', 'OrNull'), 'quantilesExactWeightedOrNull': ('quantilesExactWeighted', 'OrNull'), 'maxIntersectionsPositionOrNull': ('maxIntersectionsPosition', 'OrNull'), 'stochasticLogisticRegressionOrNull': ('stochasticLogisticRegression', 'OrNull'), 'uniqCombinedOrNull': ('uniqCombined', 'OrNull'), 'avgWeightedOrNull': ('avgWeighted', 'OrNull'), 'windowFunnelOrNull': ('windowFunnel', 'OrNull'), 'quantilesExactHighOrNull': ('quantilesExactHigh', 'OrNull'), 'groupBitmapAndOrNull': ('groupBitmapAnd', 'OrNull'), 'topKWeightedOrNull': ('topKWeighted', 'OrNull'), 'minOrNull': ('min', 'OrNull'), 'contingencyOrNull': ('contingency', 'OrNull'), 'sequenceCountOrNull': ('sequenceCount', 'OrNull'), 'quantilesGKOrNull': ('quantilesGK', 'OrNull'), 'last_valueOrNull': ('last_value', 'OrNull'), 'uniqThetaOrNull': ('uniqTheta', 'OrNull'), 'sequenceNextNodeOrNull': ('sequenceNextNode', 'OrNull'), 'deltaSumTimestampOrNull': ('deltaSumTimestamp', 'OrNull'), 'groupArrayMovingAvgOrNull': ('groupArrayMovingAvg', 'OrNull'), 'quantileTimingWeightedOrNull': ('quantileTimingWeighted', 'OrNull'), 'quantileDeterministicOrNull': ('quantileDeterministic', 'OrNull'), 'quantileTDigestOrNull': ('quantileTDigest', 'OrNull'), 'groupArraySampleOrNull': ('groupArraySample', 'OrNull'), 'argMaxOrNull': ('argMax', 'OrNull'), 'kurtSampOrNull': ('kurtSamp', 'OrNull'), 'varSampOrNull': ('varSamp', 'OrNull'), 'intervalLengthSumOrNull': ('intervalLengthSum', 'OrNull'), 'uniqUpToOrNull': ('uniqUpTo', 'OrNull'), 'kolmogorovSmirnovTestOrNull': ('kolmogorovSmirnovTest', 'OrNull'), 'quantileTDigestWeightedOrNull': ('quantileTDigestWeighted', 'OrNull'), 'stddevSampOrNull': ('stddevSamp', 'OrNull'), 'quantileOrNull': ('quantile', 'OrNull'), 'covarSampOrNull': ('covarSamp', 'OrNull'), 'boundingRatioOrNull': ('boundingRatio', 'OrNull'), 'uniqOrNull': ('uniq', 'OrNull'), 'sparkBarOrNull': ('sparkBar', 'OrNull'), 'anyLastOrNull': ('anyLast', 'OrNull'), 'groupArrayLastOrNull': ('groupArrayLast', 'OrNull'), 'quantileTimingOrNull': ('quantileTiming', 'OrNull'), 'retentionOrNull': ('retention', 'OrNull'), 'kurtPopOrNull': ('kurtPop', 'OrNull'), 'quantileBFloat16WeightedOrNull': ('quantileBFloat16Weighted', 'OrNull'), 'varPopOrNull': ('varPop', 'OrNull'), 'corrOrNull': ('corr', 'OrNull'), 'sequenceMatchOrNull': ('sequenceMatch', 'OrNull'), 'largestTriangleThreeBucketsOrNull': ('largestTriangleThreeBuckets', 'OrNull'), 'anyOrNull': ('any', 'OrNull'), 'cramersVOrNull': ('cramersV', 'OrNull'), 'groupBitmapXorOrNull': ('groupBitmapXor', 'OrNull'), 'quantilesTDigestWeightedOrNull': ('quantilesTDigestWeighted', 'OrNull'), 'minMapOrNull': ('minMap', 'OrNull'), 'groupBitAndOrNull': ('groupBitAnd', 'OrNull'), 'groupBitmapOrOrNull': ('groupBitmapOr', 'OrNull'), 'medianOrNull': ('median', 'OrNull'), 'stddevPopOrNull': ('stddevPop', 'OrNull'), 'uniqCombined64OrNull': ('uniqCombined64', 'OrNull'), 'quantilesInterpolatedWeightedOrNull': ('quantilesInterpolatedWeighted', 'OrNull'), 'maxOrNull': ('max', 'OrNull'), 'quantileExactWeightedOrNull': ('quantileExactWeighted', 'OrNull'), 'quantilesExactLowOrNull': ('quantilesExactLow', 'OrNull'), 'groupArrayOrNull': ('groupArray', 'OrNull'), 'quantilesTimingOrNull': ('quantilesTiming', 'OrNull'), 'topKOrNull': ('topK', 'OrNull'), 'first_valueOrNull': ('first_value', 'OrNull'), 'countResample': ('count', 'Resample'), 'rankCorrResample': ('rankCorr', 'Resample'), 'entropyResample': ('entropy', 'Resample'), 'skewSampResample': ('skewSamp', 'Resample'), 'anyHeavyResample': ('anyHeavy', 'Resample'), 'maxIntersectionsResample': ('maxIntersections', 'Resample'), 'exponentialMovingAverageResample': ('exponentialMovingAverage', 'Resample'), 'quantilesBFloat16Resample': ('quantilesBFloat16', 'Resample'), 'quantilesResample': ('quantiles', 'Resample'), 'quantilesTDigestResample': ('quantilesTDigest', 'Resample'), 'quantilesExactResample': ('quantilesExact', 'Resample'), 'studentTTestResample': ('studentTTest', 'Resample'), 'avgResample': ('avg', 'Resample'), 'quantileExactHighResample': ('quantileExactHigh', 'Resample'), 'quantileExactLowResample': ('quantileExactLow', 'Resample'), 'simpleLinearRegressionResample': ('simpleLinearRegression', 'Resample'), 'groupBitXorResample': ('groupBitXor', 'Resample'), 'histogramResample': ('histogram', 'Resample'), 'covarPopResample': ('covarPop', 'Resample'), 'stochasticLinearRegressionResample': ('stochasticLinearRegression', 'Resample'), 'meanZTestResample': ('meanZTest', 'Resample'), 'cramersVBiasCorrectedResample': ('cramersVBiasCorrected', 'Resample'), 'argMinResample': ('argMin', 'Resample'), 'quantileInterpolatedWeightedResample': ('quantileInterpolatedWeighted', 'Resample'), 'groupArrayMovingSumResample': ('groupArrayMovingSum', 'Resample'), 'quantilesDeterministicResample': ('quantilesDeterministic', 'Resample'), 'theilsUResample': ('theilsU', 'Resample'), 'groupUniqArrayResample': ('groupUniqArray', 'Resample'), 'quantileExactResample': ('quantileExact', 'Resample'), 'uniqExactResample': ('uniqExact', 'Resample'), 'quantileBFloat16Resample': ('quantileBFloat16', 'Resample'), 'exponentialTimeDecayedAvgResample': ('exponentialTimeDecayedAvg', 'Resample'), 'deltaSumResample': ('deltaSum', 'Resample'), 'maxMapResample': ('maxMap', 'Resample'), 'categoricalInformationValueResample': ('categoricalInformationValue', 'Resample'), 'groupBitOrResample': ('groupBitOr', 'Resample'), 'groupArrayInsertAtResample': ('groupArrayInsertAt', 'Resample'), 'sumResample': ('sum', 'Resample'), 'sumMapResample': ('sumMap', 'Resample'), 'skewPopResample': ('skewPop', 'Resample'), 'uniqHLL12Resample': ('uniqHLL12', 'Resample'), 'sumCountResample': ('sumCount', 'Resample'), 'sumKahanResample': ('sumKahan', 'Resample'), 'groupBitmapResample': ('groupBitmap', 'Resample'), 'quantileGKResample': ('quantileGK', 'Resample'), 'quantilesTimingWeightedResample': ('quantilesTimingWeighted', 'Resample'), 'mannWhitneyUTestResample': ('mannWhitneyUTest', 'Resample'), 'sumWithOverflowResample': ('sumWithOverflow', 'Resample'), 'welchTTestResample': ('welchTTest', 'Resample'), 'quantilesBFloat16WeightedResample': ('quantilesBFloat16Weighted', 'Resample'), 'quantilesExactWeightedResample': ('quantilesExactWeighted', 'Resample'), 'maxIntersectionsPositionResample': ('maxIntersectionsPosition', 'Resample'), 'stochasticLogisticRegressionResample': ('stochasticLogisticRegression', 'Resample'), 'uniqCombinedResample': ('uniqCombined', 'Resample'), 'avgWeightedResample': ('avgWeighted', 'Resample'), 'windowFunnelResample': ('windowFunnel', 'Resample'), 'quantilesExactHighResample': ('quantilesExactHigh', 'Resample'), 'groupBitmapAndResample': ('groupBitmapAnd', 'Resample'), 'topKWeightedResample': ('topKWeighted', 'Resample'), 'minResample': ('min', 'Resample'), 'contingencyResample': ('contingency', 'Resample'), 'sequenceCountResample': ('sequenceCount', 'Resample'), 'quantilesGKResample': ('quantilesGK', 'Resample'), 'last_valueResample': ('last_value', 'Resample'), 'uniqThetaResample': ('uniqTheta', 'Resample'), 'sequenceNextNodeResample': ('sequenceNextNode', 'Resample'), 'deltaSumTimestampResample': ('deltaSumTimestamp', 'Resample'), 'groupArrayMovingAvgResample': ('groupArrayMovingAvg', 'Resample'), 'quantileTimingWeightedResample': ('quantileTimingWeighted', 'Resample'), 'quantileDeterministicResample': ('quantileDeterministic', 'Resample'), 'quantileTDigestResample': ('quantileTDigest', 'Resample'), 'groupArraySampleResample': ('groupArraySample', 'Resample'), 'argMaxResample': ('argMax', 'Resample'), 'kurtSampResample': ('kurtSamp', 'Resample'), 'varSampResample': ('varSamp', 'Resample'), 'intervalLengthSumResample': ('intervalLengthSum', 'Resample'), 'uniqUpToResample': ('uniqUpTo', 'Resample'), 'kolmogorovSmirnovTestResample': ('kolmogorovSmirnovTest', 'Resample'), 'quantileTDigestWeightedResample': ('quantileTDigestWeighted', 'Resample'), 'stddevSampResample': ('stddevSamp', 'Resample'), 'quantileResample': ('quantile', 'Resample'), 'covarSampResample': ('covarSamp', 'Resample'), 'boundingRatioResample': ('boundingRatio', 'Resample'), 'uniqResample': ('uniq', 'Resample'), 'sparkBarResample': ('sparkBar', 'Resample'), 'anyLastResample': ('anyLast', 'Resample'), 'groupArrayLastResample': ('groupArrayLast', 'Resample'), 'quantileTimingResample': ('quantileTiming', 'Resample'), 'retentionResample': ('retention', 'Resample'), 'kurtPopResample': ('kurtPop', 'Resample'), 'quantileBFloat16WeightedResample': ('quantileBFloat16Weighted', 'Resample'), 'varPopResample': ('varPop', 'Resample'), 'corrResample': ('corr', 'Resample'), 'sequenceMatchResample': ('sequenceMatch', 'Resample'), 'largestTriangleThreeBucketsResample': ('largestTriangleThreeBuckets', 'Resample'), 'anyResample': ('any', 'Resample'), 'cramersVResample': ('cramersV', 'Resample'), 'groupBitmapXorResample': ('groupBitmapXor', 'Resample'), 'quantilesTDigestWeightedResample': ('quantilesTDigestWeighted', 'Resample'), 'minMapResample': ('minMap', 'Resample'), 'groupBitAndResample': ('groupBitAnd', 'Resample'), 'groupBitmapOrResample': ('groupBitmapOr', 'Resample'), 'medianResample': ('median', 'Resample'), 'stddevPopResample': ('stddevPop', 'Resample'), 'uniqCombined64Resample': ('uniqCombined64', 'Resample'), 'quantilesInterpolatedWeightedResample': ('quantilesInterpolatedWeighted', 'Resample'), 'maxResample': ('max', 'Resample'), 'quantileExactWeightedResample': ('quantileExactWeighted', 'Resample'), 'quantilesExactLowResample': ('quantilesExactLow', 'Resample'), 'groupArrayResample': ('groupArray', 'Resample'), 'quantilesTimingResample': ('quantilesTiming', 'Resample'), 'topKResample': ('topK', 'Resample'), 'first_valueResample': ('first_value', 'Resample'), 'countArgMin': ('count', 'ArgMin'), 'rankCorrArgMin': ('rankCorr', 'ArgMin'), 'entropyArgMin': ('entropy', 'ArgMin'), 'skewSampArgMin': ('skewSamp', 'ArgMin'), 'anyHeavyArgMin': ('anyHeavy', 'ArgMin'), 'maxIntersectionsArgMin': ('maxIntersections', 'ArgMin'), 'exponentialMovingAverageArgMin': ('exponentialMovingAverage', 'ArgMin'), 'quantilesBFloat16ArgMin': ('quantilesBFloat16', 'ArgMin'), 'quantilesArgMin': ('quantiles', 'ArgMin'), 'quantilesTDigestArgMin': ('quantilesTDigest', 'ArgMin'), 'quantilesExactArgMin': ('quantilesExact', 'ArgMin'), 'studentTTestArgMin': ('studentTTest', 'ArgMin'), 'avgArgMin': ('avg', 'ArgMin'), 'quantileExactHighArgMin': ('quantileExactHigh', 'ArgMin'), 'quantileExactLowArgMin': ('quantileExactLow', 'ArgMin'), 'simpleLinearRegressionArgMin': ('simpleLinearRegression', 'ArgMin'), 'groupBitXorArgMin': ('groupBitXor', 'ArgMin'), 'histogramArgMin': ('histogram', 'ArgMin'), 'covarPopArgMin': ('covarPop', 'ArgMin'), 'stochasticLinearRegressionArgMin': ('stochasticLinearRegression', 'ArgMin'), 'meanZTestArgMin': ('meanZTest', 'ArgMin'), 'cramersVBiasCorrectedArgMin': ('cramersVBiasCorrected', 'ArgMin'), 'argMinArgMin': ('argMin', 'ArgMin'), 'quantileInterpolatedWeightedArgMin': ('quantileInterpolatedWeighted', 'ArgMin'), 'groupArrayMovingSumArgMin': ('groupArrayMovingSum', 'ArgMin'), 'quantilesDeterministicArgMin': ('quantilesDeterministic', 'ArgMin'), 'theilsUArgMin': ('theilsU', 'ArgMin'), 'groupUniqArrayArgMin': ('groupUniqArray', 'ArgMin'), 'quantileExactArgMin': ('quantileExact', 'ArgMin'), 'uniqExactArgMin': ('uniqExact', 'ArgMin'), 'quantileBFloat16ArgMin': ('quantileBFloat16', 'ArgMin'), 'exponentialTimeDecayedAvgArgMin': ('exponentialTimeDecayedAvg', 'ArgMin'), 'deltaSumArgMin': ('deltaSum', 'ArgMin'), 'maxMapArgMin': ('maxMap', 'ArgMin'), 'categoricalInformationValueArgMin': ('categoricalInformationValue', 'ArgMin'), 'groupBitOrArgMin': ('groupBitOr', 'ArgMin'), 'groupArrayInsertAtArgMin': ('groupArrayInsertAt', 'ArgMin'), 'sumArgMin': ('sum', 'ArgMin'), 'sumMapArgMin': ('sumMap', 'ArgMin'), 'skewPopArgMin': ('skewPop', 'ArgMin'), 'uniqHLL12ArgMin': ('uniqHLL12', 'ArgMin'), 'sumCountArgMin': ('sumCount', 'ArgMin'), 'sumKahanArgMin': ('sumKahan', 'ArgMin'), 'groupBitmapArgMin': ('groupBitmap', 'ArgMin'), 'quantileGKArgMin': ('quantileGK', 'ArgMin'), 'quantilesTimingWeightedArgMin': ('quantilesTimingWeighted', 'ArgMin'), 'mannWhitneyUTestArgMin': ('mannWhitneyUTest', 'ArgMin'), 'sumWithOverflowArgMin': ('sumWithOverflow', 'ArgMin'), 'welchTTestArgMin': ('welchTTest', 'ArgMin'), 'quantilesBFloat16WeightedArgMin': ('quantilesBFloat16Weighted', 'ArgMin'), 'quantilesExactWeightedArgMin': ('quantilesExactWeighted', 'ArgMin'), 'maxIntersectionsPositionArgMin': ('maxIntersectionsPosition', 'ArgMin'), 'stochasticLogisticRegressionArgMin': ('stochasticLogisticRegression', 'ArgMin'), 'uniqCombinedArgMin': ('uniqCombined', 'ArgMin'), 'avgWeightedArgMin': ('avgWeighted', 'ArgMin'), 'windowFunnelArgMin': ('windowFunnel', 'ArgMin'), 'quantilesExactHighArgMin': ('quantilesExactHigh', 'ArgMin'), 'groupBitmapAndArgMin': ('groupBitmapAnd', 'ArgMin'), 'topKWeightedArgMin': ('topKWeighted', 'ArgMin'), 'minArgMin': ('min', 'ArgMin'), 'contingencyArgMin': ('contingency', 'ArgMin'), 'sequenceCountArgMin': ('sequenceCount', 'ArgMin'), 'quantilesGKArgMin': ('quantilesGK', 'ArgMin'), 'last_valueArgMin': ('last_value', 'ArgMin'), 'uniqThetaArgMin': ('uniqTheta', 'ArgMin'), 'sequenceNextNodeArgMin': ('sequenceNextNode', 'ArgMin'), 'deltaSumTimestampArgMin': ('deltaSumTimestamp', 'ArgMin'), 'groupArrayMovingAvgArgMin': ('groupArrayMovingAvg', 'ArgMin'), 'quantileTimingWeightedArgMin': ('quantileTimingWeighted', 'ArgMin'), 'quantileDeterministicArgMin': ('quantileDeterministic', 'ArgMin'), 'quantileTDigestArgMin': ('quantileTDigest', 'ArgMin'), 'groupArraySampleArgMin': ('groupArraySample', 'ArgMin'), 'argMaxArgMin': ('argMax', 'ArgMin'), 'kurtSampArgMin': ('kurtSamp', 'ArgMin'), 'varSampArgMin': ('varSamp', 'ArgMin'), 'intervalLengthSumArgMin': ('intervalLengthSum', 'ArgMin'), 'uniqUpToArgMin': ('uniqUpTo', 'ArgMin'), 'kolmogorovSmirnovTestArgMin': ('kolmogorovSmirnovTest', 'ArgMin'), 'quantileTDigestWeightedArgMin': ('quantileTDigestWeighted', 'ArgMin'), 'stddevSampArgMin': ('stddevSamp', 'ArgMin'), 'quantileArgMin': ('quantile', 'ArgMin'), 'covarSampArgMin': ('covarSamp', 'ArgMin'), 'boundingRatioArgMin': ('boundingRatio', 'ArgMin'), 'uniqArgMin': ('uniq', 'ArgMin'), 'sparkBarArgMin': ('sparkBar', 'ArgMin'), 'anyLastArgMin': ('anyLast', 'ArgMin'), 'groupArrayLastArgMin': ('groupArrayLast', 'ArgMin'), 'quantileTimingArgMin': ('quantileTiming', 'ArgMin'), 'retentionArgMin': ('retention', 'ArgMin'), 'kurtPopArgMin': ('kurtPop', 'ArgMin'), 'quantileBFloat16WeightedArgMin': ('quantileBFloat16Weighted', 'ArgMin'), 'varPopArgMin': ('varPop', 'ArgMin'), 'corrArgMin': ('corr', 'ArgMin'), 'sequenceMatchArgMin': ('sequenceMatch', 'ArgMin'), 'largestTriangleThreeBucketsArgMin': ('largestTriangleThreeBuckets', 'ArgMin'), 'anyArgMin': ('any', 'ArgMin'), 'cramersVArgMin': ('cramersV', 'ArgMin'), 'groupBitmapXorArgMin': ('groupBitmapXor', 'ArgMin'), 'quantilesTDigestWeightedArgMin': ('quantilesTDigestWeighted', 'ArgMin'), 'minMapArgMin': ('minMap', 'ArgMin'), 'groupBitAndArgMin': ('groupBitAnd', 'ArgMin'), 'groupBitmapOrArgMin': ('groupBitmapOr', 'ArgMin'), 'medianArgMin': ('median', 'ArgMin'), 'stddevPopArgMin': ('stddevPop', 'ArgMin'), 'uniqCombined64ArgMin': ('uniqCombined64', 'ArgMin'), 'quantilesInterpolatedWeightedArgMin': ('quantilesInterpolatedWeighted', 'ArgMin'), 'maxArgMin': ('max', 'ArgMin'), 'quantileExactWeightedArgMin': ('quantileExactWeighted', 'ArgMin'), 'quantilesExactLowArgMin': ('quantilesExactLow', 'ArgMin'), 'groupArrayArgMin': ('groupArray', 'ArgMin'), 'quantilesTimingArgMin': ('quantilesTiming', 'ArgMin'), 'topKArgMin': ('topK', 'ArgMin'), 'first_valueArgMin': ('first_value', 'ArgMin'), 'countArgMax': ('count', 'ArgMax'), 'rankCorrArgMax': ('rankCorr', 'ArgMax'), 'entropyArgMax': ('entropy', 'ArgMax'), 'skewSampArgMax': ('skewSamp', 'ArgMax'), 'anyHeavyArgMax': ('anyHeavy', 'ArgMax'), 'maxIntersectionsArgMax': ('maxIntersections', 'ArgMax'), 'exponentialMovingAverageArgMax': ('exponentialMovingAverage', 'ArgMax'), 'quantilesBFloat16ArgMax': ('quantilesBFloat16', 'ArgMax'), 'quantilesArgMax': ('quantiles', 'ArgMax'), 'quantilesTDigestArgMax': ('quantilesTDigest', 'ArgMax'), 'quantilesExactArgMax': ('quantilesExact', 'ArgMax'), 'studentTTestArgMax': ('studentTTest', 'ArgMax'), 'avgArgMax': ('avg', 'ArgMax'), 'quantileExactHighArgMax': ('quantileExactHigh', 'ArgMax'), 'quantileExactLowArgMax': ('quantileExactLow', 'ArgMax'), 'simpleLinearRegressionArgMax': ('simpleLinearRegression', 'ArgMax'), 'groupBitXorArgMax': ('groupBitXor', 'ArgMax'), 'histogramArgMax': ('histogram', 'ArgMax'), 'covarPopArgMax': ('covarPop', 'ArgMax'), 'stochasticLinearRegressionArgMax': ('stochasticLinearRegression', 'ArgMax'), 'meanZTestArgMax': ('meanZTest', 'ArgMax'), 'cramersVBiasCorrectedArgMax': ('cramersVBiasCorrected', 'ArgMax'), 'argMinArgMax': ('argMin', 'ArgMax'), 'quantileInterpolatedWeightedArgMax': ('quantileInterpolatedWeighted', 'ArgMax'), 'groupArrayMovingSumArgMax': ('groupArrayMovingSum', 'ArgMax'), 'quantilesDeterministicArgMax': ('quantilesDeterministic', 'ArgMax'), 'theilsUArgMax': ('theilsU', 'ArgMax'), 'groupUniqArrayArgMax': ('groupUniqArray', 'ArgMax'), 'quantileExactArgMax': ('quantileExact', 'ArgMax'), 'uniqExactArgMax': ('uniqExact', 'ArgMax'), 'quantileBFloat16ArgMax': ('quantileBFloat16', 'ArgMax'), 'exponentialTimeDecayedAvgArgMax': ('exponentialTimeDecayedAvg', 'ArgMax'), 'deltaSumArgMax': ('deltaSum', 'ArgMax'), 'maxMapArgMax': ('maxMap', 'ArgMax'), 'categoricalInformationValueArgMax': ('categoricalInformationValue', 'ArgMax'), 'groupBitOrArgMax': ('groupBitOr', 'ArgMax'), 'groupArrayInsertAtArgMax': ('groupArrayInsertAt', 'ArgMax'), 'sumArgMax': ('sum', 'ArgMax'), 'sumMapArgMax': ('sumMap', 'ArgMax'), 'skewPopArgMax': ('skewPop', 'ArgMax'), 'uniqHLL12ArgMax': ('uniqHLL12', 'ArgMax'), 'sumCountArgMax': ('sumCount', 'ArgMax'), 'sumKahanArgMax': ('sumKahan', 'ArgMax'), 'groupBitmapArgMax': ('groupBitmap', 'ArgMax'), 'quantileGKArgMax': ('quantileGK', 'ArgMax'), 'quantilesTimingWeightedArgMax': ('quantilesTimingWeighted', 'ArgMax'), 'mannWhitneyUTestArgMax': ('mannWhitneyUTest', 'ArgMax'), 'sumWithOverflowArgMax': ('sumWithOverflow', 'ArgMax'), 'welchTTestArgMax': ('welchTTest', 'ArgMax'), 'quantilesBFloat16WeightedArgMax': ('quantilesBFloat16Weighted', 'ArgMax'), 'quantilesExactWeightedArgMax': ('quantilesExactWeighted', 'ArgMax'), 'maxIntersectionsPositionArgMax': ('maxIntersectionsPosition', 'ArgMax'), 'stochasticLogisticRegressionArgMax': ('stochasticLogisticRegression', 'ArgMax'), 'uniqCombinedArgMax': ('uniqCombined', 'ArgMax'), 'avgWeightedArgMax': ('avgWeighted', 'ArgMax'), 'windowFunnelArgMax': ('windowFunnel', 'ArgMax'), 'quantilesExactHighArgMax': ('quantilesExactHigh', 'ArgMax'), 'groupBitmapAndArgMax': ('groupBitmapAnd', 'ArgMax'), 'topKWeightedArgMax': ('topKWeighted', 'ArgMax'), 'minArgMax': ('min', 'ArgMax'), 'contingencyArgMax': ('contingency', 'ArgMax'), 'sequenceCountArgMax': ('sequenceCount', 'ArgMax'), 'quantilesGKArgMax': ('quantilesGK', 'ArgMax'), 'last_valueArgMax': ('last_value', 'ArgMax'), 'uniqThetaArgMax': ('uniqTheta', 'ArgMax'), 'sequenceNextNodeArgMax': ('sequenceNextNode', 'ArgMax'), 'deltaSumTimestampArgMax': ('deltaSumTimestamp', 'ArgMax'), 'groupArrayMovingAvgArgMax': ('groupArrayMovingAvg', 'ArgMax'), 'quantileTimingWeightedArgMax': ('quantileTimingWeighted', 'ArgMax'), 'quantileDeterministicArgMax': ('quantileDeterministic', 'ArgMax'), 'quantileTDigestArgMax': ('quantileTDigest', 'ArgMax'), 'groupArraySampleArgMax': ('groupArraySample', 'ArgMax'), 'argMaxArgMax': ('argMax', 'ArgMax'), 'kurtSampArgMax': ('kurtSamp', 'ArgMax'), 'varSampArgMax': ('varSamp', 'ArgMax'), 'intervalLengthSumArgMax': ('intervalLengthSum', 'ArgMax'), 'uniqUpToArgMax': ('uniqUpTo', 'ArgMax'), 'kolmogorovSmirnovTestArgMax': ('kolmogorovSmirnovTest', 'ArgMax'), 'quantileTDigestWeightedArgMax': ('quantileTDigestWeighted', 'ArgMax'), 'stddevSampArgMax': ('stddevSamp', 'ArgMax'), 'quantileArgMax': ('quantile', 'ArgMax'), 'covarSampArgMax': ('covarSamp', 'ArgMax'), 'boundingRatioArgMax': ('boundingRatio', 'ArgMax'), 'uniqArgMax': ('uniq', 'ArgMax'), 'sparkBarArgMax': ('sparkBar', 'ArgMax'), 'anyLastArgMax': ('anyLast', 'ArgMax'), 'groupArrayLastArgMax': ('groupArrayLast', 'ArgMax'), 'quantileTimingArgMax': ('quantileTiming', 'ArgMax'), 'retentionArgMax': ('retention', 'ArgMax'), 'kurtPopArgMax': ('kurtPop', 'ArgMax'), 'quantileBFloat16WeightedArgMax': ('quantileBFloat16Weighted', 'ArgMax'), 'varPopArgMax': ('varPop', 'ArgMax'), 'corrArgMax': ('corr', 'ArgMax'), 'sequenceMatchArgMax': ('sequenceMatch', 'ArgMax'), 'largestTriangleThreeBucketsArgMax': ('largestTriangleThreeBuckets', 'ArgMax'), 'anyArgMax': ('any', 'ArgMax'), 'cramersVArgMax': ('cramersV', 'ArgMax'), 'groupBitmapXorArgMax': ('groupBitmapXor', 'ArgMax'), 'quantilesTDigestWeightedArgMax': ('quantilesTDigestWeighted', 'ArgMax'), 'minMapArgMax': ('minMap', 'ArgMax'), 'groupBitAndArgMax': ('groupBitAnd', 'ArgMax'), 'groupBitmapOrArgMax': ('groupBitmapOr', 'ArgMax'), 'medianArgMax': ('median', 'ArgMax'), 'stddevPopArgMax': ('stddevPop', 'ArgMax'), 'uniqCombined64ArgMax': ('uniqCombined64', 'ArgMax'), 'quantilesInterpolatedWeightedArgMax': ('quantilesInterpolatedWeighted', 'ArgMax'), 'maxArgMax': ('max', 'ArgMax'), 'quantileExactWeightedArgMax': ('quantileExactWeighted', 'ArgMax'), 'quantilesExactLowArgMax': ('quantilesExactLow', 'ArgMax'), 'groupArrayArgMax': ('groupArray', 'ArgMax'), 'quantilesTimingArgMax': ('quantilesTiming', 'ArgMax'), 'topKArgMax': ('topK', 'ArgMax'), 'first_valueArgMax': ('first_value', 'ArgMax'), 'count': ('count', ''), 'rankCorr': ('rankCorr', ''), 'entropy': ('entropy', ''), 'skewSamp': ('skewSamp', ''), 'anyHeavy': ('anyHeavy', ''), 'maxIntersections': ('maxIntersections', ''), 'exponentialMovingAverage': ('exponentialMovingAverage', ''), 'quantilesBFloat16': ('quantilesBFloat16', ''), 'quantiles': ('quantiles', ''), 'quantilesTDigest': ('quantilesTDigest', ''), 'quantilesExact': ('quantilesExact', ''), 'studentTTest': ('studentTTest', ''), 'avg': ('avg', ''), 'quantileExactHigh': ('quantileExactHigh', ''), 'quantileExactLow': ('quantileExactLow', ''), 'simpleLinearRegression': ('simpleLinearRegression', ''), 'groupBitXor': ('groupBitXor', ''), 'histogram': ('histogram', ''), 'covarPop': ('covarPop', ''), 'stochasticLinearRegression': ('stochasticLinearRegression', ''), 'meanZTest': ('meanZTest', ''), 'cramersVBiasCorrected': ('cramersVBiasCorrected', ''), 'argMin': ('argMin', ''), 'quantileInterpolatedWeighted': ('quantileInterpolatedWeighted', ''), 'groupArrayMovingSum': ('groupArrayMovingSum', ''), 'quantilesDeterministic': ('quantilesDeterministic', ''), 'theilsU': ('theilsU', ''), 'groupUniqArray': ('groupUniqArray', ''), 'quantileExact': ('quantileExact', ''), 'uniqExact': ('uniqExact', ''), 'quantileBFloat16': ('quantileBFloat16', ''), 'exponentialTimeDecayedAvg': ('exponentialTimeDecayedAvg', ''), 'deltaSum': ('deltaSum', ''), 'categoricalInformationValue': ('categoricalInformationValue', ''), 'groupBitOr': ('groupBitOr', ''), 'groupArrayInsertAt': ('groupArrayInsertAt', ''), 'sum': ('sum', ''), 'skewPop': ('skewPop', ''), 'uniqHLL12': ('uniqHLL12', ''), 'sumCount': ('sumCount', ''), 'sumKahan': ('sumKahan', ''), 'groupBitmap': ('groupBitmap', ''), 'quantileGK': ('quantileGK', ''), 'quantilesTimingWeighted': ('quantilesTimingWeighted', ''), 'mannWhitneyUTest': ('mannWhitneyUTest', ''), 'sumWithOverflow': ('sumWithOverflow', ''), 'welchTTest': ('welchTTest', ''), 'quantilesBFloat16Weighted': ('quantilesBFloat16Weighted', ''), 'quantilesExactWeighted': ('quantilesExactWeighted', ''), 'maxIntersectionsPosition': ('maxIntersectionsPosition', ''), 'stochasticLogisticRegression': ('stochasticLogisticRegression', ''), 'uniqCombined': ('uniqCombined', ''), 'avgWeighted': ('avgWeighted', ''), 'windowFunnel': ('windowFunnel', ''), 'quantilesExactHigh': ('quantilesExactHigh', ''), 'groupBitmapAnd': ('groupBitmapAnd', ''), 'topKWeighted': ('topKWeighted', ''), 'min': ('min', ''), 'contingency': ('contingency', ''), 'sequenceCount': ('sequenceCount', ''), 'quantilesGK': ('quantilesGK', ''), 'last_value': ('last_value', ''), 'uniqTheta': ('uniqTheta', ''), 'sequenceNextNode': ('sequenceNextNode', ''), 'deltaSumTimestamp': ('deltaSumTimestamp', ''), 'groupArrayMovingAvg': ('groupArrayMovingAvg', ''), 'quantileTimingWeighted': ('quantileTimingWeighted', ''), 'quantileDeterministic': ('quantileDeterministic', ''), 'quantileTDigest': ('quantileTDigest', ''), 'groupArraySample': ('groupArraySample', ''), 'argMax': ('argMax', ''), 'kurtSamp': ('kurtSamp', ''), 'varSamp': ('varSamp', ''), 'intervalLengthSum': ('intervalLengthSum', ''), 'uniqUpTo': ('uniqUpTo', ''), 'kolmogorovSmirnovTest': ('kolmogorovSmirnovTest', ''), 'quantileTDigestWeighted': ('quantileTDigestWeighted', ''), 'stddevSamp': ('stddevSamp', ''), 'quantile': ('quantile', ''), 'covarSamp': ('covarSamp', ''), 'boundingRatio': ('boundingRatio', ''), 'uniq': ('uniq', ''), 'sparkBar': ('sparkBar', ''), 'anyLast': ('anyLast', ''), 'groupArrayLast': ('groupArrayLast', ''), 'quantileTiming': ('quantileTiming', ''), 'retention': ('retention', ''), 'kurtPop': ('kurtPop', ''), 'quantileBFloat16Weighted': ('quantileBFloat16Weighted', ''), 'varPop': ('varPop', ''), 'corr': ('corr', ''), 'sequenceMatch': ('sequenceMatch', ''), 'largestTriangleThreeBuckets': ('largestTriangleThreeBuckets', ''), 'any': ('any', ''), 'cramersV': ('cramersV', ''), 'groupBitmapXor': ('groupBitmapXor', ''), 'quantilesTDigestWeighted': ('quantilesTDigestWeighted', ''), 'groupBitAnd': ('groupBitAnd', ''), 'groupBitmapOr': ('groupBitmapOr', ''), 'median': ('median', ''), 'stddevPop': ('stddevPop', ''), 'uniqCombined64': ('uniqCombined64', ''), 'quantilesInterpolatedWeighted': ('quantilesInterpolatedWeighted', ''), 'max': ('max', ''), 'quantileExactWeighted': ('quantileExactWeighted', ''), 'quantilesExactLow': ('quantilesExactLow', ''), 'groupArray': ('groupArray', ''), 'quantilesTiming': ('quantilesTiming', ''), 'topK': ('topK', ''), 'first_value': ('first_value', '')}
FUNCTIONS_WITH_ALIASED_ARGS = {'STRUCT', 'TUPLE'}
FUNCTION_PARSERS = {'CAST': <function Parser.<lambda>>, 'CONVERT': <function Parser.<lambda>>, 'DECODE': <function Parser.<lambda>>, 'EXTRACT': <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>.<lambda>>, <TokenType.ILIKE: 'ILIKE'>: <function binary_range_parser.<locals>.<lambda>>, <TokenType.IN: 'IN'>: <function Parser.<lambda>>, <TokenType.IRLIKE: 'IRLIKE'>: <function binary_range_parser.<locals>.<lambda>>, <TokenType.IS: 'IS'>: <function Parser.<lambda>>, <TokenType.LIKE: 'LIKE'>: <function binary_range_parser.<locals>.<lambda>>, <TokenType.OVERLAPS: 'OVERLAPS'>: <function binary_range_parser.<locals>.<lambda>>, <TokenType.RLIKE: 'RLIKE'>: <function binary_range_parser.<locals>.<lambda>>, <TokenType.SIMILAR_TO: 'SIMILAR_TO'>: <function binary_range_parser.<locals>.<lambda>>, <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.SEMI: 'SEMI'>, <TokenType.INNER: 'INNER'>, <TokenType.ANY: 'ANY'>, <TokenType.ANTI: 'ANTI'>, <TokenType.ASOF: 'ASOF'>, <TokenType.CROSS: 'CROSS'>, <TokenType.ARRAY: 'ARRAY'>, <TokenType.OUTER: 'OUTER'>}
TABLE_ALIAS_TOKENS = {<TokenType.NULL: 'NULL'>, <TokenType.BOOLEAN: 'BOOLEAN'>, <TokenType.LONGTEXT: 'LONGTEXT'>, <TokenType.ROWS: 'ROWS'>, <TokenType.ROW: 'ROW'>, <TokenType.KEEP: 'KEEP'>, <TokenType.XML: 'XML'>, <TokenType.LOWCARDINALITY: 'LOWCARDINALITY'>, <TokenType.INET: 'INET'>, <TokenType.CURRENT_DATETIME: 'CURRENT_DATETIME'>, <TokenType.UNIQUE: 'UNIQUE'>, <TokenType.ENUM16: 'ENUM16'>, <TokenType.IPADDRESS: 'IPADDRESS'>, <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, <TokenType.DATETIME: 'DATETIME'>, <TokenType.GEOMETRY: 'GEOMETRY'>, <TokenType.STRUCT: 'STRUCT'>, <TokenType.IDENTIFIER: 'IDENTIFIER'>, <TokenType.END: 'END'>, <TokenType.MERGE: 'MERGE'>, <TokenType.LOAD: 'LOAD'>, <TokenType.CONSTRAINT: 'CONSTRAINT'>, <TokenType.REFRESH: 'REFRESH'>, <TokenType.TSTZRANGE: 'TSTZRANGE'>, <TokenType.ENUM: 'ENUM'>, <TokenType.IPV6: 'IPV6'>, <TokenType.DATETIME64: 'DATETIME64'>, <TokenType.NESTED: 'NESTED'>, <TokenType.TOP: 'TOP'>, <TokenType.DELETE: 'DELETE'>, <TokenType.PERCENT: 'PERCENT'>, <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, <TokenType.HLLSKETCH: 'HLLSKETCH'>, <TokenType.COPY: 'COPY'>, <TokenType.ORDINALITY: 'ORDINALITY'>, <TokenType.COLLATE: 'COLLATE'>, <TokenType.TRUE: 'TRUE'>, <TokenType.FIRST: 'FIRST'>, <TokenType.SCHEMA: 'SCHEMA'>, <TokenType.DATABASE: 'DATABASE'>, <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, <TokenType.DATE: 'DATE'>, <TokenType.TIMETZ: 'TIMETZ'>, <TokenType.CACHE: 'CACHE'>, <TokenType.TEMPORARY: 'TEMPORARY'>, <TokenType.UDECIMAL: 'UDECIMAL'>, <TokenType.VARBINARY: 'VARBINARY'>, <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, <TokenType.ALL: 'ALL'>, <TokenType.KILL: 'KILL'>, <TokenType.DATE32: 'DATE32'>, <TokenType.UTINYINT: 'UTINYINT'>, <TokenType.TIMESTAMP: 'TIMESTAMP'>, <TokenType.REFERENCES: 'REFERENCES'>, <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, <TokenType.UUID: 'UUID'>, <TokenType.INT8RANGE: 'INT8RANGE'>, <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, <TokenType.ROWVERSION: 'ROWVERSION'>, <TokenType.ESCAPE: 'ESCAPE'>, <TokenType.REPLACE: 'REPLACE'>, <TokenType.PSEUDO_TYPE: 'PSEUDO_TYPE'>, <TokenType.FALSE: 'FALSE'>, <TokenType.NCHAR: 'NCHAR'>, <TokenType.LONGBLOB: 'LONGBLOB'>, <TokenType.TDIGEST: 'TDIGEST'>, <TokenType.UNPIVOT: 'UNPIVOT'>, <TokenType.BINARY: 'BINARY'>, <TokenType.TIMESTAMP_S: 'TIMESTAMP_S'>, <TokenType.VARCHAR: 'VARCHAR'>, <TokenType.COMMAND: 'COMMAND'>, <TokenType.BEGIN: 'BEGIN'>, <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, <TokenType.UNIQUEIDENTIFIER: 'UNIQUEIDENTIFIER'>, <TokenType.VAR: 'VAR'>, <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, <TokenType.DOUBLE: 'DOUBLE'>, <TokenType.MODEL: 'MODEL'>, <TokenType.IPPREFIX: 'IPPREFIX'>, <TokenType.INT4RANGE: 'INT4RANGE'>, <TokenType.SIMPLEAGGREGATEFUNCTION: 'SIMPLEAGGREGATEFUNCTION'>, <TokenType.CURRENT_USER: 'CURRENT_USER'>, <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, <TokenType.USE: 'USE'>, <TokenType.COMMENT: 'COMMENT'>, <TokenType.UINT256: 'UINT256'>, <TokenType.CHAR: 'CHAR'>, <TokenType.BIGINT: 'BIGINT'>, <TokenType.SMALLSERIAL: 'SMALLSERIAL'>, <TokenType.STORAGE_INTEGRATION: 'STORAGE_INTEGRATION'>, <TokenType.SEQUENCE: 'SEQUENCE'>, <TokenType.FOREIGN_KEY: 'FOREIGN_KEY'>, <TokenType.INT128: 'INT128'>, <TokenType.HSTORE: 'HSTORE'>, <TokenType.PROCEDURE: 'PROCEDURE'>, <TokenType.USMALLINT: 'USMALLINT'>, <TokenType.FUNCTION: 'FUNCTION'>, <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, <TokenType.MEDIUMINT: 'MEDIUMINT'>, <TokenType.SMALLMONEY: 'SMALLMONEY'>, <TokenType.EXISTS: 'EXISTS'>, <TokenType.OVERWRITE: 'OVERWRITE'>, <TokenType.NUMRANGE: 'NUMRANGE'>, <TokenType.ENUM8: 'ENUM8'>, <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, <TokenType.NAME: 'NAME'>, <TokenType.FLOAT: 'FLOAT'>, <TokenType.NVARCHAR: 'NVARCHAR'>, <TokenType.COMMIT: 'COMMIT'>, <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, <TokenType.TIMESTAMP_NS: 'TIMESTAMP_NS'>, <TokenType.DATERANGE: 'DATERANGE'>, <TokenType.SMALLINT: 'SMALLINT'>, <TokenType.OBJECT: 'OBJECT'>, <TokenType.BIGSERIAL: 'BIGSERIAL'>, <TokenType.UBIGINT: 'UBIGINT'>, <TokenType.UNKNOWN: 'UNKNOWN'>, <TokenType.ISNULL: 'ISNULL'>, <TokenType.BPCHAR: 'BPCHAR'>, <TokenType.NEXT: 'NEXT'>, <TokenType.TIME: 'TIME'>, <TokenType.TABLE: 'TABLE'>, <TokenType.UINT: 'UINT'>, <TokenType.RECURSIVE: 'RECURSIVE'>, <TokenType.TEXT: 'TEXT'>, <TokenType.TINYINT: 'TINYINT'>, <TokenType.OPERATOR: 'OPERATOR'>, <TokenType.UMEDIUMINT: 'UMEDIUMINT'>, <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, <TokenType.PRAGMA: 'PRAGMA'>, <TokenType.TIMESTAMP_MS: 'TIMESTAMP_MS'>, <TokenType.PIVOT: 'PIVOT'>, <TokenType.DECIMAL: 'DECIMAL'>, <TokenType.DESC: 'DESC'>, <TokenType.TRUNCATE: 'TRUNCATE'>, <TokenType.OVERLAPS: 'OVERLAPS'>, <TokenType.SHOW: 'SHOW'>, <TokenType.MONEY: 'MONEY'>, <TokenType.BIT: 'BIT'>, <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, <TokenType.NULLABLE: 'NULLABLE'>, <TokenType.YEAR: 'YEAR'>, <TokenType.SUPER: 'SUPER'>, <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, <TokenType.ASC: 'ASC'>, <TokenType.INTERVAL: 'INTERVAL'>, <TokenType.IS: 'IS'>, <TokenType.IMAGE: 'IMAGE'>, <TokenType.AGGREGATEFUNCTION: 'AGGREGATEFUNCTION'>, <TokenType.JSONB: 'JSONB'>, <TokenType.MAP: 'MAP'>, <TokenType.USERDEFINED: 'USERDEFINED'>, <TokenType.TINYTEXT: 'TINYTEXT'>, <TokenType.TSRANGE: 'TSRANGE'>, <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, <TokenType.CASE: 'CASE'>, <TokenType.RANGE: 'RANGE'>, <TokenType.JSON: 'JSON'>, <TokenType.SERIAL: 'SERIAL'>, <TokenType.DIV: 'DIV'>, <TokenType.TINYBLOB: 'TINYBLOB'>, <TokenType.EXECUTE: 'EXECUTE'>, <TokenType.UPDATE: 'UPDATE'>, <TokenType.VARIANT: 'VARIANT'>, <TokenType.INDEX: 'INDEX'>, <TokenType.UINT128: 'UINT128'>, <TokenType.DICTIONARY: 'DICTIONARY'>, <TokenType.FIXEDSTRING: 'FIXEDSTRING'>, <TokenType.COLUMN: 'COLUMN'>, <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, <TokenType.INT: 'INT'>, <TokenType.OBJECT_IDENTIFIER: 'OBJECT_IDENTIFIER'>, <TokenType.VIEW: 'VIEW'>, <TokenType.SOME: 'SOME'>, <TokenType.DESCRIBE: 'DESCRIBE'>, <TokenType.VOLATILE: 'VOLATILE'>, <TokenType.SET: 'SET'>, <TokenType.IPV4: 'IPV4'>, <TokenType.PARTITION: 'PARTITION'>, <TokenType.FILTER: 'FILTER'>, <TokenType.INT256: 'INT256'>, <TokenType.DEFAULT: 'DEFAULT'>}
ALIAS_TOKENS = {<TokenType.NULL: 'NULL'>, <TokenType.BOOLEAN: 'BOOLEAN'>, <TokenType.LONGTEXT: 'LONGTEXT'>, <TokenType.ROWS: 'ROWS'>, <TokenType.ROW: 'ROW'>, <TokenType.KEEP: 'KEEP'>, <TokenType.XML: 'XML'>, <TokenType.LOWCARDINALITY: 'LOWCARDINALITY'>, <TokenType.INET: 'INET'>, <TokenType.CURRENT_DATETIME: 'CURRENT_DATETIME'>, <TokenType.UNIQUE: 'UNIQUE'>, <TokenType.ENUM16: 'ENUM16'>, <TokenType.IPADDRESS: 'IPADDRESS'>, <TokenType.ARRAY: 'ARRAY'>, <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, <TokenType.DATETIME: 'DATETIME'>, <TokenType.GEOMETRY: 'GEOMETRY'>, <TokenType.ANY: 'ANY'>, <TokenType.STRUCT: 'STRUCT'>, <TokenType.IDENTIFIER: 'IDENTIFIER'>, <TokenType.END: 'END'>, <TokenType.MERGE: 'MERGE'>, <TokenType.LOAD: 'LOAD'>, <TokenType.CONSTRAINT: 'CONSTRAINT'>, <TokenType.REFRESH: 'REFRESH'>, <TokenType.TSTZRANGE: 'TSTZRANGE'>, <TokenType.ENUM: 'ENUM'>, <TokenType.IPV6: 'IPV6'>, <TokenType.DATETIME64: 'DATETIME64'>, <TokenType.NESTED: 'NESTED'>, <TokenType.TOP: 'TOP'>, <TokenType.DELETE: 'DELETE'>, <TokenType.PERCENT: 'PERCENT'>, <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, <TokenType.HLLSKETCH: 'HLLSKETCH'>, <TokenType.COPY: 'COPY'>, <TokenType.ORDINALITY: 'ORDINALITY'>, <TokenType.COLLATE: 'COLLATE'>, <TokenType.TRUE: 'TRUE'>, <TokenType.FIRST: 'FIRST'>, <TokenType.SCHEMA: 'SCHEMA'>, <TokenType.DATABASE: 'DATABASE'>, <TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, <TokenType.DATE: 'DATE'>, <TokenType.TIMETZ: 'TIMETZ'>, <TokenType.CACHE: 'CACHE'>, <TokenType.TEMPORARY: 'TEMPORARY'>, <TokenType.UDECIMAL: 'UDECIMAL'>, <TokenType.VARBINARY: 'VARBINARY'>, <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, <TokenType.ALL: 'ALL'>, <TokenType.KILL: 'KILL'>, <TokenType.DATE32: 'DATE32'>, <TokenType.SETTINGS: 'SETTINGS'>, <TokenType.ANTI: 'ANTI'>, <TokenType.UTINYINT: 'UTINYINT'>, <TokenType.TIMESTAMP: 'TIMESTAMP'>, <TokenType.REFERENCES: 'REFERENCES'>, <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, <TokenType.SEMI: 'SEMI'>, <TokenType.UUID: 'UUID'>, <TokenType.INT8RANGE: 'INT8RANGE'>, <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, <TokenType.ROWVERSION: 'ROWVERSION'>, <TokenType.ESCAPE: 'ESCAPE'>, <TokenType.REPLACE: 'REPLACE'>, <TokenType.PSEUDO_TYPE: 'PSEUDO_TYPE'>, <TokenType.FALSE: 'FALSE'>, <TokenType.NCHAR: 'NCHAR'>, <TokenType.LONGBLOB: 'LONGBLOB'>, <TokenType.TDIGEST: 'TDIGEST'>, <TokenType.UNPIVOT: 'UNPIVOT'>, <TokenType.BINARY: 'BINARY'>, <TokenType.TIMESTAMP_S: 'TIMESTAMP_S'>, <TokenType.VARCHAR: 'VARCHAR'>, <TokenType.COMMAND: 'COMMAND'>, <TokenType.BEGIN: 'BEGIN'>, <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, <TokenType.UNIQUEIDENTIFIER: 'UNIQUEIDENTIFIER'>, <TokenType.VAR: 'VAR'>, <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, <TokenType.APPLY: 'APPLY'>, <TokenType.DOUBLE: 'DOUBLE'>, <TokenType.MODEL: 'MODEL'>, <TokenType.IPPREFIX: 'IPPREFIX'>, <TokenType.INT4RANGE: 'INT4RANGE'>, <TokenType.SIMPLEAGGREGATEFUNCTION: 'SIMPLEAGGREGATEFUNCTION'>, <TokenType.CURRENT_USER: 'CURRENT_USER'>, <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, <TokenType.USE: 'USE'>, <TokenType.NATURAL: 'NATURAL'>, <TokenType.COMMENT: 'COMMENT'>, <TokenType.UINT256: 'UINT256'>, <TokenType.CHAR: 'CHAR'>, <TokenType.BIGINT: 'BIGINT'>, <TokenType.SMALLSERIAL: 'SMALLSERIAL'>, <TokenType.STORAGE_INTEGRATION: 'STORAGE_INTEGRATION'>, <TokenType.SEQUENCE: 'SEQUENCE'>, <TokenType.FULL: 'FULL'>, <TokenType.FOREIGN_KEY: 'FOREIGN_KEY'>, <TokenType.INT128: 'INT128'>, <TokenType.HSTORE: 'HSTORE'>, <TokenType.PROCEDURE: 'PROCEDURE'>, <TokenType.USMALLINT: 'USMALLINT'>, <TokenType.FUNCTION: 'FUNCTION'>, <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, <TokenType.MEDIUMINT: 'MEDIUMINT'>, <TokenType.SMALLMONEY: 'SMALLMONEY'>, <TokenType.EXISTS: 'EXISTS'>, <TokenType.OVERWRITE: 'OVERWRITE'>, <TokenType.WINDOW: 'WINDOW'>, <TokenType.NUMRANGE: 'NUMRANGE'>, <TokenType.ENUM8: 'ENUM8'>, <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, <TokenType.NAME: 'NAME'>, <TokenType.FLOAT: 'FLOAT'>, <TokenType.NVARCHAR: 'NVARCHAR'>, <TokenType.COMMIT: 'COMMIT'>, <TokenType.ASOF: 'ASOF'>, <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, <TokenType.TIMESTAMP_NS: 'TIMESTAMP_NS'>, <TokenType.DATERANGE: 'DATERANGE'>, <TokenType.SMALLINT: 'SMALLINT'>, <TokenType.OBJECT: 'OBJECT'>, <TokenType.BIGSERIAL: 'BIGSERIAL'>, <TokenType.UBIGINT: 'UBIGINT'>, <TokenType.UNKNOWN: 'UNKNOWN'>, <TokenType.ISNULL: 'ISNULL'>, <TokenType.BPCHAR: 'BPCHAR'>, <TokenType.NEXT: 'NEXT'>, <TokenType.TIME: 'TIME'>, <TokenType.TABLE: 'TABLE'>, <TokenType.UINT: 'UINT'>, <TokenType.RECURSIVE: 'RECURSIVE'>, <TokenType.TEXT: 'TEXT'>, <TokenType.TINYINT: 'TINYINT'>, <TokenType.OPERATOR: 'OPERATOR'>, <TokenType.UMEDIUMINT: 'UMEDIUMINT'>, <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, <TokenType.PRAGMA: 'PRAGMA'>, <TokenType.TIMESTAMP_MS: 'TIMESTAMP_MS'>, <TokenType.PIVOT: 'PIVOT'>, <TokenType.DECIMAL: 'DECIMAL'>, <TokenType.FINAL: 'FINAL'>, <TokenType.DESC: 'DESC'>, <TokenType.TRUNCATE: 'TRUNCATE'>, <TokenType.OVERLAPS: 'OVERLAPS'>, <TokenType.SHOW: 'SHOW'>, <TokenType.MONEY: 'MONEY'>, <TokenType.BIT: 'BIT'>, <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, <TokenType.NULLABLE: 'NULLABLE'>, <TokenType.YEAR: 'YEAR'>, <TokenType.SUPER: 'SUPER'>, <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, <TokenType.ASC: 'ASC'>, <TokenType.INTERVAL: 'INTERVAL'>, <TokenType.IS: 'IS'>, <TokenType.IMAGE: 'IMAGE'>, <TokenType.AGGREGATEFUNCTION: 'AGGREGATEFUNCTION'>, <TokenType.JSONB: 'JSONB'>, <TokenType.MAP: 'MAP'>, <TokenType.LEFT: 'LEFT'>, <TokenType.USERDEFINED: 'USERDEFINED'>, <TokenType.TINYTEXT: 'TINYTEXT'>, <TokenType.TSRANGE: 'TSRANGE'>, <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, <TokenType.CASE: 'CASE'>, <TokenType.RANGE: 'RANGE'>, <TokenType.JSON: 'JSON'>, <TokenType.SERIAL: 'SERIAL'>, <TokenType.RIGHT: 'RIGHT'>, <TokenType.DIV: 'DIV'>, <TokenType.TINYBLOB: 'TINYBLOB'>, <TokenType.EXECUTE: 'EXECUTE'>, <TokenType.UPDATE: 'UPDATE'>, <TokenType.VARIANT: 'VARIANT'>, <TokenType.INDEX: 'INDEX'>, <TokenType.UINT128: 'UINT128'>, <TokenType.DICTIONARY: 'DICTIONARY'>, <TokenType.FIXEDSTRING: 'FIXEDSTRING'>, <TokenType.COLUMN: 'COLUMN'>, <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, <TokenType.INT: 'INT'>, <TokenType.OBJECT_IDENTIFIER: 'OBJECT_IDENTIFIER'>, <TokenType.VIEW: 'VIEW'>, <TokenType.SOME: 'SOME'>, <TokenType.DESCRIBE: 'DESCRIBE'>, <TokenType.VOLATILE: 'VOLATILE'>, <TokenType.SET: 'SET'>, <TokenType.IPV4: 'IPV4'>, <TokenType.PARTITION: 'PARTITION'>, <TokenType.FILTER: 'FILTER'>, <TokenType.INT256: 'INT256'>, <TokenType.OFFSET: 'OFFSET'>, <TokenType.DEFAULT: 'DEFAULT'>}
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>>, 'REPLACE': <function ClickHouse.Parser.<lambda>>}
SCHEMA_UNNAMED_CONSTRAINTS = {'PERIOD', 'PRIMARY KEY', 'INDEX', 'FOREIGN KEY', 'CHECK', 'LIKE', 'UNIQUE', 'EXCLUDE'}
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
ID_VAR_TOKENS
INTERVAL_VARS
COMMENT_TABLE_ALIAS_TOKENS
UPDATE_ALIAS_TOKENS
TRIM_TYPES
CONJUNCTION
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
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
STRICT_CAST
PREFIXED_PIVOT_COLUMNS
IDENTIFY_PIVOT_STRINGS
ALTER_TABLE_ADD_REQUIRED_FOR_EACH_COLUMN
TABLESAMPLE_CSV
SET_REQUIRES_ASSIGNMENT_DELIMITER
TRIM_PATTERN_FIRST
STRING_ALIASES
UNION_MODIFIERS
NO_PAREN_IF_COMMANDS
JSON_ARROWS_REQUIRE_JSON_TYPE
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):
615    class Generator(generator.Generator):
616        QUERY_HINTS = False
617        STRUCT_DELIMITER = ("(", ")")
618        NVL2_SUPPORTED = False
619        TABLESAMPLE_REQUIRES_PARENS = False
620        TABLESAMPLE_SIZE_IS_ROWS = False
621        TABLESAMPLE_KEYWORDS = "SAMPLE"
622        LAST_DAY_SUPPORTS_DATE_PART = False
623        CAN_IMPLEMENT_ARRAY_ANY = True
624        SUPPORTS_TO_NUMBER = False
625
626        STRING_TYPE_MAPPING = {
627            exp.DataType.Type.CHAR: "String",
628            exp.DataType.Type.LONGBLOB: "String",
629            exp.DataType.Type.LONGTEXT: "String",
630            exp.DataType.Type.MEDIUMBLOB: "String",
631            exp.DataType.Type.MEDIUMTEXT: "String",
632            exp.DataType.Type.TINYBLOB: "String",
633            exp.DataType.Type.TINYTEXT: "String",
634            exp.DataType.Type.TEXT: "String",
635            exp.DataType.Type.VARBINARY: "String",
636            exp.DataType.Type.VARCHAR: "String",
637        }
638
639        SUPPORTED_JSON_PATH_PARTS = {
640            exp.JSONPathKey,
641            exp.JSONPathRoot,
642            exp.JSONPathSubscript,
643        }
644
645        TYPE_MAPPING = {
646            **generator.Generator.TYPE_MAPPING,
647            **STRING_TYPE_MAPPING,
648            exp.DataType.Type.ARRAY: "Array",
649            exp.DataType.Type.BIGINT: "Int64",
650            exp.DataType.Type.DATE32: "Date32",
651            exp.DataType.Type.DATETIME64: "DateTime64",
652            exp.DataType.Type.DOUBLE: "Float64",
653            exp.DataType.Type.ENUM: "Enum",
654            exp.DataType.Type.ENUM8: "Enum8",
655            exp.DataType.Type.ENUM16: "Enum16",
656            exp.DataType.Type.FIXEDSTRING: "FixedString",
657            exp.DataType.Type.FLOAT: "Float32",
658            exp.DataType.Type.INT: "Int32",
659            exp.DataType.Type.MEDIUMINT: "Int32",
660            exp.DataType.Type.INT128: "Int128",
661            exp.DataType.Type.INT256: "Int256",
662            exp.DataType.Type.LOWCARDINALITY: "LowCardinality",
663            exp.DataType.Type.MAP: "Map",
664            exp.DataType.Type.NESTED: "Nested",
665            exp.DataType.Type.NULLABLE: "Nullable",
666            exp.DataType.Type.SMALLINT: "Int16",
667            exp.DataType.Type.STRUCT: "Tuple",
668            exp.DataType.Type.TINYINT: "Int8",
669            exp.DataType.Type.UBIGINT: "UInt64",
670            exp.DataType.Type.UINT: "UInt32",
671            exp.DataType.Type.UINT128: "UInt128",
672            exp.DataType.Type.UINT256: "UInt256",
673            exp.DataType.Type.USMALLINT: "UInt16",
674            exp.DataType.Type.UTINYINT: "UInt8",
675            exp.DataType.Type.IPV4: "IPv4",
676            exp.DataType.Type.IPV6: "IPv6",
677            exp.DataType.Type.AGGREGATEFUNCTION: "AggregateFunction",
678            exp.DataType.Type.SIMPLEAGGREGATEFUNCTION: "SimpleAggregateFunction",
679        }
680
681        TRANSFORMS = {
682            **generator.Generator.TRANSFORMS,
683            exp.AnyValue: rename_func("any"),
684            exp.ApproxDistinct: rename_func("uniq"),
685            exp.ArrayFilter: lambda self, e: self.func("arrayFilter", e.expression, e.this),
686            exp.ArraySize: rename_func("LENGTH"),
687            exp.ArraySum: rename_func("arraySum"),
688            exp.ArgMax: arg_max_or_min_no_count("argMax"),
689            exp.ArgMin: arg_max_or_min_no_count("argMin"),
690            exp.Array: inline_array_sql,
691            exp.CastToStrType: rename_func("CAST"),
692            exp.CountIf: rename_func("countIf"),
693            exp.CompressColumnConstraint: lambda self,
694            e: f"CODEC({self.expressions(e, key='this', flat=True)})",
695            exp.ComputedColumnConstraint: lambda self,
696            e: f"{'MATERIALIZED' if e.args.get('persisted') else 'ALIAS'} {self.sql(e, 'this')}",
697            exp.CurrentDate: lambda self, e: self.func("CURRENT_DATE"),
698            exp.DateAdd: date_delta_sql("DATE_ADD"),
699            exp.DateDiff: date_delta_sql("DATE_DIFF"),
700            exp.Explode: rename_func("arrayJoin"),
701            exp.Final: lambda self, e: f"{self.sql(e, 'this')} FINAL",
702            exp.IsNan: rename_func("isNaN"),
703            exp.JSONExtract: json_extract_segments("JSONExtractString", quoted_index=False),
704            exp.JSONExtractScalar: json_extract_segments("JSONExtractString", quoted_index=False),
705            exp.JSONPathKey: json_path_key_only_name,
706            exp.JSONPathRoot: lambda *_: "",
707            exp.Map: lambda self, e: _lower_func(var_map_sql(self, e)),
708            exp.Nullif: rename_func("nullIf"),
709            exp.PartitionedByProperty: lambda self, e: f"PARTITION BY {self.sql(e, 'this')}",
710            exp.Pivot: no_pivot_sql,
711            exp.Quantile: _quantile_sql,
712            exp.RegexpLike: lambda self, e: self.func("match", e.this, e.expression),
713            exp.Rand: rename_func("randCanonical"),
714            exp.Select: transforms.preprocess([transforms.eliminate_qualify]),
715            exp.StartsWith: rename_func("startsWith"),
716            exp.StrPosition: lambda self, e: self.func(
717                "position", e.this, e.args.get("substr"), e.args.get("position")
718            ),
719            exp.TimeToStr: lambda self, e: self.func(
720                "DATE_FORMAT", e.this, self.format_time(e), e.args.get("timezone")
721            ),
722            exp.VarMap: lambda self, e: _lower_func(var_map_sql(self, e)),
723            exp.Xor: lambda self, e: self.func("xor", e.this, e.expression, *e.expressions),
724            exp.MD5Digest: rename_func("MD5"),
725            exp.MD5: lambda self, e: self.func("LOWER", self.func("HEX", self.func("MD5", e.this))),
726            exp.SHA: rename_func("SHA1"),
727            exp.SHA2: lambda self, e: self.func(
728                "SHA256" if e.text("length") == "256" else "SHA512", e.this
729            ),
730        }
731
732        PROPERTIES_LOCATION = {
733            **generator.Generator.PROPERTIES_LOCATION,
734            exp.VolatileProperty: exp.Properties.Location.UNSUPPORTED,
735            exp.PartitionedByProperty: exp.Properties.Location.POST_SCHEMA,
736            exp.OnCluster: exp.Properties.Location.POST_NAME,
737        }
738
739        JOIN_HINTS = False
740        TABLE_HINTS = False
741        EXPLICIT_UNION = True
742        GROUPINGS_SEP = ""
743        OUTER_UNION_MODIFIERS = False
744
745        # there's no list in docs, but it can be found in Clickhouse code
746        # see `ClickHouse/src/Parsers/ParserCreate*.cpp`
747        ON_CLUSTER_TARGETS = {
748            "DATABASE",
749            "TABLE",
750            "VIEW",
751            "DICTIONARY",
752            "INDEX",
753            "FUNCTION",
754            "NAMED COLLECTION",
755        }
756
757        def _jsonpathsubscript_sql(self, expression: exp.JSONPathSubscript) -> str:
758            this = self.json_path_part(expression.this)
759            return str(int(this) + 1) if is_int(this) else this
760
761        def likeproperty_sql(self, expression: exp.LikeProperty) -> str:
762            return f"AS {self.sql(expression, 'this')}"
763
764        def _any_to_has(
765            self,
766            expression: exp.EQ | exp.NEQ,
767            default: t.Callable[[t.Any], str],
768            prefix: str = "",
769        ) -> str:
770            if isinstance(expression.left, exp.Any):
771                arr = expression.left
772                this = expression.right
773            elif isinstance(expression.right, exp.Any):
774                arr = expression.right
775                this = expression.left
776            else:
777                return default(expression)
778
779            return prefix + self.func("has", arr.this.unnest(), this)
780
781        def eq_sql(self, expression: exp.EQ) -> str:
782            return self._any_to_has(expression, super().eq_sql)
783
784        def neq_sql(self, expression: exp.NEQ) -> str:
785            return self._any_to_has(expression, super().neq_sql, "NOT ")
786
787        def regexpilike_sql(self, expression: exp.RegexpILike) -> str:
788            # Manually add a flag to make the search case-insensitive
789            regex = self.func("CONCAT", "'(?i)'", expression.expression)
790            return self.func("match", expression.this, regex)
791
792        def datatype_sql(self, expression: exp.DataType) -> str:
793            # String is the standard ClickHouse type, every other variant is just an alias.
794            # Additionally, any supplied length parameter will be ignored.
795            #
796            # https://clickhouse.com/docs/en/sql-reference/data-types/string
797            if expression.this in self.STRING_TYPE_MAPPING:
798                return "String"
799
800            return super().datatype_sql(expression)
801
802        def cte_sql(self, expression: exp.CTE) -> str:
803            if expression.args.get("scalar"):
804                this = self.sql(expression, "this")
805                alias = self.sql(expression, "alias")
806                return f"{this} AS {alias}"
807
808            return super().cte_sql(expression)
809
810        def after_limit_modifiers(self, expression: exp.Expression) -> t.List[str]:
811            return super().after_limit_modifiers(expression) + [
812                (
813                    self.seg("SETTINGS ") + self.expressions(expression, key="settings", flat=True)
814                    if expression.args.get("settings")
815                    else ""
816                ),
817                (
818                    self.seg("FORMAT ") + self.sql(expression, "format")
819                    if expression.args.get("format")
820                    else ""
821                ),
822            ]
823
824        def parameterizedagg_sql(self, expression: exp.ParameterizedAgg) -> str:
825            params = self.expressions(expression, key="params", flat=True)
826            return self.func(expression.name, *expression.expressions) + f"({params})"
827
828        def anonymousaggfunc_sql(self, expression: exp.AnonymousAggFunc) -> str:
829            return self.func(expression.name, *expression.expressions)
830
831        def combinedaggfunc_sql(self, expression: exp.CombinedAggFunc) -> str:
832            return self.anonymousaggfunc_sql(expression)
833
834        def combinedparameterizedagg_sql(self, expression: exp.CombinedParameterizedAgg) -> str:
835            return self.parameterizedagg_sql(expression)
836
837        def placeholder_sql(self, expression: exp.Placeholder) -> str:
838            return f"{{{expression.name}: {self.sql(expression, 'kind')}}}"
839
840        def oncluster_sql(self, expression: exp.OnCluster) -> str:
841            return f"ON CLUSTER {self.sql(expression, 'this')}"
842
843        def createable_sql(self, expression: exp.Create, locations: t.DefaultDict) -> str:
844            if expression.kind in self.ON_CLUSTER_TARGETS and locations.get(
845                exp.Properties.Location.POST_NAME
846            ):
847                this_name = self.sql(expression.this, "this")
848                this_properties = " ".join(
849                    [self.sql(prop) for prop in locations[exp.Properties.Location.POST_NAME]]
850                )
851                this_schema = self.schema_columns_sql(expression.this)
852                return f"{this_name}{self.sep()}{this_properties}{self.sep()}{this_schema}"
853
854            return super().createable_sql(expression, locations)
855
856        def prewhere_sql(self, expression: exp.PreWhere) -> str:
857            this = self.indent(self.sql(expression, "this"))
858            return f"{self.seg('PREWHERE')}{self.sep()}{this}"
859
860        def indexcolumnconstraint_sql(self, expression: exp.IndexColumnConstraint) -> str:
861            this = self.sql(expression, "this")
862            this = f" {this}" if this else ""
863            expr = self.sql(expression, "expression")
864            expr = f" {expr}" if expr else ""
865            index_type = self.sql(expression, "index_type")
866            index_type = f" TYPE {index_type}" if index_type else ""
867            granularity = self.sql(expression, "granularity")
868            granularity = f" GRANULARITY {granularity}" if granularity else ""
869
870            return f"INDEX{this}{expr}{index_type}{granularity}"
871
872        def partition_sql(self, expression: exp.Partition) -> str:
873            return f"PARTITION {self.expressions(expression, flat=True)}"
874
875        def partitionid_sql(self, expression: exp.PartitionId) -> str:
876            return f"ID {self.sql(expression.this)}"
877
878        def replacepartition_sql(self, expression: exp.ReplacePartition) -> str:
879            return (
880                f"REPLACE {self.sql(expression.expression)} FROM {self.sql(expression, 'source')}"
881            )

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
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.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.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.RemoteWithConnectionModelProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.ReturnsProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.SampleProperty'>: <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.TemporaryProperty'>: <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 date_delta_sql.<locals>._delta_sql>, <class 'sqlglot.expressions.DateDiff'>: <function date_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.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 ClickHouse.Generator.<lambda>>}
PROPERTIES_LOCATION = {<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.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.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.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.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'>}
JOIN_HINTS = False
TABLE_HINTS = False
EXPLICIT_UNION = True
GROUPINGS_SEP = ''
OUTER_UNION_MODIFIERS = False
ON_CLUSTER_TARGETS = {'TABLE', 'VIEW', 'INDEX', 'NAMED COLLECTION', 'DATABASE', 'DICTIONARY', 'FUNCTION'}
def likeproperty_sql(self, expression: sqlglot.expressions.LikeProperty) -> str:
761        def likeproperty_sql(self, expression: exp.LikeProperty) -> str:
762            return f"AS {self.sql(expression, 'this')}"
def eq_sql(self, expression: sqlglot.expressions.EQ) -> str:
781        def eq_sql(self, expression: exp.EQ) -> str:
782            return self._any_to_has(expression, super().eq_sql)
def neq_sql(self, expression: sqlglot.expressions.NEQ) -> str:
784        def neq_sql(self, expression: exp.NEQ) -> str:
785            return self._any_to_has(expression, super().neq_sql, "NOT ")
def regexpilike_sql(self, expression: sqlglot.expressions.RegexpILike) -> str:
787        def regexpilike_sql(self, expression: exp.RegexpILike) -> str:
788            # Manually add a flag to make the search case-insensitive
789            regex = self.func("CONCAT", "'(?i)'", expression.expression)
790            return self.func("match", expression.this, regex)
def datatype_sql(self, expression: sqlglot.expressions.DataType) -> str:
792        def datatype_sql(self, expression: exp.DataType) -> str:
793            # String is the standard ClickHouse type, every other variant is just an alias.
794            # Additionally, any supplied length parameter will be ignored.
795            #
796            # https://clickhouse.com/docs/en/sql-reference/data-types/string
797            if expression.this in self.STRING_TYPE_MAPPING:
798                return "String"
799
800            return super().datatype_sql(expression)
def cte_sql(self, expression: sqlglot.expressions.CTE) -> str:
802        def cte_sql(self, expression: exp.CTE) -> str:
803            if expression.args.get("scalar"):
804                this = self.sql(expression, "this")
805                alias = self.sql(expression, "alias")
806                return f"{this} AS {alias}"
807
808            return super().cte_sql(expression)
def after_limit_modifiers(self, expression: sqlglot.expressions.Expression) -> List[str]:
810        def after_limit_modifiers(self, expression: exp.Expression) -> t.List[str]:
811            return super().after_limit_modifiers(expression) + [
812                (
813                    self.seg("SETTINGS ") + self.expressions(expression, key="settings", flat=True)
814                    if expression.args.get("settings")
815                    else ""
816                ),
817                (
818                    self.seg("FORMAT ") + self.sql(expression, "format")
819                    if expression.args.get("format")
820                    else ""
821                ),
822            ]
def parameterizedagg_sql(self, expression: sqlglot.expressions.ParameterizedAgg) -> str:
824        def parameterizedagg_sql(self, expression: exp.ParameterizedAgg) -> str:
825            params = self.expressions(expression, key="params", flat=True)
826            return self.func(expression.name, *expression.expressions) + f"({params})"
def anonymousaggfunc_sql(self, expression: sqlglot.expressions.AnonymousAggFunc) -> str:
828        def anonymousaggfunc_sql(self, expression: exp.AnonymousAggFunc) -> str:
829            return self.func(expression.name, *expression.expressions)
def combinedaggfunc_sql(self, expression: sqlglot.expressions.CombinedAggFunc) -> str:
831        def combinedaggfunc_sql(self, expression: exp.CombinedAggFunc) -> str:
832            return self.anonymousaggfunc_sql(expression)
def combinedparameterizedagg_sql(self, expression: sqlglot.expressions.CombinedParameterizedAgg) -> str:
834        def combinedparameterizedagg_sql(self, expression: exp.CombinedParameterizedAgg) -> str:
835            return self.parameterizedagg_sql(expression)
def placeholder_sql(self, expression: sqlglot.expressions.Placeholder) -> str:
837        def placeholder_sql(self, expression: exp.Placeholder) -> str:
838            return f"{{{expression.name}: {self.sql(expression, 'kind')}}}"
def oncluster_sql(self, expression: sqlglot.expressions.OnCluster) -> str:
840        def oncluster_sql(self, expression: exp.OnCluster) -> str:
841            return f"ON CLUSTER {self.sql(expression, 'this')}"
def createable_sql( self, expression: sqlglot.expressions.Create, locations: DefaultDict) -> str:
843        def createable_sql(self, expression: exp.Create, locations: t.DefaultDict) -> str:
844            if expression.kind in self.ON_CLUSTER_TARGETS and locations.get(
845                exp.Properties.Location.POST_NAME
846            ):
847                this_name = self.sql(expression.this, "this")
848                this_properties = " ".join(
849                    [self.sql(prop) for prop in locations[exp.Properties.Location.POST_NAME]]
850                )
851                this_schema = self.schema_columns_sql(expression.this)
852                return f"{this_name}{self.sep()}{this_properties}{self.sep()}{this_schema}"
853
854            return super().createable_sql(expression, locations)
def prewhere_sql(self, expression: sqlglot.expressions.PreWhere) -> str:
856        def prewhere_sql(self, expression: exp.PreWhere) -> str:
857            this = self.indent(self.sql(expression, "this"))
858            return f"{self.seg('PREWHERE')}{self.sep()}{this}"
def indexcolumnconstraint_sql(self, expression: sqlglot.expressions.IndexColumnConstraint) -> str:
860        def indexcolumnconstraint_sql(self, expression: exp.IndexColumnConstraint) -> str:
861            this = self.sql(expression, "this")
862            this = f" {this}" if this else ""
863            expr = self.sql(expression, "expression")
864            expr = f" {expr}" if expr else ""
865            index_type = self.sql(expression, "index_type")
866            index_type = f" TYPE {index_type}" if index_type else ""
867            granularity = self.sql(expression, "granularity")
868            granularity = f" GRANULARITY {granularity}" if granularity else ""
869
870            return f"INDEX{this}{expr}{index_type}{granularity}"
def partition_sql(self, expression: sqlglot.expressions.Partition) -> str:
872        def partition_sql(self, expression: exp.Partition) -> str:
873            return f"PARTITION {self.expressions(expression, flat=True)}"
def partitionid_sql(self, expression: sqlglot.expressions.PartitionId) -> str:
875        def partitionid_sql(self, expression: exp.PartitionId) -> str:
876            return f"ID {self.sql(expression.this)}"
def replacepartition_sql(self, expression: sqlglot.expressions.ReplacePartition) -> str:
878        def replacepartition_sql(self, expression: exp.ReplacePartition) -> str:
879            return (
880                f"REPLACE {self.sql(expression.expression)} FROM {self.sql(expression, 'source')}"
881            )
SELECT_KINDS: Tuple[str, ...] = ()
TRY_SUPPORTED = 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
COLUMN_JOIN_MARKS_SUPPORTED
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_MAPPING
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
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
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
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