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 )
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"
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'>
ESCAPED_SEQUENCES: Dict[str, str] =
{'\x07': '\\a', '\x08': '\\b', '\x0c': '\\f', '\n': '\\n', '\r': '\\r', '\t': '\\t', '\x0b': '\\v', '\\': '\\\\', '\x00': '\\0'}
Inherited Members
- sqlglot.dialects.dialect.Dialect
- Dialect
- INDEX_OFFSET
- WEEK_OFFSET
- UNNEST_COLUMN_ONLY
- ALIAS_POST_TABLESAMPLE
- TABLESAMPLE_SIZE_IS_PERCENT
- NORMALIZATION_STRATEGY
- IDENTIFIERS_CAN_START_WITH_DIGIT
- DPIPE_IS_STRING_CONCAT
- STRICT_STRING_CONCAT
- SUPPORTS_SEMI_ANTI_JOIN
- TYPED_DIVISION
- CONCAT_COALESCE
- DATE_FORMAT
- DATEINT_FORMAT
- TIME_FORMAT
- TIME_MAPPING
- FORMAT_MAPPING
- PSEUDOCOLUMNS
- PREFER_CTE_ALIAS_COLUMN
- COPY_PARAMS_ARE_CSV
- get_or_raise
- format_time
- normalize_identifier
- case_sensitive
- can_identify
- quote_identifier
- to_json_path
- parse
- parse_into
- generate
- transpile
- tokenize
- tokenizer
- parser
- generator
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 }
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'>}
Inherited Members
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
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 =
{'groupBitmapAnd', 'quantileTDigest', 'anyHeavy', 'kurtSamp', 'largestTriangleThreeBuckets', 'groupBitOr', 'groupBitmapXor', 'quantilesTDigestWeighted', 'quantilesExactWeighted', 'quantilesBFloat16Weighted', 'welchTTest', 'uniqTheta', 'stochasticLogisticRegression', 'quantileExactWeighted', 'exponentialTimeDecayedAvg', 'skewSamp', 'sumWithOverflow', 'last_value', 'groupArrayLast', 'groupUniqArray', 'uniq', 'contingency', 'quantilesGK', 'meanZTest', 'sparkBar', 'avg', 'quantileExact', 'quantileInterpolatedWeighted', 'quantilesBFloat16', 'quantileBFloat16', 'quantileTDigestWeighted', 'theilsU', 'deltaSumTimestamp', 'groupBitXor', 'quantileExactLow', 'quantileBFloat16Weighted', 'min', 'sequenceMatch', 'kurtPop', 'quantileTimingWeighted', 'topKWeighted', 'max', 'groupArrayMovingSum', 'stochasticLinearRegression', 'median', 'studentTTest', 'sumMap', 'simpleLinearRegression', 'varSamp', 'groupBitAnd', 'topK', 'argMin', 'mannWhitneyUTest', 'skewPop', 'intervalLengthSum', 'quantilesExactHigh', 'corr', 'groupBitmapOr', 'uniqHLL12', 'sum', 'quantilesInterpolatedWeighted', 'anyLast', 'sequenceNextNode', 'groupArraySample', 'quantileExactHigh', 'groupBitmap', 'quantilesExact', 'exponentialMovingAverage', 'quantilesTDigest', 'boundingRatio', 'categoricalInformationValue', 'varPop', 'uniqCombined', 'cramersVBiasCorrected', 'quantileDeterministic', 'groupArrayMovingAvg', 'quantile', 'maxMap', 'quantilesTimingWeighted', 'entropy', 'maxIntersections', 'covarPop', 'first_value', 'quantilesDeterministic', 'retention', 'groupArray', 'stddevPop', 'uniqUpTo', 'histogram', 'avgWeighted', 'uniqExact', 'covarSamp', 'sequenceCount', 'any', 'quantilesExactLow', 'stddevSamp', 'minMap', 'quantilesTiming', 'maxIntersectionsPosition', 'deltaSum', 'quantileTiming', 'sumCount', 'quantiles', 'quantileGK', 'sumKahan', 'uniqCombined64', 'rankCorr', 'groupArrayInsertAt', 'cramersV', 'windowFunnel', 'kolmogorovSmirnovTest', 'count', 'argMax'}
AGG_FUNCTIONS_SUFFIXES =
['If', 'Array', 'ArrayIf', 'Map', 'SimpleState', 'State', 'Merge', 'MergeState', 'ForEach', 'Distinct', 'OrDefault', 'OrNull', 'Resample', 'ArgMin', 'ArgMax']
FUNC_TOKENS =
{<TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, <TokenType.COLLATE: 'COLLATE'>, <TokenType.SIMPLEAGGREGATEFUNCTION: 'SIMPLEAGGREGATEFUNCTION'>, <TokenType.EXISTS: 'EXISTS'>, <TokenType.SEQUENCE: 'SEQUENCE'>, <TokenType.CURRENT_DATETIME: 'CURRENT_DATETIME'>, <TokenType.TDIGEST: 'TDIGEST'>, <TokenType.IDENTIFIER: 'IDENTIFIER'>, <TokenType.BINARY: 'BINARY'>, <TokenType.IPADDRESS: 'IPADDRESS'>, <TokenType.RLIKE: 'RLIKE'>, <TokenType.IPPREFIX: 'IPPREFIX'>, <TokenType.LONGBLOB: 'LONGBLOB'>, <TokenType.JSONB: 'JSONB'>, <TokenType.SMALLSERIAL: 'SMALLSERIAL'>, <TokenType.DATERANGE: 'DATERANGE'>, <TokenType.INT: 'INT'>, <TokenType.TINYBLOB: 'TINYBLOB'>, <TokenType.CHAR: 'CHAR'>, <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, <TokenType.TIMESTAMP_S: 'TIMESTAMP_S'>, <TokenType.TSRANGE: 'TSRANGE'>, <TokenType.TRUNCATE: 'TRUNCATE'>, <TokenType.STRUCT: 'STRUCT'>, <TokenType.TABLE: 'TABLE'>, <TokenType.ENUM8: 'ENUM8'>, <TokenType.ISNULL: 'ISNULL'>, <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, <TokenType.UDECIMAL: 'UDECIMAL'>, <TokenType.OFFSET: 'OFFSET'>, <TokenType.VARIANT: 'VARIANT'>, <TokenType.REPLACE: 'REPLACE'>, <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, <TokenType.INT256: 'INT256'>, <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, <TokenType.UNKNOWN: 'UNKNOWN'>, <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, <TokenType.DATE: 'DATE'>, <TokenType.FORMAT: 'FORMAT'>, <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, <TokenType.IPV6: 'IPV6'>, <TokenType.TIME: 'TIME'>, <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, <TokenType.SMALLINT: 'SMALLINT'>, <TokenType.PRIMARY_KEY: 'PRIMARY_KEY'>, <TokenType.TIMESTAMP_MS: 'TIMESTAMP_MS'>, <TokenType.FILTER: 'FILTER'>, <TokenType.INET: 'INET'>, <TokenType.INTERVAL: 'INTERVAL'>, <TokenType.UINT: 'UINT'>, <TokenType.IMAGE: 'IMAGE'>, <TokenType.USMALLINT: 'USMALLINT'>, <TokenType.NAME: 'NAME'>, <TokenType.DATE32: 'DATE32'>, <TokenType.LEFT: 'LEFT'>, <TokenType.TINYTEXT: 'TINYTEXT'>, <TokenType.ENUM: 'ENUM'>, <TokenType.ALL: 'ALL'>, <TokenType.BOOLEAN: 'BOOLEAN'>, <TokenType.NULL: 'NULL'>, <TokenType.JSON: 'JSON'>, <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, <TokenType.INT8RANGE: 'INT8RANGE'>, <TokenType.TIMESTAMP: 'TIMESTAMP'>, <TokenType.VARBINARY: 'VARBINARY'>, <TokenType.ARRAY: 'ARRAY'>, <TokenType.RIGHT: 'RIGHT'>, <TokenType.GEOMETRY: 'GEOMETRY'>, <TokenType.OBJECT: 'OBJECT'>, <TokenType.INT128: 'INT128'>, <TokenType.UINT256: 'UINT256'>, <TokenType.SUPER: 'SUPER'>, <TokenType.UINT128: 'UINT128'>, <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, <TokenType.LIKE: 'LIKE'>, <TokenType.UNNEST: 'UNNEST'>, <TokenType.NULLABLE: 'NULLABLE'>, <TokenType.MONEY: 'MONEY'>, <TokenType.SET: 'SET'>, <TokenType.NESTED: 'NESTED'>, <TokenType.GLOB: 'GLOB'>, <TokenType.INT4RANGE: 'INT4RANGE'>, <TokenType.MAP: 'MAP'>, <TokenType.XML: 'XML'>, <TokenType.UNIQUEIDENTIFIER: 'UNIQUEIDENTIFIER'>, <TokenType.BIGSERIAL: 'BIGSERIAL'>, <TokenType.COMMAND: 'COMMAND'>, <TokenType.DATETIME: 'DATETIME'>, <TokenType.FIXEDSTRING: 'FIXEDSTRING'>, <TokenType.NCHAR: 'NCHAR'>, <TokenType.UUID: 'UUID'>, <TokenType.XOR: 'XOR'>, <TokenType.TIMESTAMP_NS: 'TIMESTAMP_NS'>, <TokenType.LONGTEXT: 'LONGTEXT'>, <TokenType.CURRENT_USER: 'CURRENT_USER'>, <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, <TokenType.UMEDIUMINT: 'UMEDIUMINT'>, <TokenType.MERGE: 'MERGE'>, <TokenType.NVARCHAR: 'NVARCHAR'>, <TokenType.USERDEFINED: 'USERDEFINED'>, <TokenType.ILIKE: 'ILIKE'>, <TokenType.VARCHAR: 'VARCHAR'>, <TokenType.MEDIUMINT: 'MEDIUMINT'>, <TokenType.SOME: 'SOME'>, <TokenType.SMALLMONEY: 'SMALLMONEY'>, <TokenType.DECIMAL: 'DECIMAL'>, <TokenType.BPCHAR: 'BPCHAR'>, <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, <TokenType.INSERT: 'INSERT'>, <TokenType.BIT: 'BIT'>, <TokenType.PSEUDO_TYPE: 'PSEUDO_TYPE'>, <TokenType.HLLSKETCH: 'HLLSKETCH'>, <TokenType.HSTORE: 'HSTORE'>, <TokenType.DATETIME64: 'DATETIME64'>, <TokenType.INDEX: 'INDEX'>, <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, <TokenType.TEXT: 'TEXT'>, <TokenType.ENUM16: 'ENUM16'>, <TokenType.IPV4: 'IPV4'>, <TokenType.WINDOW: 'WINDOW'>, <TokenType.ROW: 'ROW'>, <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, <TokenType.AGGREGATEFUNCTION: 'AGGREGATEFUNCTION'>, <TokenType.TIMETZ: 'TIMETZ'>, <TokenType.ROWVERSION: 'ROWVERSION'>, <TokenType.DOUBLE: 'DOUBLE'>, <TokenType.ANY: 'ANY'>, <TokenType.OBJECT_IDENTIFIER: 'OBJECT_IDENTIFIER'>, <TokenType.TSTZRANGE: 'TSTZRANGE'>, <TokenType.FLOAT: 'FLOAT'>, <TokenType.LOWCARDINALITY: 'LOWCARDINALITY'>, <TokenType.UTINYINT: 'UTINYINT'>, <TokenType.UBIGINT: 'UBIGINT'>, <TokenType.SERIAL: 'SERIAL'>, <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, <TokenType.YEAR: 'YEAR'>, <TokenType.BIGINT: 'BIGINT'>, <TokenType.VAR: 'VAR'>, <TokenType.RANGE: 'RANGE'>, <TokenType.NUMRANGE: 'NUMRANGE'>, <TokenType.TINYINT: 'TINYINT'>, <TokenType.FIRST: 'FIRST'>}
AGG_FUNC_MAPPING =
{'groupBitmapAndIf': ('groupBitmapAnd', 'If'), 'quantileTDigestIf': ('quantileTDigest', 'If'), 'anyHeavyIf': ('anyHeavy', 'If'), 'kurtSampIf': ('kurtSamp', 'If'), 'largestTriangleThreeBucketsIf': ('largestTriangleThreeBuckets', 'If'), 'groupBitOrIf': ('groupBitOr', 'If'), 'groupBitmapXorIf': ('groupBitmapXor', 'If'), 'quantilesTDigestWeightedIf': ('quantilesTDigestWeighted', 'If'), 'quantilesExactWeightedIf': ('quantilesExactWeighted', 'If'), 'quantilesBFloat16WeightedIf': ('quantilesBFloat16Weighted', 'If'), 'welchTTestIf': ('welchTTest', 'If'), 'uniqThetaIf': ('uniqTheta', 'If'), 'stochasticLogisticRegressionIf': ('stochasticLogisticRegression', 'If'), 'quantileExactWeightedIf': ('quantileExactWeighted', 'If'), 'exponentialTimeDecayedAvgIf': ('exponentialTimeDecayedAvg', 'If'), 'skewSampIf': ('skewSamp', 'If'), 'sumWithOverflowIf': ('sumWithOverflow', 'If'), 'last_valueIf': ('last_value', 'If'), 'groupArrayLastIf': ('groupArrayLast', 'If'), 'groupUniqArrayIf': ('groupUniqArray', 'If'), 'uniqIf': ('uniq', 'If'), 'contingencyIf': ('contingency', 'If'), 'quantilesGKIf': ('quantilesGK', 'If'), 'meanZTestIf': ('meanZTest', 'If'), 'sparkBarIf': ('sparkBar', 'If'), 'avgIf': ('avg', 'If'), 'quantileExactIf': ('quantileExact', 'If'), 'quantileInterpolatedWeightedIf': ('quantileInterpolatedWeighted', 'If'), 'quantilesBFloat16If': ('quantilesBFloat16', 'If'), 'quantileBFloat16If': ('quantileBFloat16', 'If'), 'quantileTDigestWeightedIf': ('quantileTDigestWeighted', 'If'), 'theilsUIf': ('theilsU', 'If'), 'deltaSumTimestampIf': ('deltaSumTimestamp', 'If'), 'groupBitXorIf': ('groupBitXor', 'If'), 'quantileExactLowIf': ('quantileExactLow', 'If'), 'quantileBFloat16WeightedIf': ('quantileBFloat16Weighted', 'If'), 'minIf': ('min', 'If'), 'sequenceMatchIf': ('sequenceMatch', 'If'), 'kurtPopIf': ('kurtPop', 'If'), 'quantileTimingWeightedIf': ('quantileTimingWeighted', 'If'), 'topKWeightedIf': ('topKWeighted', 'If'), 'maxIf': ('max', 'If'), 'groupArrayMovingSumIf': ('groupArrayMovingSum', 'If'), 'stochasticLinearRegressionIf': ('stochasticLinearRegression', 'If'), 'medianIf': ('median', 'If'), 'studentTTestIf': ('studentTTest', 'If'), 'sumMapIf': ('sumMap', 'If'), 'simpleLinearRegressionIf': ('simpleLinearRegression', 'If'), 'varSampIf': ('varSamp', 'If'), 'groupBitAndIf': ('groupBitAnd', 'If'), 'topKIf': ('topK', 'If'), 'argMinIf': ('argMin', 'If'), 'mannWhitneyUTestIf': ('mannWhitneyUTest', 'If'), 'skewPopIf': ('skewPop', 'If'), 'intervalLengthSumIf': ('intervalLengthSum', 'If'), 'quantilesExactHighIf': ('quantilesExactHigh', 'If'), 'corrIf': ('corr', 'If'), 'groupBitmapOrIf': ('groupBitmapOr', 'If'), 'uniqHLL12If': ('uniqHLL12', 'If'), 'sumIf': ('sum', 'If'), 'quantilesInterpolatedWeightedIf': ('quantilesInterpolatedWeighted', 'If'), 'anyLastIf': ('anyLast', 'If'), 'sequenceNextNodeIf': ('sequenceNextNode', 'If'), 'groupArraySampleIf': ('groupArraySample', 'If'), 'quantileExactHighIf': ('quantileExactHigh', 'If'), 'groupBitmapIf': ('groupBitmap', 'If'), 'quantilesExactIf': ('quantilesExact', 'If'), 'exponentialMovingAverageIf': ('exponentialMovingAverage', 'If'), 'quantilesTDigestIf': ('quantilesTDigest', 'If'), 'boundingRatioIf': ('boundingRatio', 'If'), 'categoricalInformationValueIf': ('categoricalInformationValue', 'If'), 'varPopIf': ('varPop', 'If'), 'uniqCombinedIf': ('uniqCombined', 'If'), 'cramersVBiasCorrectedIf': ('cramersVBiasCorrected', 'If'), 'quantileDeterministicIf': ('quantileDeterministic', 'If'), 'groupArrayMovingAvgIf': ('groupArrayMovingAvg', 'If'), 'quantileIf': ('quantile', 'If'), 'maxMapIf': ('maxMap', 'If'), 'quantilesTimingWeightedIf': ('quantilesTimingWeighted', 'If'), 'entropyIf': ('entropy', 'If'), 'maxIntersectionsIf': ('maxIntersections', 'If'), 'covarPopIf': ('covarPop', 'If'), 'first_valueIf': ('first_value', 'If'), 'quantilesDeterministicIf': ('quantilesDeterministic', 'If'), 'retentionIf': ('retention', 'If'), 'groupArrayIf': ('groupArray', 'If'), 'stddevPopIf': ('stddevPop', 'If'), 'uniqUpToIf': ('uniqUpTo', 'If'), 'histogramIf': ('histogram', 'If'), 'avgWeightedIf': ('avgWeighted', 'If'), 'uniqExactIf': ('uniqExact', 'If'), 'covarSampIf': ('covarSamp', 'If'), 'sequenceCountIf': ('sequenceCount', 'If'), 'anyIf': ('any', 'If'), 'quantilesExactLowIf': ('quantilesExactLow', 'If'), 'stddevSampIf': ('stddevSamp', 'If'), 'minMapIf': ('minMap', 'If'), 'quantilesTimingIf': ('quantilesTiming', 'If'), 'maxIntersectionsPositionIf': ('maxIntersectionsPosition', 'If'), 'deltaSumIf': ('deltaSum', 'If'), 'quantileTimingIf': ('quantileTiming', 'If'), 'sumCountIf': ('sumCount', 'If'), 'quantilesIf': ('quantiles', 'If'), 'quantileGKIf': ('quantileGK', 'If'), 'sumKahanIf': ('sumKahan', 'If'), 'uniqCombined64If': ('uniqCombined64', 'If'), 'rankCorrIf': ('rankCorr', 'If'), 'groupArrayInsertAtIf': ('groupArrayInsertAt', 'If'), 'cramersVIf': ('cramersV', 'If'), 'windowFunnelIf': ('windowFunnel', 'If'), 'kolmogorovSmirnovTestIf': ('kolmogorovSmirnovTest', 'If'), 'countIf': ('count', 'If'), 'argMaxIf': ('argMax', 'If'), 'groupBitmapAndArray': ('groupBitmapAnd', 'Array'), 'quantileTDigestArray': ('quantileTDigest', 'Array'), 'anyHeavyArray': ('anyHeavy', 'Array'), 'kurtSampArray': ('kurtSamp', 'Array'), 'largestTriangleThreeBucketsArray': ('largestTriangleThreeBuckets', 'Array'), 'groupBitOrArray': ('groupBitOr', 'Array'), 'groupBitmapXorArray': ('groupBitmapXor', 'Array'), 'quantilesTDigestWeightedArray': ('quantilesTDigestWeighted', 'Array'), 'quantilesExactWeightedArray': ('quantilesExactWeighted', 'Array'), 'quantilesBFloat16WeightedArray': ('quantilesBFloat16Weighted', 'Array'), 'welchTTestArray': ('welchTTest', 'Array'), 'uniqThetaArray': ('uniqTheta', 'Array'), 'stochasticLogisticRegressionArray': ('stochasticLogisticRegression', 'Array'), 'quantileExactWeightedArray': ('quantileExactWeighted', 'Array'), 'exponentialTimeDecayedAvgArray': ('exponentialTimeDecayedAvg', 'Array'), 'skewSampArray': ('skewSamp', 'Array'), 'sumWithOverflowArray': ('sumWithOverflow', 'Array'), 'last_valueArray': ('last_value', 'Array'), 'groupArrayLastArray': ('groupArrayLast', 'Array'), 'groupUniqArrayArray': ('groupUniqArray', 'Array'), 'uniqArray': ('uniq', 'Array'), 'contingencyArray': ('contingency', 'Array'), 'quantilesGKArray': ('quantilesGK', 'Array'), 'meanZTestArray': ('meanZTest', 'Array'), 'sparkBarArray': ('sparkBar', 'Array'), 'avgArray': ('avg', 'Array'), 'quantileExactArray': ('quantileExact', 'Array'), 'quantileInterpolatedWeightedArray': ('quantileInterpolatedWeighted', 'Array'), 'quantilesBFloat16Array': ('quantilesBFloat16', 'Array'), 'quantileBFloat16Array': ('quantileBFloat16', 'Array'), 'quantileTDigestWeightedArray': ('quantileTDigestWeighted', 'Array'), 'theilsUArray': ('theilsU', 'Array'), 'deltaSumTimestampArray': ('deltaSumTimestamp', 'Array'), 'groupBitXorArray': ('groupBitXor', 'Array'), 'quantileExactLowArray': ('quantileExactLow', 'Array'), 'quantileBFloat16WeightedArray': ('quantileBFloat16Weighted', 'Array'), 'minArray': ('min', 'Array'), 'sequenceMatchArray': ('sequenceMatch', 'Array'), 'kurtPopArray': ('kurtPop', 'Array'), 'quantileTimingWeightedArray': ('quantileTimingWeighted', 'Array'), 'topKWeightedArray': ('topKWeighted', 'Array'), 'maxArray': ('max', 'Array'), 'groupArrayMovingSumArray': ('groupArrayMovingSum', 'Array'), 'stochasticLinearRegressionArray': ('stochasticLinearRegression', 'Array'), 'medianArray': ('median', 'Array'), 'studentTTestArray': ('studentTTest', 'Array'), 'sumMapArray': ('sumMap', 'Array'), 'simpleLinearRegressionArray': ('simpleLinearRegression', 'Array'), 'varSampArray': ('varSamp', 'Array'), 'groupBitAndArray': ('groupBitAnd', 'Array'), 'topKArray': ('topK', 'Array'), 'argMinArray': ('argMin', 'Array'), 'mannWhitneyUTestArray': ('mannWhitneyUTest', 'Array'), 'skewPopArray': ('skewPop', 'Array'), 'intervalLengthSumArray': ('intervalLengthSum', 'Array'), 'quantilesExactHighArray': ('quantilesExactHigh', 'Array'), 'corrArray': ('corr', 'Array'), 'groupBitmapOrArray': ('groupBitmapOr', 'Array'), 'uniqHLL12Array': ('uniqHLL12', 'Array'), 'sumArray': ('sum', 'Array'), 'quantilesInterpolatedWeightedArray': ('quantilesInterpolatedWeighted', 'Array'), 'anyLastArray': ('anyLast', 'Array'), 'sequenceNextNodeArray': ('sequenceNextNode', 'Array'), 'groupArraySampleArray': ('groupArraySample', 'Array'), 'quantileExactHighArray': ('quantileExactHigh', 'Array'), 'groupBitmapArray': ('groupBitmap', 'Array'), 'quantilesExactArray': ('quantilesExact', 'Array'), 'exponentialMovingAverageArray': ('exponentialMovingAverage', 'Array'), 'quantilesTDigestArray': ('quantilesTDigest', 'Array'), 'boundingRatioArray': ('boundingRatio', 'Array'), 'categoricalInformationValueArray': ('categoricalInformationValue', 'Array'), 'varPopArray': ('varPop', 'Array'), 'uniqCombinedArray': ('uniqCombined', 'Array'), 'cramersVBiasCorrectedArray': ('cramersVBiasCorrected', 'Array'), 'quantileDeterministicArray': ('quantileDeterministic', 'Array'), 'groupArrayMovingAvgArray': ('groupArrayMovingAvg', 'Array'), 'quantileArray': ('quantile', 'Array'), 'maxMapArray': ('maxMap', 'Array'), 'quantilesTimingWeightedArray': ('quantilesTimingWeighted', 'Array'), 'entropyArray': ('entropy', 'Array'), 'maxIntersectionsArray': ('maxIntersections', 'Array'), 'covarPopArray': ('covarPop', 'Array'), 'first_valueArray': ('first_value', 'Array'), 'quantilesDeterministicArray': ('quantilesDeterministic', 'Array'), 'retentionArray': ('retention', 'Array'), 'groupArrayArray': ('groupArray', 'Array'), 'stddevPopArray': ('stddevPop', 'Array'), 'uniqUpToArray': ('uniqUpTo', 'Array'), 'histogramArray': ('histogram', 'Array'), 'avgWeightedArray': ('avgWeighted', 'Array'), 'uniqExactArray': ('uniqExact', 'Array'), 'covarSampArray': ('covarSamp', 'Array'), 'sequenceCountArray': ('sequenceCount', 'Array'), 'anyArray': ('any', 'Array'), 'quantilesExactLowArray': ('quantilesExactLow', 'Array'), 'stddevSampArray': ('stddevSamp', 'Array'), 'minMapArray': ('minMap', 'Array'), 'quantilesTimingArray': ('quantilesTiming', 'Array'), 'maxIntersectionsPositionArray': ('maxIntersectionsPosition', 'Array'), 'deltaSumArray': ('deltaSum', 'Array'), 'quantileTimingArray': ('quantileTiming', 'Array'), 'sumCountArray': ('sumCount', 'Array'), 'quantilesArray': ('quantiles', 'Array'), 'quantileGKArray': ('quantileGK', 'Array'), 'sumKahanArray': ('sumKahan', 'Array'), 'uniqCombined64Array': ('uniqCombined64', 'Array'), 'rankCorrArray': ('rankCorr', 'Array'), 'groupArrayInsertAtArray': ('groupArrayInsertAt', 'Array'), 'cramersVArray': ('cramersV', 'Array'), 'windowFunnelArray': ('windowFunnel', 'Array'), 'kolmogorovSmirnovTestArray': ('kolmogorovSmirnovTest', 'Array'), 'countArray': ('count', 'Array'), 'argMaxArray': ('argMax', 'Array'), 'groupBitmapAndArrayIf': ('groupBitmapAnd', 'ArrayIf'), 'quantileTDigestArrayIf': ('quantileTDigest', 'ArrayIf'), 'anyHeavyArrayIf': ('anyHeavy', 'ArrayIf'), 'kurtSampArrayIf': ('kurtSamp', 'ArrayIf'), 'largestTriangleThreeBucketsArrayIf': ('largestTriangleThreeBuckets', 'ArrayIf'), 'groupBitOrArrayIf': ('groupBitOr', 'ArrayIf'), 'groupBitmapXorArrayIf': ('groupBitmapXor', 'ArrayIf'), 'quantilesTDigestWeightedArrayIf': ('quantilesTDigestWeighted', 'ArrayIf'), 'quantilesExactWeightedArrayIf': ('quantilesExactWeighted', 'ArrayIf'), 'quantilesBFloat16WeightedArrayIf': ('quantilesBFloat16Weighted', 'ArrayIf'), 'welchTTestArrayIf': ('welchTTest', 'ArrayIf'), 'uniqThetaArrayIf': ('uniqTheta', 'ArrayIf'), 'stochasticLogisticRegressionArrayIf': ('stochasticLogisticRegression', 'ArrayIf'), 'quantileExactWeightedArrayIf': ('quantileExactWeighted', 'ArrayIf'), 'exponentialTimeDecayedAvgArrayIf': ('exponentialTimeDecayedAvg', 'ArrayIf'), 'skewSampArrayIf': ('skewSamp', 'ArrayIf'), 'sumWithOverflowArrayIf': ('sumWithOverflow', 'ArrayIf'), 'last_valueArrayIf': ('last_value', 'ArrayIf'), 'groupArrayLastArrayIf': ('groupArrayLast', 'ArrayIf'), 'groupUniqArrayArrayIf': ('groupUniqArray', 'ArrayIf'), 'uniqArrayIf': ('uniq', 'ArrayIf'), 'contingencyArrayIf': ('contingency', 'ArrayIf'), 'quantilesGKArrayIf': ('quantilesGK', 'ArrayIf'), 'meanZTestArrayIf': ('meanZTest', 'ArrayIf'), 'sparkBarArrayIf': ('sparkBar', 'ArrayIf'), 'avgArrayIf': ('avg', 'ArrayIf'), 'quantileExactArrayIf': ('quantileExact', 'ArrayIf'), 'quantileInterpolatedWeightedArrayIf': ('quantileInterpolatedWeighted', 'ArrayIf'), 'quantilesBFloat16ArrayIf': ('quantilesBFloat16', 'ArrayIf'), 'quantileBFloat16ArrayIf': ('quantileBFloat16', 'ArrayIf'), 'quantileTDigestWeightedArrayIf': ('quantileTDigestWeighted', 'ArrayIf'), 'theilsUArrayIf': ('theilsU', 'ArrayIf'), 'deltaSumTimestampArrayIf': ('deltaSumTimestamp', 'ArrayIf'), 'groupBitXorArrayIf': ('groupBitXor', 'ArrayIf'), 'quantileExactLowArrayIf': ('quantileExactLow', 'ArrayIf'), 'quantileBFloat16WeightedArrayIf': ('quantileBFloat16Weighted', 'ArrayIf'), 'minArrayIf': ('min', 'ArrayIf'), 'sequenceMatchArrayIf': ('sequenceMatch', 'ArrayIf'), 'kurtPopArrayIf': ('kurtPop', 'ArrayIf'), 'quantileTimingWeightedArrayIf': ('quantileTimingWeighted', 'ArrayIf'), 'topKWeightedArrayIf': ('topKWeighted', 'ArrayIf'), 'maxArrayIf': ('max', 'ArrayIf'), 'groupArrayMovingSumArrayIf': ('groupArrayMovingSum', 'ArrayIf'), 'stochasticLinearRegressionArrayIf': ('stochasticLinearRegression', 'ArrayIf'), 'medianArrayIf': ('median', 'ArrayIf'), 'studentTTestArrayIf': ('studentTTest', 'ArrayIf'), 'sumMapArrayIf': ('sumMap', 'ArrayIf'), 'simpleLinearRegressionArrayIf': ('simpleLinearRegression', 'ArrayIf'), 'varSampArrayIf': ('varSamp', 'ArrayIf'), 'groupBitAndArrayIf': ('groupBitAnd', 'ArrayIf'), 'topKArrayIf': ('topK', 'ArrayIf'), 'argMinArrayIf': ('argMin', 'ArrayIf'), 'mannWhitneyUTestArrayIf': ('mannWhitneyUTest', 'ArrayIf'), 'skewPopArrayIf': ('skewPop', 'ArrayIf'), 'intervalLengthSumArrayIf': ('intervalLengthSum', 'ArrayIf'), 'quantilesExactHighArrayIf': ('quantilesExactHigh', 'ArrayIf'), 'corrArrayIf': ('corr', 'ArrayIf'), 'groupBitmapOrArrayIf': ('groupBitmapOr', 'ArrayIf'), 'uniqHLL12ArrayIf': ('uniqHLL12', 'ArrayIf'), 'sumArrayIf': ('sum', 'ArrayIf'), 'quantilesInterpolatedWeightedArrayIf': ('quantilesInterpolatedWeighted', 'ArrayIf'), 'anyLastArrayIf': ('anyLast', 'ArrayIf'), 'sequenceNextNodeArrayIf': ('sequenceNextNode', 'ArrayIf'), 'groupArraySampleArrayIf': ('groupArraySample', 'ArrayIf'), 'quantileExactHighArrayIf': ('quantileExactHigh', 'ArrayIf'), 'groupBitmapArrayIf': ('groupBitmap', 'ArrayIf'), 'quantilesExactArrayIf': ('quantilesExact', 'ArrayIf'), 'exponentialMovingAverageArrayIf': ('exponentialMovingAverage', 'ArrayIf'), 'quantilesTDigestArrayIf': ('quantilesTDigest', 'ArrayIf'), 'boundingRatioArrayIf': ('boundingRatio', 'ArrayIf'), 'categoricalInformationValueArrayIf': ('categoricalInformationValue', 'ArrayIf'), 'varPopArrayIf': ('varPop', 'ArrayIf'), 'uniqCombinedArrayIf': ('uniqCombined', 'ArrayIf'), 'cramersVBiasCorrectedArrayIf': ('cramersVBiasCorrected', 'ArrayIf'), 'quantileDeterministicArrayIf': ('quantileDeterministic', 'ArrayIf'), 'groupArrayMovingAvgArrayIf': ('groupArrayMovingAvg', 'ArrayIf'), 'quantileArrayIf': ('quantile', 'ArrayIf'), 'maxMapArrayIf': ('maxMap', 'ArrayIf'), 'quantilesTimingWeightedArrayIf': ('quantilesTimingWeighted', 'ArrayIf'), 'entropyArrayIf': ('entropy', 'ArrayIf'), 'maxIntersectionsArrayIf': ('maxIntersections', 'ArrayIf'), 'covarPopArrayIf': ('covarPop', 'ArrayIf'), 'first_valueArrayIf': ('first_value', 'ArrayIf'), 'quantilesDeterministicArrayIf': ('quantilesDeterministic', 'ArrayIf'), 'retentionArrayIf': ('retention', 'ArrayIf'), 'groupArrayArrayIf': ('groupArray', 'ArrayIf'), 'stddevPopArrayIf': ('stddevPop', 'ArrayIf'), 'uniqUpToArrayIf': ('uniqUpTo', 'ArrayIf'), 'histogramArrayIf': ('histogram', 'ArrayIf'), 'avgWeightedArrayIf': ('avgWeighted', 'ArrayIf'), 'uniqExactArrayIf': ('uniqExact', 'ArrayIf'), 'covarSampArrayIf': ('covarSamp', 'ArrayIf'), 'sequenceCountArrayIf': ('sequenceCount', 'ArrayIf'), 'anyArrayIf': ('any', 'ArrayIf'), 'quantilesExactLowArrayIf': ('quantilesExactLow', 'ArrayIf'), 'stddevSampArrayIf': ('stddevSamp', 'ArrayIf'), 'minMapArrayIf': ('minMap', 'ArrayIf'), 'quantilesTimingArrayIf': ('quantilesTiming', 'ArrayIf'), 'maxIntersectionsPositionArrayIf': ('maxIntersectionsPosition', 'ArrayIf'), 'deltaSumArrayIf': ('deltaSum', 'ArrayIf'), 'quantileTimingArrayIf': ('quantileTiming', 'ArrayIf'), 'sumCountArrayIf': ('sumCount', 'ArrayIf'), 'quantilesArrayIf': ('quantiles', 'ArrayIf'), 'quantileGKArrayIf': ('quantileGK', 'ArrayIf'), 'sumKahanArrayIf': ('sumKahan', 'ArrayIf'), 'uniqCombined64ArrayIf': ('uniqCombined64', 'ArrayIf'), 'rankCorrArrayIf': ('rankCorr', 'ArrayIf'), 'groupArrayInsertAtArrayIf': ('groupArrayInsertAt', 'ArrayIf'), 'cramersVArrayIf': ('cramersV', 'ArrayIf'), 'windowFunnelArrayIf': ('windowFunnel', 'ArrayIf'), 'kolmogorovSmirnovTestArrayIf': ('kolmogorovSmirnovTest', 'ArrayIf'), 'countArrayIf': ('count', 'ArrayIf'), 'argMaxArrayIf': ('argMax', 'ArrayIf'), 'groupBitmapAndMap': ('groupBitmapAnd', 'Map'), 'quantileTDigestMap': ('quantileTDigest', 'Map'), 'anyHeavyMap': ('anyHeavy', 'Map'), 'kurtSampMap': ('kurtSamp', 'Map'), 'largestTriangleThreeBucketsMap': ('largestTriangleThreeBuckets', 'Map'), 'groupBitOrMap': ('groupBitOr', 'Map'), 'groupBitmapXorMap': ('groupBitmapXor', 'Map'), 'quantilesTDigestWeightedMap': ('quantilesTDigestWeighted', 'Map'), 'quantilesExactWeightedMap': ('quantilesExactWeighted', 'Map'), 'quantilesBFloat16WeightedMap': ('quantilesBFloat16Weighted', 'Map'), 'welchTTestMap': ('welchTTest', 'Map'), 'uniqThetaMap': ('uniqTheta', 'Map'), 'stochasticLogisticRegressionMap': ('stochasticLogisticRegression', 'Map'), 'quantileExactWeightedMap': ('quantileExactWeighted', 'Map'), 'exponentialTimeDecayedAvgMap': ('exponentialTimeDecayedAvg', 'Map'), 'skewSampMap': ('skewSamp', 'Map'), 'sumWithOverflowMap': ('sumWithOverflow', 'Map'), 'last_valueMap': ('last_value', 'Map'), 'groupArrayLastMap': ('groupArrayLast', 'Map'), 'groupUniqArrayMap': ('groupUniqArray', 'Map'), 'uniqMap': ('uniq', 'Map'), 'contingencyMap': ('contingency', 'Map'), 'quantilesGKMap': ('quantilesGK', 'Map'), 'meanZTestMap': ('meanZTest', 'Map'), 'sparkBarMap': ('sparkBar', 'Map'), 'avgMap': ('avg', 'Map'), 'quantileExactMap': ('quantileExact', 'Map'), 'quantileInterpolatedWeightedMap': ('quantileInterpolatedWeighted', 'Map'), 'quantilesBFloat16Map': ('quantilesBFloat16', 'Map'), 'quantileBFloat16Map': ('quantileBFloat16', 'Map'), 'quantileTDigestWeightedMap': ('quantileTDigestWeighted', 'Map'), 'theilsUMap': ('theilsU', 'Map'), 'deltaSumTimestampMap': ('deltaSumTimestamp', 'Map'), 'groupBitXorMap': ('groupBitXor', 'Map'), 'quantileExactLowMap': ('quantileExactLow', 'Map'), 'quantileBFloat16WeightedMap': ('quantileBFloat16Weighted', 'Map'), 'minMap': ('minMap', ''), 'sequenceMatchMap': ('sequenceMatch', 'Map'), 'kurtPopMap': ('kurtPop', 'Map'), 'quantileTimingWeightedMap': ('quantileTimingWeighted', 'Map'), 'topKWeightedMap': ('topKWeighted', 'Map'), 'maxMap': ('maxMap', ''), 'groupArrayMovingSumMap': ('groupArrayMovingSum', 'Map'), 'stochasticLinearRegressionMap': ('stochasticLinearRegression', 'Map'), 'medianMap': ('median', 'Map'), 'studentTTestMap': ('studentTTest', 'Map'), 'sumMapMap': ('sumMap', 'Map'), 'simpleLinearRegressionMap': ('simpleLinearRegression', 'Map'), 'varSampMap': ('varSamp', 'Map'), 'groupBitAndMap': ('groupBitAnd', 'Map'), 'topKMap': ('topK', 'Map'), 'argMinMap': ('argMin', 'Map'), 'mannWhitneyUTestMap': ('mannWhitneyUTest', 'Map'), 'skewPopMap': ('skewPop', 'Map'), 'intervalLengthSumMap': ('intervalLengthSum', 'Map'), 'quantilesExactHighMap': ('quantilesExactHigh', 'Map'), 'corrMap': ('corr', 'Map'), 'groupBitmapOrMap': ('groupBitmapOr', 'Map'), 'uniqHLL12Map': ('uniqHLL12', 'Map'), 'sumMap': ('sumMap', ''), 'quantilesInterpolatedWeightedMap': ('quantilesInterpolatedWeighted', 'Map'), 'anyLastMap': ('anyLast', 'Map'), 'sequenceNextNodeMap': ('sequenceNextNode', 'Map'), 'groupArraySampleMap': ('groupArraySample', 'Map'), 'quantileExactHighMap': ('quantileExactHigh', 'Map'), 'groupBitmapMap': ('groupBitmap', 'Map'), 'quantilesExactMap': ('quantilesExact', 'Map'), 'exponentialMovingAverageMap': ('exponentialMovingAverage', 'Map'), 'quantilesTDigestMap': ('quantilesTDigest', 'Map'), 'boundingRatioMap': ('boundingRatio', 'Map'), 'categoricalInformationValueMap': ('categoricalInformationValue', 'Map'), 'varPopMap': ('varPop', 'Map'), 'uniqCombinedMap': ('uniqCombined', 'Map'), 'cramersVBiasCorrectedMap': ('cramersVBiasCorrected', 'Map'), 'quantileDeterministicMap': ('quantileDeterministic', 'Map'), 'groupArrayMovingAvgMap': ('groupArrayMovingAvg', 'Map'), 'quantileMap': ('quantile', 'Map'), 'maxMapMap': ('maxMap', 'Map'), 'quantilesTimingWeightedMap': ('quantilesTimingWeighted', 'Map'), 'entropyMap': ('entropy', 'Map'), 'maxIntersectionsMap': ('maxIntersections', 'Map'), 'covarPopMap': ('covarPop', 'Map'), 'first_valueMap': ('first_value', 'Map'), 'quantilesDeterministicMap': ('quantilesDeterministic', 'Map'), 'retentionMap': ('retention', 'Map'), 'groupArrayMap': ('groupArray', 'Map'), 'stddevPopMap': ('stddevPop', 'Map'), 'uniqUpToMap': ('uniqUpTo', 'Map'), 'histogramMap': ('histogram', 'Map'), 'avgWeightedMap': ('avgWeighted', 'Map'), 'uniqExactMap': ('uniqExact', 'Map'), 'covarSampMap': ('covarSamp', 'Map'), 'sequenceCountMap': ('sequenceCount', 'Map'), 'anyMap': ('any', 'Map'), 'quantilesExactLowMap': ('quantilesExactLow', 'Map'), 'stddevSampMap': ('stddevSamp', 'Map'), 'minMapMap': ('minMap', 'Map'), 'quantilesTimingMap': ('quantilesTiming', 'Map'), 'maxIntersectionsPositionMap': ('maxIntersectionsPosition', 'Map'), 'deltaSumMap': ('deltaSum', 'Map'), 'quantileTimingMap': ('quantileTiming', 'Map'), 'sumCountMap': ('sumCount', 'Map'), 'quantilesMap': ('quantiles', 'Map'), 'quantileGKMap': ('quantileGK', 'Map'), 'sumKahanMap': ('sumKahan', 'Map'), 'uniqCombined64Map': ('uniqCombined64', 'Map'), 'rankCorrMap': ('rankCorr', 'Map'), 'groupArrayInsertAtMap': ('groupArrayInsertAt', 'Map'), 'cramersVMap': ('cramersV', 'Map'), 'windowFunnelMap': ('windowFunnel', 'Map'), 'kolmogorovSmirnovTestMap': ('kolmogorovSmirnovTest', 'Map'), 'countMap': ('count', 'Map'), 'argMaxMap': ('argMax', 'Map'), 'groupBitmapAndSimpleState': ('groupBitmapAnd', 'SimpleState'), 'quantileTDigestSimpleState': ('quantileTDigest', 'SimpleState'), 'anyHeavySimpleState': ('anyHeavy', 'SimpleState'), 'kurtSampSimpleState': ('kurtSamp', 'SimpleState'), 'largestTriangleThreeBucketsSimpleState': ('largestTriangleThreeBuckets', 'SimpleState'), 'groupBitOrSimpleState': ('groupBitOr', 'SimpleState'), 'groupBitmapXorSimpleState': ('groupBitmapXor', 'SimpleState'), 'quantilesTDigestWeightedSimpleState': ('quantilesTDigestWeighted', 'SimpleState'), 'quantilesExactWeightedSimpleState': ('quantilesExactWeighted', 'SimpleState'), 'quantilesBFloat16WeightedSimpleState': ('quantilesBFloat16Weighted', 'SimpleState'), 'welchTTestSimpleState': ('welchTTest', 'SimpleState'), 'uniqThetaSimpleState': ('uniqTheta', 'SimpleState'), 'stochasticLogisticRegressionSimpleState': ('stochasticLogisticRegression', 'SimpleState'), 'quantileExactWeightedSimpleState': ('quantileExactWeighted', 'SimpleState'), 'exponentialTimeDecayedAvgSimpleState': ('exponentialTimeDecayedAvg', 'SimpleState'), 'skewSampSimpleState': ('skewSamp', 'SimpleState'), 'sumWithOverflowSimpleState': ('sumWithOverflow', 'SimpleState'), 'last_valueSimpleState': ('last_value', 'SimpleState'), 'groupArrayLastSimpleState': ('groupArrayLast', 'SimpleState'), 'groupUniqArraySimpleState': ('groupUniqArray', 'SimpleState'), 'uniqSimpleState': ('uniq', 'SimpleState'), 'contingencySimpleState': ('contingency', 'SimpleState'), 'quantilesGKSimpleState': ('quantilesGK', 'SimpleState'), 'meanZTestSimpleState': ('meanZTest', 'SimpleState'), 'sparkBarSimpleState': ('sparkBar', 'SimpleState'), 'avgSimpleState': ('avg', 'SimpleState'), 'quantileExactSimpleState': ('quantileExact', 'SimpleState'), 'quantileInterpolatedWeightedSimpleState': ('quantileInterpolatedWeighted', 'SimpleState'), 'quantilesBFloat16SimpleState': ('quantilesBFloat16', 'SimpleState'), 'quantileBFloat16SimpleState': ('quantileBFloat16', 'SimpleState'), 'quantileTDigestWeightedSimpleState': ('quantileTDigestWeighted', 'SimpleState'), 'theilsUSimpleState': ('theilsU', 'SimpleState'), 'deltaSumTimestampSimpleState': ('deltaSumTimestamp', 'SimpleState'), 'groupBitXorSimpleState': ('groupBitXor', 'SimpleState'), 'quantileExactLowSimpleState': ('quantileExactLow', 'SimpleState'), 'quantileBFloat16WeightedSimpleState': ('quantileBFloat16Weighted', 'SimpleState'), 'minSimpleState': ('min', 'SimpleState'), 'sequenceMatchSimpleState': ('sequenceMatch', 'SimpleState'), 'kurtPopSimpleState': ('kurtPop', 'SimpleState'), 'quantileTimingWeightedSimpleState': ('quantileTimingWeighted', 'SimpleState'), 'topKWeightedSimpleState': ('topKWeighted', 'SimpleState'), 'maxSimpleState': ('max', 'SimpleState'), 'groupArrayMovingSumSimpleState': ('groupArrayMovingSum', 'SimpleState'), 'stochasticLinearRegressionSimpleState': ('stochasticLinearRegression', 'SimpleState'), 'medianSimpleState': ('median', 'SimpleState'), 'studentTTestSimpleState': ('studentTTest', 'SimpleState'), 'sumMapSimpleState': ('sumMap', 'SimpleState'), 'simpleLinearRegressionSimpleState': ('simpleLinearRegression', 'SimpleState'), 'varSampSimpleState': ('varSamp', 'SimpleState'), 'groupBitAndSimpleState': ('groupBitAnd', 'SimpleState'), 'topKSimpleState': ('topK', 'SimpleState'), 'argMinSimpleState': ('argMin', 'SimpleState'), 'mannWhitneyUTestSimpleState': ('mannWhitneyUTest', 'SimpleState'), 'skewPopSimpleState': ('skewPop', 'SimpleState'), 'intervalLengthSumSimpleState': ('intervalLengthSum', 'SimpleState'), 'quantilesExactHighSimpleState': ('quantilesExactHigh', 'SimpleState'), 'corrSimpleState': ('corr', 'SimpleState'), 'groupBitmapOrSimpleState': ('groupBitmapOr', 'SimpleState'), 'uniqHLL12SimpleState': ('uniqHLL12', 'SimpleState'), 'sumSimpleState': ('sum', 'SimpleState'), 'quantilesInterpolatedWeightedSimpleState': ('quantilesInterpolatedWeighted', 'SimpleState'), 'anyLastSimpleState': ('anyLast', 'SimpleState'), 'sequenceNextNodeSimpleState': ('sequenceNextNode', 'SimpleState'), 'groupArraySampleSimpleState': ('groupArraySample', 'SimpleState'), 'quantileExactHighSimpleState': ('quantileExactHigh', 'SimpleState'), 'groupBitmapSimpleState': ('groupBitmap', 'SimpleState'), 'quantilesExactSimpleState': ('quantilesExact', 'SimpleState'), 'exponentialMovingAverageSimpleState': ('exponentialMovingAverage', 'SimpleState'), 'quantilesTDigestSimpleState': ('quantilesTDigest', 'SimpleState'), 'boundingRatioSimpleState': ('boundingRatio', 'SimpleState'), 'categoricalInformationValueSimpleState': ('categoricalInformationValue', 'SimpleState'), 'varPopSimpleState': ('varPop', 'SimpleState'), 'uniqCombinedSimpleState': ('uniqCombined', 'SimpleState'), 'cramersVBiasCorrectedSimpleState': ('cramersVBiasCorrected', 'SimpleState'), 'quantileDeterministicSimpleState': ('quantileDeterministic', 'SimpleState'), 'groupArrayMovingAvgSimpleState': ('groupArrayMovingAvg', 'SimpleState'), 'quantileSimpleState': ('quantile', 'SimpleState'), 'maxMapSimpleState': ('maxMap', 'SimpleState'), 'quantilesTimingWeightedSimpleState': ('quantilesTimingWeighted', 'SimpleState'), 'entropySimpleState': ('entropy', 'SimpleState'), 'maxIntersectionsSimpleState': ('maxIntersections', 'SimpleState'), 'covarPopSimpleState': ('covarPop', 'SimpleState'), 'first_valueSimpleState': ('first_value', 'SimpleState'), 'quantilesDeterministicSimpleState': ('quantilesDeterministic', 'SimpleState'), 'retentionSimpleState': ('retention', 'SimpleState'), 'groupArraySimpleState': ('groupArray', 'SimpleState'), 'stddevPopSimpleState': ('stddevPop', 'SimpleState'), 'uniqUpToSimpleState': ('uniqUpTo', 'SimpleState'), 'histogramSimpleState': ('histogram', 'SimpleState'), 'avgWeightedSimpleState': ('avgWeighted', 'SimpleState'), 'uniqExactSimpleState': ('uniqExact', 'SimpleState'), 'covarSampSimpleState': ('covarSamp', 'SimpleState'), 'sequenceCountSimpleState': ('sequenceCount', 'SimpleState'), 'anySimpleState': ('any', 'SimpleState'), 'quantilesExactLowSimpleState': ('quantilesExactLow', 'SimpleState'), 'stddevSampSimpleState': ('stddevSamp', 'SimpleState'), 'minMapSimpleState': ('minMap', 'SimpleState'), 'quantilesTimingSimpleState': ('quantilesTiming', 'SimpleState'), 'maxIntersectionsPositionSimpleState': ('maxIntersectionsPosition', 'SimpleState'), 'deltaSumSimpleState': ('deltaSum', 'SimpleState'), 'quantileTimingSimpleState': ('quantileTiming', 'SimpleState'), 'sumCountSimpleState': ('sumCount', 'SimpleState'), 'quantilesSimpleState': ('quantiles', 'SimpleState'), 'quantileGKSimpleState': ('quantileGK', 'SimpleState'), 'sumKahanSimpleState': ('sumKahan', 'SimpleState'), 'uniqCombined64SimpleState': ('uniqCombined64', 'SimpleState'), 'rankCorrSimpleState': ('rankCorr', 'SimpleState'), 'groupArrayInsertAtSimpleState': ('groupArrayInsertAt', 'SimpleState'), 'cramersVSimpleState': ('cramersV', 'SimpleState'), 'windowFunnelSimpleState': ('windowFunnel', 'SimpleState'), 'kolmogorovSmirnovTestSimpleState': ('kolmogorovSmirnovTest', 'SimpleState'), 'countSimpleState': ('count', 'SimpleState'), 'argMaxSimpleState': ('argMax', 'SimpleState'), 'groupBitmapAndState': ('groupBitmapAnd', 'State'), 'quantileTDigestState': ('quantileTDigest', 'State'), 'anyHeavyState': ('anyHeavy', 'State'), 'kurtSampState': ('kurtSamp', 'State'), 'largestTriangleThreeBucketsState': ('largestTriangleThreeBuckets', 'State'), 'groupBitOrState': ('groupBitOr', 'State'), 'groupBitmapXorState': ('groupBitmapXor', 'State'), 'quantilesTDigestWeightedState': ('quantilesTDigestWeighted', 'State'), 'quantilesExactWeightedState': ('quantilesExactWeighted', 'State'), 'quantilesBFloat16WeightedState': ('quantilesBFloat16Weighted', 'State'), 'welchTTestState': ('welchTTest', 'State'), 'uniqThetaState': ('uniqTheta', 'State'), 'stochasticLogisticRegressionState': ('stochasticLogisticRegression', 'State'), 'quantileExactWeightedState': ('quantileExactWeighted', 'State'), 'exponentialTimeDecayedAvgState': ('exponentialTimeDecayedAvg', 'State'), 'skewSampState': ('skewSamp', 'State'), 'sumWithOverflowState': ('sumWithOverflow', 'State'), 'last_valueState': ('last_value', 'State'), 'groupArrayLastState': ('groupArrayLast', 'State'), 'groupUniqArrayState': ('groupUniqArray', 'State'), 'uniqState': ('uniq', 'State'), 'contingencyState': ('contingency', 'State'), 'quantilesGKState': ('quantilesGK', 'State'), 'meanZTestState': ('meanZTest', 'State'), 'sparkBarState': ('sparkBar', 'State'), 'avgState': ('avg', 'State'), 'quantileExactState': ('quantileExact', 'State'), 'quantileInterpolatedWeightedState': ('quantileInterpolatedWeighted', 'State'), 'quantilesBFloat16State': ('quantilesBFloat16', 'State'), 'quantileBFloat16State': ('quantileBFloat16', 'State'), 'quantileTDigestWeightedState': ('quantileTDigestWeighted', 'State'), 'theilsUState': ('theilsU', 'State'), 'deltaSumTimestampState': ('deltaSumTimestamp', 'State'), 'groupBitXorState': ('groupBitXor', 'State'), 'quantileExactLowState': ('quantileExactLow', 'State'), 'quantileBFloat16WeightedState': ('quantileBFloat16Weighted', 'State'), 'minState': ('min', 'State'), 'sequenceMatchState': ('sequenceMatch', 'State'), 'kurtPopState': ('kurtPop', 'State'), 'quantileTimingWeightedState': ('quantileTimingWeighted', 'State'), 'topKWeightedState': ('topKWeighted', 'State'), 'maxState': ('max', 'State'), 'groupArrayMovingSumState': ('groupArrayMovingSum', 'State'), 'stochasticLinearRegressionState': ('stochasticLinearRegression', 'State'), 'medianState': ('median', 'State'), 'studentTTestState': ('studentTTest', 'State'), 'sumMapState': ('sumMap', 'State'), 'simpleLinearRegressionState': ('simpleLinearRegression', 'State'), 'varSampState': ('varSamp', 'State'), 'groupBitAndState': ('groupBitAnd', 'State'), 'topKState': ('topK', 'State'), 'argMinState': ('argMin', 'State'), 'mannWhitneyUTestState': ('mannWhitneyUTest', 'State'), 'skewPopState': ('skewPop', 'State'), 'intervalLengthSumState': ('intervalLengthSum', 'State'), 'quantilesExactHighState': ('quantilesExactHigh', 'State'), 'corrState': ('corr', 'State'), 'groupBitmapOrState': ('groupBitmapOr', 'State'), 'uniqHLL12State': ('uniqHLL12', 'State'), 'sumState': ('sum', 'State'), 'quantilesInterpolatedWeightedState': ('quantilesInterpolatedWeighted', 'State'), 'anyLastState': ('anyLast', 'State'), 'sequenceNextNodeState': ('sequenceNextNode', 'State'), 'groupArraySampleState': ('groupArraySample', 'State'), 'quantileExactHighState': ('quantileExactHigh', 'State'), 'groupBitmapState': ('groupBitmap', 'State'), 'quantilesExactState': ('quantilesExact', 'State'), 'exponentialMovingAverageState': ('exponentialMovingAverage', 'State'), 'quantilesTDigestState': ('quantilesTDigest', 'State'), 'boundingRatioState': ('boundingRatio', 'State'), 'categoricalInformationValueState': ('categoricalInformationValue', 'State'), 'varPopState': ('varPop', 'State'), 'uniqCombinedState': ('uniqCombined', 'State'), 'cramersVBiasCorrectedState': ('cramersVBiasCorrected', 'State'), 'quantileDeterministicState': ('quantileDeterministic', 'State'), 'groupArrayMovingAvgState': ('groupArrayMovingAvg', 'State'), 'quantileState': ('quantile', 'State'), 'maxMapState': ('maxMap', 'State'), 'quantilesTimingWeightedState': ('quantilesTimingWeighted', 'State'), 'entropyState': ('entropy', 'State'), 'maxIntersectionsState': ('maxIntersections', 'State'), 'covarPopState': ('covarPop', 'State'), 'first_valueState': ('first_value', 'State'), 'quantilesDeterministicState': ('quantilesDeterministic', 'State'), 'retentionState': ('retention', 'State'), 'groupArrayState': ('groupArray', 'State'), 'stddevPopState': ('stddevPop', 'State'), 'uniqUpToState': ('uniqUpTo', 'State'), 'histogramState': ('histogram', 'State'), 'avgWeightedState': ('avgWeighted', 'State'), 'uniqExactState': ('uniqExact', 'State'), 'covarSampState': ('covarSamp', 'State'), 'sequenceCountState': ('sequenceCount', 'State'), 'anyState': ('any', 'State'), 'quantilesExactLowState': ('quantilesExactLow', 'State'), 'stddevSampState': ('stddevSamp', 'State'), 'minMapState': ('minMap', 'State'), 'quantilesTimingState': ('quantilesTiming', 'State'), 'maxIntersectionsPositionState': ('maxIntersectionsPosition', 'State'), 'deltaSumState': ('deltaSum', 'State'), 'quantileTimingState': ('quantileTiming', 'State'), 'sumCountState': ('sumCount', 'State'), 'quantilesState': ('quantiles', 'State'), 'quantileGKState': ('quantileGK', 'State'), 'sumKahanState': ('sumKahan', 'State'), 'uniqCombined64State': ('uniqCombined64', 'State'), 'rankCorrState': ('rankCorr', 'State'), 'groupArrayInsertAtState': ('groupArrayInsertAt', 'State'), 'cramersVState': ('cramersV', 'State'), 'windowFunnelState': ('windowFunnel', 'State'), 'kolmogorovSmirnovTestState': ('kolmogorovSmirnovTest', 'State'), 'countState': ('count', 'State'), 'argMaxState': ('argMax', 'State'), 'groupBitmapAndMerge': ('groupBitmapAnd', 'Merge'), 'quantileTDigestMerge': ('quantileTDigest', 'Merge'), 'anyHeavyMerge': ('anyHeavy', 'Merge'), 'kurtSampMerge': ('kurtSamp', 'Merge'), 'largestTriangleThreeBucketsMerge': ('largestTriangleThreeBuckets', 'Merge'), 'groupBitOrMerge': ('groupBitOr', 'Merge'), 'groupBitmapXorMerge': ('groupBitmapXor', 'Merge'), 'quantilesTDigestWeightedMerge': ('quantilesTDigestWeighted', 'Merge'), 'quantilesExactWeightedMerge': ('quantilesExactWeighted', 'Merge'), 'quantilesBFloat16WeightedMerge': ('quantilesBFloat16Weighted', 'Merge'), 'welchTTestMerge': ('welchTTest', 'Merge'), 'uniqThetaMerge': ('uniqTheta', 'Merge'), 'stochasticLogisticRegressionMerge': ('stochasticLogisticRegression', 'Merge'), 'quantileExactWeightedMerge': ('quantileExactWeighted', 'Merge'), 'exponentialTimeDecayedAvgMerge': ('exponentialTimeDecayedAvg', 'Merge'), 'skewSampMerge': ('skewSamp', 'Merge'), 'sumWithOverflowMerge': ('sumWithOverflow', 'Merge'), 'last_valueMerge': ('last_value', 'Merge'), 'groupArrayLastMerge': ('groupArrayLast', 'Merge'), 'groupUniqArrayMerge': ('groupUniqArray', 'Merge'), 'uniqMerge': ('uniq', 'Merge'), 'contingencyMerge': ('contingency', 'Merge'), 'quantilesGKMerge': ('quantilesGK', 'Merge'), 'meanZTestMerge': ('meanZTest', 'Merge'), 'sparkBarMerge': ('sparkBar', 'Merge'), 'avgMerge': ('avg', 'Merge'), 'quantileExactMerge': ('quantileExact', 'Merge'), 'quantileInterpolatedWeightedMerge': ('quantileInterpolatedWeighted', 'Merge'), 'quantilesBFloat16Merge': ('quantilesBFloat16', 'Merge'), 'quantileBFloat16Merge': ('quantileBFloat16', 'Merge'), 'quantileTDigestWeightedMerge': ('quantileTDigestWeighted', 'Merge'), 'theilsUMerge': ('theilsU', 'Merge'), 'deltaSumTimestampMerge': ('deltaSumTimestamp', 'Merge'), 'groupBitXorMerge': ('groupBitXor', 'Merge'), 'quantileExactLowMerge': ('quantileExactLow', 'Merge'), 'quantileBFloat16WeightedMerge': ('quantileBFloat16Weighted', 'Merge'), 'minMerge': ('min', 'Merge'), 'sequenceMatchMerge': ('sequenceMatch', 'Merge'), 'kurtPopMerge': ('kurtPop', 'Merge'), 'quantileTimingWeightedMerge': ('quantileTimingWeighted', 'Merge'), 'topKWeightedMerge': ('topKWeighted', 'Merge'), 'maxMerge': ('max', 'Merge'), 'groupArrayMovingSumMerge': ('groupArrayMovingSum', 'Merge'), 'stochasticLinearRegressionMerge': ('stochasticLinearRegression', 'Merge'), 'medianMerge': ('median', 'Merge'), 'studentTTestMerge': ('studentTTest', 'Merge'), 'sumMapMerge': ('sumMap', 'Merge'), 'simpleLinearRegressionMerge': ('simpleLinearRegression', 'Merge'), 'varSampMerge': ('varSamp', 'Merge'), 'groupBitAndMerge': ('groupBitAnd', 'Merge'), 'topKMerge': ('topK', 'Merge'), 'argMinMerge': ('argMin', 'Merge'), 'mannWhitneyUTestMerge': ('mannWhitneyUTest', 'Merge'), 'skewPopMerge': ('skewPop', 'Merge'), 'intervalLengthSumMerge': ('intervalLengthSum', 'Merge'), 'quantilesExactHighMerge': ('quantilesExactHigh', 'Merge'), 'corrMerge': ('corr', 'Merge'), 'groupBitmapOrMerge': ('groupBitmapOr', 'Merge'), 'uniqHLL12Merge': ('uniqHLL12', 'Merge'), 'sumMerge': ('sum', 'Merge'), 'quantilesInterpolatedWeightedMerge': ('quantilesInterpolatedWeighted', 'Merge'), 'anyLastMerge': ('anyLast', 'Merge'), 'sequenceNextNodeMerge': ('sequenceNextNode', 'Merge'), 'groupArraySampleMerge': ('groupArraySample', 'Merge'), 'quantileExactHighMerge': ('quantileExactHigh', 'Merge'), 'groupBitmapMerge': ('groupBitmap', 'Merge'), 'quantilesExactMerge': ('quantilesExact', 'Merge'), 'exponentialMovingAverageMerge': ('exponentialMovingAverage', 'Merge'), 'quantilesTDigestMerge': ('quantilesTDigest', 'Merge'), 'boundingRatioMerge': ('boundingRatio', 'Merge'), 'categoricalInformationValueMerge': ('categoricalInformationValue', 'Merge'), 'varPopMerge': ('varPop', 'Merge'), 'uniqCombinedMerge': ('uniqCombined', 'Merge'), 'cramersVBiasCorrectedMerge': ('cramersVBiasCorrected', 'Merge'), 'quantileDeterministicMerge': ('quantileDeterministic', 'Merge'), 'groupArrayMovingAvgMerge': ('groupArrayMovingAvg', 'Merge'), 'quantileMerge': ('quantile', 'Merge'), 'maxMapMerge': ('maxMap', 'Merge'), 'quantilesTimingWeightedMerge': ('quantilesTimingWeighted', 'Merge'), 'entropyMerge': ('entropy', 'Merge'), 'maxIntersectionsMerge': ('maxIntersections', 'Merge'), 'covarPopMerge': ('covarPop', 'Merge'), 'first_valueMerge': ('first_value', 'Merge'), 'quantilesDeterministicMerge': ('quantilesDeterministic', 'Merge'), 'retentionMerge': ('retention', 'Merge'), 'groupArrayMerge': ('groupArray', 'Merge'), 'stddevPopMerge': ('stddevPop', 'Merge'), 'uniqUpToMerge': ('uniqUpTo', 'Merge'), 'histogramMerge': ('histogram', 'Merge'), 'avgWeightedMerge': ('avgWeighted', 'Merge'), 'uniqExactMerge': ('uniqExact', 'Merge'), 'covarSampMerge': ('covarSamp', 'Merge'), 'sequenceCountMerge': ('sequenceCount', 'Merge'), 'anyMerge': ('any', 'Merge'), 'quantilesExactLowMerge': ('quantilesExactLow', 'Merge'), 'stddevSampMerge': ('stddevSamp', 'Merge'), 'minMapMerge': ('minMap', 'Merge'), 'quantilesTimingMerge': ('quantilesTiming', 'Merge'), 'maxIntersectionsPositionMerge': ('maxIntersectionsPosition', 'Merge'), 'deltaSumMerge': ('deltaSum', 'Merge'), 'quantileTimingMerge': ('quantileTiming', 'Merge'), 'sumCountMerge': ('sumCount', 'Merge'), 'quantilesMerge': ('quantiles', 'Merge'), 'quantileGKMerge': ('quantileGK', 'Merge'), 'sumKahanMerge': ('sumKahan', 'Merge'), 'uniqCombined64Merge': ('uniqCombined64', 'Merge'), 'rankCorrMerge': ('rankCorr', 'Merge'), 'groupArrayInsertAtMerge': ('groupArrayInsertAt', 'Merge'), 'cramersVMerge': ('cramersV', 'Merge'), 'windowFunnelMerge': ('windowFunnel', 'Merge'), 'kolmogorovSmirnovTestMerge': ('kolmogorovSmirnovTest', 'Merge'), 'countMerge': ('count', 'Merge'), 'argMaxMerge': ('argMax', 'Merge'), 'groupBitmapAndMergeState': ('groupBitmapAnd', 'MergeState'), 'quantileTDigestMergeState': ('quantileTDigest', 'MergeState'), 'anyHeavyMergeState': ('anyHeavy', 'MergeState'), 'kurtSampMergeState': ('kurtSamp', 'MergeState'), 'largestTriangleThreeBucketsMergeState': ('largestTriangleThreeBuckets', 'MergeState'), 'groupBitOrMergeState': ('groupBitOr', 'MergeState'), 'groupBitmapXorMergeState': ('groupBitmapXor', 'MergeState'), 'quantilesTDigestWeightedMergeState': ('quantilesTDigestWeighted', 'MergeState'), 'quantilesExactWeightedMergeState': ('quantilesExactWeighted', 'MergeState'), 'quantilesBFloat16WeightedMergeState': ('quantilesBFloat16Weighted', 'MergeState'), 'welchTTestMergeState': ('welchTTest', 'MergeState'), 'uniqThetaMergeState': ('uniqTheta', 'MergeState'), 'stochasticLogisticRegressionMergeState': ('stochasticLogisticRegression', 'MergeState'), 'quantileExactWeightedMergeState': ('quantileExactWeighted', 'MergeState'), 'exponentialTimeDecayedAvgMergeState': ('exponentialTimeDecayedAvg', 'MergeState'), 'skewSampMergeState': ('skewSamp', 'MergeState'), 'sumWithOverflowMergeState': ('sumWithOverflow', 'MergeState'), 'last_valueMergeState': ('last_value', 'MergeState'), 'groupArrayLastMergeState': ('groupArrayLast', 'MergeState'), 'groupUniqArrayMergeState': ('groupUniqArray', 'MergeState'), 'uniqMergeState': ('uniq', 'MergeState'), 'contingencyMergeState': ('contingency', 'MergeState'), 'quantilesGKMergeState': ('quantilesGK', 'MergeState'), 'meanZTestMergeState': ('meanZTest', 'MergeState'), 'sparkBarMergeState': ('sparkBar', 'MergeState'), 'avgMergeState': ('avg', 'MergeState'), 'quantileExactMergeState': ('quantileExact', 'MergeState'), 'quantileInterpolatedWeightedMergeState': ('quantileInterpolatedWeighted', 'MergeState'), 'quantilesBFloat16MergeState': ('quantilesBFloat16', 'MergeState'), 'quantileBFloat16MergeState': ('quantileBFloat16', 'MergeState'), 'quantileTDigestWeightedMergeState': ('quantileTDigestWeighted', 'MergeState'), 'theilsUMergeState': ('theilsU', 'MergeState'), 'deltaSumTimestampMergeState': ('deltaSumTimestamp', 'MergeState'), 'groupBitXorMergeState': ('groupBitXor', 'MergeState'), 'quantileExactLowMergeState': ('quantileExactLow', 'MergeState'), 'quantileBFloat16WeightedMergeState': ('quantileBFloat16Weighted', 'MergeState'), 'minMergeState': ('min', 'MergeState'), 'sequenceMatchMergeState': ('sequenceMatch', 'MergeState'), 'kurtPopMergeState': ('kurtPop', 'MergeState'), 'quantileTimingWeightedMergeState': ('quantileTimingWeighted', 'MergeState'), 'topKWeightedMergeState': ('topKWeighted', 'MergeState'), 'maxMergeState': ('max', 'MergeState'), 'groupArrayMovingSumMergeState': ('groupArrayMovingSum', 'MergeState'), 'stochasticLinearRegressionMergeState': ('stochasticLinearRegression', 'MergeState'), 'medianMergeState': ('median', 'MergeState'), 'studentTTestMergeState': ('studentTTest', 'MergeState'), 'sumMapMergeState': ('sumMap', 'MergeState'), 'simpleLinearRegressionMergeState': ('simpleLinearRegression', 'MergeState'), 'varSampMergeState': ('varSamp', 'MergeState'), 'groupBitAndMergeState': ('groupBitAnd', 'MergeState'), 'topKMergeState': ('topK', 'MergeState'), 'argMinMergeState': ('argMin', 'MergeState'), 'mannWhitneyUTestMergeState': ('mannWhitneyUTest', 'MergeState'), 'skewPopMergeState': ('skewPop', 'MergeState'), 'intervalLengthSumMergeState': ('intervalLengthSum', 'MergeState'), 'quantilesExactHighMergeState': ('quantilesExactHigh', 'MergeState'), 'corrMergeState': ('corr', 'MergeState'), 'groupBitmapOrMergeState': ('groupBitmapOr', 'MergeState'), 'uniqHLL12MergeState': ('uniqHLL12', 'MergeState'), 'sumMergeState': ('sum', 'MergeState'), 'quantilesInterpolatedWeightedMergeState': ('quantilesInterpolatedWeighted', 'MergeState'), 'anyLastMergeState': ('anyLast', 'MergeState'), 'sequenceNextNodeMergeState': ('sequenceNextNode', 'MergeState'), 'groupArraySampleMergeState': ('groupArraySample', 'MergeState'), 'quantileExactHighMergeState': ('quantileExactHigh', 'MergeState'), 'groupBitmapMergeState': ('groupBitmap', 'MergeState'), 'quantilesExactMergeState': ('quantilesExact', 'MergeState'), 'exponentialMovingAverageMergeState': ('exponentialMovingAverage', 'MergeState'), 'quantilesTDigestMergeState': ('quantilesTDigest', 'MergeState'), 'boundingRatioMergeState': ('boundingRatio', 'MergeState'), 'categoricalInformationValueMergeState': ('categoricalInformationValue', 'MergeState'), 'varPopMergeState': ('varPop', 'MergeState'), 'uniqCombinedMergeState': ('uniqCombined', 'MergeState'), 'cramersVBiasCorrectedMergeState': ('cramersVBiasCorrected', 'MergeState'), 'quantileDeterministicMergeState': ('quantileDeterministic', 'MergeState'), 'groupArrayMovingAvgMergeState': ('groupArrayMovingAvg', 'MergeState'), 'quantileMergeState': ('quantile', 'MergeState'), 'maxMapMergeState': ('maxMap', 'MergeState'), 'quantilesTimingWeightedMergeState': ('quantilesTimingWeighted', 'MergeState'), 'entropyMergeState': ('entropy', 'MergeState'), 'maxIntersectionsMergeState': ('maxIntersections', 'MergeState'), 'covarPopMergeState': ('covarPop', 'MergeState'), 'first_valueMergeState': ('first_value', 'MergeState'), 'quantilesDeterministicMergeState': ('quantilesDeterministic', 'MergeState'), 'retentionMergeState': ('retention', 'MergeState'), 'groupArrayMergeState': ('groupArray', 'MergeState'), 'stddevPopMergeState': ('stddevPop', 'MergeState'), 'uniqUpToMergeState': ('uniqUpTo', 'MergeState'), 'histogramMergeState': ('histogram', 'MergeState'), 'avgWeightedMergeState': ('avgWeighted', 'MergeState'), 'uniqExactMergeState': ('uniqExact', 'MergeState'), 'covarSampMergeState': ('covarSamp', 'MergeState'), 'sequenceCountMergeState': ('sequenceCount', 'MergeState'), 'anyMergeState': ('any', 'MergeState'), 'quantilesExactLowMergeState': ('quantilesExactLow', 'MergeState'), 'stddevSampMergeState': ('stddevSamp', 'MergeState'), 'minMapMergeState': ('minMap', 'MergeState'), 'quantilesTimingMergeState': ('quantilesTiming', 'MergeState'), 'maxIntersectionsPositionMergeState': ('maxIntersectionsPosition', 'MergeState'), 'deltaSumMergeState': ('deltaSum', 'MergeState'), 'quantileTimingMergeState': ('quantileTiming', 'MergeState'), 'sumCountMergeState': ('sumCount', 'MergeState'), 'quantilesMergeState': ('quantiles', 'MergeState'), 'quantileGKMergeState': ('quantileGK', 'MergeState'), 'sumKahanMergeState': ('sumKahan', 'MergeState'), 'uniqCombined64MergeState': ('uniqCombined64', 'MergeState'), 'rankCorrMergeState': ('rankCorr', 'MergeState'), 'groupArrayInsertAtMergeState': ('groupArrayInsertAt', 'MergeState'), 'cramersVMergeState': ('cramersV', 'MergeState'), 'windowFunnelMergeState': ('windowFunnel', 'MergeState'), 'kolmogorovSmirnovTestMergeState': ('kolmogorovSmirnovTest', 'MergeState'), 'countMergeState': ('count', 'MergeState'), 'argMaxMergeState': ('argMax', 'MergeState'), 'groupBitmapAndForEach': ('groupBitmapAnd', 'ForEach'), 'quantileTDigestForEach': ('quantileTDigest', 'ForEach'), 'anyHeavyForEach': ('anyHeavy', 'ForEach'), 'kurtSampForEach': ('kurtSamp', 'ForEach'), 'largestTriangleThreeBucketsForEach': ('largestTriangleThreeBuckets', 'ForEach'), 'groupBitOrForEach': ('groupBitOr', 'ForEach'), 'groupBitmapXorForEach': ('groupBitmapXor', 'ForEach'), 'quantilesTDigestWeightedForEach': ('quantilesTDigestWeighted', 'ForEach'), 'quantilesExactWeightedForEach': ('quantilesExactWeighted', 'ForEach'), 'quantilesBFloat16WeightedForEach': ('quantilesBFloat16Weighted', 'ForEach'), 'welchTTestForEach': ('welchTTest', 'ForEach'), 'uniqThetaForEach': ('uniqTheta', 'ForEach'), 'stochasticLogisticRegressionForEach': ('stochasticLogisticRegression', 'ForEach'), 'quantileExactWeightedForEach': ('quantileExactWeighted', 'ForEach'), 'exponentialTimeDecayedAvgForEach': ('exponentialTimeDecayedAvg', 'ForEach'), 'skewSampForEach': ('skewSamp', 'ForEach'), 'sumWithOverflowForEach': ('sumWithOverflow', 'ForEach'), 'last_valueForEach': ('last_value', 'ForEach'), 'groupArrayLastForEach': ('groupArrayLast', 'ForEach'), 'groupUniqArrayForEach': ('groupUniqArray', 'ForEach'), 'uniqForEach': ('uniq', 'ForEach'), 'contingencyForEach': ('contingency', 'ForEach'), 'quantilesGKForEach': ('quantilesGK', 'ForEach'), 'meanZTestForEach': ('meanZTest', 'ForEach'), 'sparkBarForEach': ('sparkBar', 'ForEach'), 'avgForEach': ('avg', 'ForEach'), 'quantileExactForEach': ('quantileExact', 'ForEach'), 'quantileInterpolatedWeightedForEach': ('quantileInterpolatedWeighted', 'ForEach'), 'quantilesBFloat16ForEach': ('quantilesBFloat16', 'ForEach'), 'quantileBFloat16ForEach': ('quantileBFloat16', 'ForEach'), 'quantileTDigestWeightedForEach': ('quantileTDigestWeighted', 'ForEach'), 'theilsUForEach': ('theilsU', 'ForEach'), 'deltaSumTimestampForEach': ('deltaSumTimestamp', 'ForEach'), 'groupBitXorForEach': ('groupBitXor', 'ForEach'), 'quantileExactLowForEach': ('quantileExactLow', 'ForEach'), 'quantileBFloat16WeightedForEach': ('quantileBFloat16Weighted', 'ForEach'), 'minForEach': ('min', 'ForEach'), 'sequenceMatchForEach': ('sequenceMatch', 'ForEach'), 'kurtPopForEach': ('kurtPop', 'ForEach'), 'quantileTimingWeightedForEach': ('quantileTimingWeighted', 'ForEach'), 'topKWeightedForEach': ('topKWeighted', 'ForEach'), 'maxForEach': ('max', 'ForEach'), 'groupArrayMovingSumForEach': ('groupArrayMovingSum', 'ForEach'), 'stochasticLinearRegressionForEach': ('stochasticLinearRegression', 'ForEach'), 'medianForEach': ('median', 'ForEach'), 'studentTTestForEach': ('studentTTest', 'ForEach'), 'sumMapForEach': ('sumMap', 'ForEach'), 'simpleLinearRegressionForEach': ('simpleLinearRegression', 'ForEach'), 'varSampForEach': ('varSamp', 'ForEach'), 'groupBitAndForEach': ('groupBitAnd', 'ForEach'), 'topKForEach': ('topK', 'ForEach'), 'argMinForEach': ('argMin', 'ForEach'), 'mannWhitneyUTestForEach': ('mannWhitneyUTest', 'ForEach'), 'skewPopForEach': ('skewPop', 'ForEach'), 'intervalLengthSumForEach': ('intervalLengthSum', 'ForEach'), 'quantilesExactHighForEach': ('quantilesExactHigh', 'ForEach'), 'corrForEach': ('corr', 'ForEach'), 'groupBitmapOrForEach': ('groupBitmapOr', 'ForEach'), 'uniqHLL12ForEach': ('uniqHLL12', 'ForEach'), 'sumForEach': ('sum', 'ForEach'), 'quantilesInterpolatedWeightedForEach': ('quantilesInterpolatedWeighted', 'ForEach'), 'anyLastForEach': ('anyLast', 'ForEach'), 'sequenceNextNodeForEach': ('sequenceNextNode', 'ForEach'), 'groupArraySampleForEach': ('groupArraySample', 'ForEach'), 'quantileExactHighForEach': ('quantileExactHigh', 'ForEach'), 'groupBitmapForEach': ('groupBitmap', 'ForEach'), 'quantilesExactForEach': ('quantilesExact', 'ForEach'), 'exponentialMovingAverageForEach': ('exponentialMovingAverage', 'ForEach'), 'quantilesTDigestForEach': ('quantilesTDigest', 'ForEach'), 'boundingRatioForEach': ('boundingRatio', 'ForEach'), 'categoricalInformationValueForEach': ('categoricalInformationValue', 'ForEach'), 'varPopForEach': ('varPop', 'ForEach'), 'uniqCombinedForEach': ('uniqCombined', 'ForEach'), 'cramersVBiasCorrectedForEach': ('cramersVBiasCorrected', 'ForEach'), 'quantileDeterministicForEach': ('quantileDeterministic', 'ForEach'), 'groupArrayMovingAvgForEach': ('groupArrayMovingAvg', 'ForEach'), 'quantileForEach': ('quantile', 'ForEach'), 'maxMapForEach': ('maxMap', 'ForEach'), 'quantilesTimingWeightedForEach': ('quantilesTimingWeighted', 'ForEach'), 'entropyForEach': ('entropy', 'ForEach'), 'maxIntersectionsForEach': ('maxIntersections', 'ForEach'), 'covarPopForEach': ('covarPop', 'ForEach'), 'first_valueForEach': ('first_value', 'ForEach'), 'quantilesDeterministicForEach': ('quantilesDeterministic', 'ForEach'), 'retentionForEach': ('retention', 'ForEach'), 'groupArrayForEach': ('groupArray', 'ForEach'), 'stddevPopForEach': ('stddevPop', 'ForEach'), 'uniqUpToForEach': ('uniqUpTo', 'ForEach'), 'histogramForEach': ('histogram', 'ForEach'), 'avgWeightedForEach': ('avgWeighted', 'ForEach'), 'uniqExactForEach': ('uniqExact', 'ForEach'), 'covarSampForEach': ('covarSamp', 'ForEach'), 'sequenceCountForEach': ('sequenceCount', 'ForEach'), 'anyForEach': ('any', 'ForEach'), 'quantilesExactLowForEach': ('quantilesExactLow', 'ForEach'), 'stddevSampForEach': ('stddevSamp', 'ForEach'), 'minMapForEach': ('minMap', 'ForEach'), 'quantilesTimingForEach': ('quantilesTiming', 'ForEach'), 'maxIntersectionsPositionForEach': ('maxIntersectionsPosition', 'ForEach'), 'deltaSumForEach': ('deltaSum', 'ForEach'), 'quantileTimingForEach': ('quantileTiming', 'ForEach'), 'sumCountForEach': ('sumCount', 'ForEach'), 'quantilesForEach': ('quantiles', 'ForEach'), 'quantileGKForEach': ('quantileGK', 'ForEach'), 'sumKahanForEach': ('sumKahan', 'ForEach'), 'uniqCombined64ForEach': ('uniqCombined64', 'ForEach'), 'rankCorrForEach': ('rankCorr', 'ForEach'), 'groupArrayInsertAtForEach': ('groupArrayInsertAt', 'ForEach'), 'cramersVForEach': ('cramersV', 'ForEach'), 'windowFunnelForEach': ('windowFunnel', 'ForEach'), 'kolmogorovSmirnovTestForEach': ('kolmogorovSmirnovTest', 'ForEach'), 'countForEach': ('count', 'ForEach'), 'argMaxForEach': ('argMax', 'ForEach'), 'groupBitmapAndDistinct': ('groupBitmapAnd', 'Distinct'), 'quantileTDigestDistinct': ('quantileTDigest', 'Distinct'), 'anyHeavyDistinct': ('anyHeavy', 'Distinct'), 'kurtSampDistinct': ('kurtSamp', 'Distinct'), 'largestTriangleThreeBucketsDistinct': ('largestTriangleThreeBuckets', 'Distinct'), 'groupBitOrDistinct': ('groupBitOr', 'Distinct'), 'groupBitmapXorDistinct': ('groupBitmapXor', 'Distinct'), 'quantilesTDigestWeightedDistinct': ('quantilesTDigestWeighted', 'Distinct'), 'quantilesExactWeightedDistinct': ('quantilesExactWeighted', 'Distinct'), 'quantilesBFloat16WeightedDistinct': ('quantilesBFloat16Weighted', 'Distinct'), 'welchTTestDistinct': ('welchTTest', 'Distinct'), 'uniqThetaDistinct': ('uniqTheta', 'Distinct'), 'stochasticLogisticRegressionDistinct': ('stochasticLogisticRegression', 'Distinct'), 'quantileExactWeightedDistinct': ('quantileExactWeighted', 'Distinct'), 'exponentialTimeDecayedAvgDistinct': ('exponentialTimeDecayedAvg', 'Distinct'), 'skewSampDistinct': ('skewSamp', 'Distinct'), 'sumWithOverflowDistinct': ('sumWithOverflow', 'Distinct'), 'last_valueDistinct': ('last_value', 'Distinct'), 'groupArrayLastDistinct': ('groupArrayLast', 'Distinct'), 'groupUniqArrayDistinct': ('groupUniqArray', 'Distinct'), 'uniqDistinct': ('uniq', 'Distinct'), 'contingencyDistinct': ('contingency', 'Distinct'), 'quantilesGKDistinct': ('quantilesGK', 'Distinct'), 'meanZTestDistinct': ('meanZTest', 'Distinct'), 'sparkBarDistinct': ('sparkBar', 'Distinct'), 'avgDistinct': ('avg', 'Distinct'), 'quantileExactDistinct': ('quantileExact', 'Distinct'), 'quantileInterpolatedWeightedDistinct': ('quantileInterpolatedWeighted', 'Distinct'), 'quantilesBFloat16Distinct': ('quantilesBFloat16', 'Distinct'), 'quantileBFloat16Distinct': ('quantileBFloat16', 'Distinct'), 'quantileTDigestWeightedDistinct': ('quantileTDigestWeighted', 'Distinct'), 'theilsUDistinct': ('theilsU', 'Distinct'), 'deltaSumTimestampDistinct': ('deltaSumTimestamp', 'Distinct'), 'groupBitXorDistinct': ('groupBitXor', 'Distinct'), 'quantileExactLowDistinct': ('quantileExactLow', 'Distinct'), 'quantileBFloat16WeightedDistinct': ('quantileBFloat16Weighted', 'Distinct'), 'minDistinct': ('min', 'Distinct'), 'sequenceMatchDistinct': ('sequenceMatch', 'Distinct'), 'kurtPopDistinct': ('kurtPop', 'Distinct'), 'quantileTimingWeightedDistinct': ('quantileTimingWeighted', 'Distinct'), 'topKWeightedDistinct': ('topKWeighted', 'Distinct'), 'maxDistinct': ('max', 'Distinct'), 'groupArrayMovingSumDistinct': ('groupArrayMovingSum', 'Distinct'), 'stochasticLinearRegressionDistinct': ('stochasticLinearRegression', 'Distinct'), 'medianDistinct': ('median', 'Distinct'), 'studentTTestDistinct': ('studentTTest', 'Distinct'), 'sumMapDistinct': ('sumMap', 'Distinct'), 'simpleLinearRegressionDistinct': ('simpleLinearRegression', 'Distinct'), 'varSampDistinct': ('varSamp', 'Distinct'), 'groupBitAndDistinct': ('groupBitAnd', 'Distinct'), 'topKDistinct': ('topK', 'Distinct'), 'argMinDistinct': ('argMin', 'Distinct'), 'mannWhitneyUTestDistinct': ('mannWhitneyUTest', 'Distinct'), 'skewPopDistinct': ('skewPop', 'Distinct'), 'intervalLengthSumDistinct': ('intervalLengthSum', 'Distinct'), 'quantilesExactHighDistinct': ('quantilesExactHigh', 'Distinct'), 'corrDistinct': ('corr', 'Distinct'), 'groupBitmapOrDistinct': ('groupBitmapOr', 'Distinct'), 'uniqHLL12Distinct': ('uniqHLL12', 'Distinct'), 'sumDistinct': ('sum', 'Distinct'), 'quantilesInterpolatedWeightedDistinct': ('quantilesInterpolatedWeighted', 'Distinct'), 'anyLastDistinct': ('anyLast', 'Distinct'), 'sequenceNextNodeDistinct': ('sequenceNextNode', 'Distinct'), 'groupArraySampleDistinct': ('groupArraySample', 'Distinct'), 'quantileExactHighDistinct': ('quantileExactHigh', 'Distinct'), 'groupBitmapDistinct': ('groupBitmap', 'Distinct'), 'quantilesExactDistinct': ('quantilesExact', 'Distinct'), 'exponentialMovingAverageDistinct': ('exponentialMovingAverage', 'Distinct'), 'quantilesTDigestDistinct': ('quantilesTDigest', 'Distinct'), 'boundingRatioDistinct': ('boundingRatio', 'Distinct'), 'categoricalInformationValueDistinct': ('categoricalInformationValue', 'Distinct'), 'varPopDistinct': ('varPop', 'Distinct'), 'uniqCombinedDistinct': ('uniqCombined', 'Distinct'), 'cramersVBiasCorrectedDistinct': ('cramersVBiasCorrected', 'Distinct'), 'quantileDeterministicDistinct': ('quantileDeterministic', 'Distinct'), 'groupArrayMovingAvgDistinct': ('groupArrayMovingAvg', 'Distinct'), 'quantileDistinct': ('quantile', 'Distinct'), 'maxMapDistinct': ('maxMap', 'Distinct'), 'quantilesTimingWeightedDistinct': ('quantilesTimingWeighted', 'Distinct'), 'entropyDistinct': ('entropy', 'Distinct'), 'maxIntersectionsDistinct': ('maxIntersections', 'Distinct'), 'covarPopDistinct': ('covarPop', 'Distinct'), 'first_valueDistinct': ('first_value', 'Distinct'), 'quantilesDeterministicDistinct': ('quantilesDeterministic', 'Distinct'), 'retentionDistinct': ('retention', 'Distinct'), 'groupArrayDistinct': ('groupArray', 'Distinct'), 'stddevPopDistinct': ('stddevPop', 'Distinct'), 'uniqUpToDistinct': ('uniqUpTo', 'Distinct'), 'histogramDistinct': ('histogram', 'Distinct'), 'avgWeightedDistinct': ('avgWeighted', 'Distinct'), 'uniqExactDistinct': ('uniqExact', 'Distinct'), 'covarSampDistinct': ('covarSamp', 'Distinct'), 'sequenceCountDistinct': ('sequenceCount', 'Distinct'), 'anyDistinct': ('any', 'Distinct'), 'quantilesExactLowDistinct': ('quantilesExactLow', 'Distinct'), 'stddevSampDistinct': ('stddevSamp', 'Distinct'), 'minMapDistinct': ('minMap', 'Distinct'), 'quantilesTimingDistinct': ('quantilesTiming', 'Distinct'), 'maxIntersectionsPositionDistinct': ('maxIntersectionsPosition', 'Distinct'), 'deltaSumDistinct': ('deltaSum', 'Distinct'), 'quantileTimingDistinct': ('quantileTiming', 'Distinct'), 'sumCountDistinct': ('sumCount', 'Distinct'), 'quantilesDistinct': ('quantiles', 'Distinct'), 'quantileGKDistinct': ('quantileGK', 'Distinct'), 'sumKahanDistinct': ('sumKahan', 'Distinct'), 'uniqCombined64Distinct': ('uniqCombined64', 'Distinct'), 'rankCorrDistinct': ('rankCorr', 'Distinct'), 'groupArrayInsertAtDistinct': ('groupArrayInsertAt', 'Distinct'), 'cramersVDistinct': ('cramersV', 'Distinct'), 'windowFunnelDistinct': ('windowFunnel', 'Distinct'), 'kolmogorovSmirnovTestDistinct': ('kolmogorovSmirnovTest', 'Distinct'), 'countDistinct': ('count', 'Distinct'), 'argMaxDistinct': ('argMax', 'Distinct'), 'groupBitmapAndOrDefault': ('groupBitmapAnd', 'OrDefault'), 'quantileTDigestOrDefault': ('quantileTDigest', 'OrDefault'), 'anyHeavyOrDefault': ('anyHeavy', 'OrDefault'), 'kurtSampOrDefault': ('kurtSamp', 'OrDefault'), 'largestTriangleThreeBucketsOrDefault': ('largestTriangleThreeBuckets', 'OrDefault'), 'groupBitOrOrDefault': ('groupBitOr', 'OrDefault'), 'groupBitmapXorOrDefault': ('groupBitmapXor', 'OrDefault'), 'quantilesTDigestWeightedOrDefault': ('quantilesTDigestWeighted', 'OrDefault'), 'quantilesExactWeightedOrDefault': ('quantilesExactWeighted', 'OrDefault'), 'quantilesBFloat16WeightedOrDefault': ('quantilesBFloat16Weighted', 'OrDefault'), 'welchTTestOrDefault': ('welchTTest', 'OrDefault'), 'uniqThetaOrDefault': ('uniqTheta', 'OrDefault'), 'stochasticLogisticRegressionOrDefault': ('stochasticLogisticRegression', 'OrDefault'), 'quantileExactWeightedOrDefault': ('quantileExactWeighted', 'OrDefault'), 'exponentialTimeDecayedAvgOrDefault': ('exponentialTimeDecayedAvg', 'OrDefault'), 'skewSampOrDefault': ('skewSamp', 'OrDefault'), 'sumWithOverflowOrDefault': ('sumWithOverflow', 'OrDefault'), 'last_valueOrDefault': ('last_value', 'OrDefault'), 'groupArrayLastOrDefault': ('groupArrayLast', 'OrDefault'), 'groupUniqArrayOrDefault': ('groupUniqArray', 'OrDefault'), 'uniqOrDefault': ('uniq', 'OrDefault'), 'contingencyOrDefault': ('contingency', 'OrDefault'), 'quantilesGKOrDefault': ('quantilesGK', 'OrDefault'), 'meanZTestOrDefault': ('meanZTest', 'OrDefault'), 'sparkBarOrDefault': ('sparkBar', 'OrDefault'), 'avgOrDefault': ('avg', 'OrDefault'), 'quantileExactOrDefault': ('quantileExact', 'OrDefault'), 'quantileInterpolatedWeightedOrDefault': ('quantileInterpolatedWeighted', 'OrDefault'), 'quantilesBFloat16OrDefault': ('quantilesBFloat16', 'OrDefault'), 'quantileBFloat16OrDefault': ('quantileBFloat16', 'OrDefault'), 'quantileTDigestWeightedOrDefault': ('quantileTDigestWeighted', 'OrDefault'), 'theilsUOrDefault': ('theilsU', 'OrDefault'), 'deltaSumTimestampOrDefault': ('deltaSumTimestamp', 'OrDefault'), 'groupBitXorOrDefault': ('groupBitXor', 'OrDefault'), 'quantileExactLowOrDefault': ('quantileExactLow', 'OrDefault'), 'quantileBFloat16WeightedOrDefault': ('quantileBFloat16Weighted', 'OrDefault'), 'minOrDefault': ('min', 'OrDefault'), 'sequenceMatchOrDefault': ('sequenceMatch', 'OrDefault'), 'kurtPopOrDefault': ('kurtPop', 'OrDefault'), 'quantileTimingWeightedOrDefault': ('quantileTimingWeighted', 'OrDefault'), 'topKWeightedOrDefault': ('topKWeighted', 'OrDefault'), 'maxOrDefault': ('max', 'OrDefault'), 'groupArrayMovingSumOrDefault': ('groupArrayMovingSum', 'OrDefault'), 'stochasticLinearRegressionOrDefault': ('stochasticLinearRegression', 'OrDefault'), 'medianOrDefault': ('median', 'OrDefault'), 'studentTTestOrDefault': ('studentTTest', 'OrDefault'), 'sumMapOrDefault': ('sumMap', 'OrDefault'), 'simpleLinearRegressionOrDefault': ('simpleLinearRegression', 'OrDefault'), 'varSampOrDefault': ('varSamp', 'OrDefault'), 'groupBitAndOrDefault': ('groupBitAnd', 'OrDefault'), 'topKOrDefault': ('topK', 'OrDefault'), 'argMinOrDefault': ('argMin', 'OrDefault'), 'mannWhitneyUTestOrDefault': ('mannWhitneyUTest', 'OrDefault'), 'skewPopOrDefault': ('skewPop', 'OrDefault'), 'intervalLengthSumOrDefault': ('intervalLengthSum', 'OrDefault'), 'quantilesExactHighOrDefault': ('quantilesExactHigh', 'OrDefault'), 'corrOrDefault': ('corr', 'OrDefault'), 'groupBitmapOrOrDefault': ('groupBitmapOr', 'OrDefault'), 'uniqHLL12OrDefault': ('uniqHLL12', 'OrDefault'), 'sumOrDefault': ('sum', 'OrDefault'), 'quantilesInterpolatedWeightedOrDefault': ('quantilesInterpolatedWeighted', 'OrDefault'), 'anyLastOrDefault': ('anyLast', 'OrDefault'), 'sequenceNextNodeOrDefault': ('sequenceNextNode', 'OrDefault'), 'groupArraySampleOrDefault': ('groupArraySample', 'OrDefault'), 'quantileExactHighOrDefault': ('quantileExactHigh', 'OrDefault'), 'groupBitmapOrDefault': ('groupBitmap', 'OrDefault'), 'quantilesExactOrDefault': ('quantilesExact', 'OrDefault'), 'exponentialMovingAverageOrDefault': ('exponentialMovingAverage', 'OrDefault'), 'quantilesTDigestOrDefault': ('quantilesTDigest', 'OrDefault'), 'boundingRatioOrDefault': ('boundingRatio', 'OrDefault'), 'categoricalInformationValueOrDefault': ('categoricalInformationValue', 'OrDefault'), 'varPopOrDefault': ('varPop', 'OrDefault'), 'uniqCombinedOrDefault': ('uniqCombined', 'OrDefault'), 'cramersVBiasCorrectedOrDefault': ('cramersVBiasCorrected', 'OrDefault'), 'quantileDeterministicOrDefault': ('quantileDeterministic', 'OrDefault'), 'groupArrayMovingAvgOrDefault': ('groupArrayMovingAvg', 'OrDefault'), 'quantileOrDefault': ('quantile', 'OrDefault'), 'maxMapOrDefault': ('maxMap', 'OrDefault'), 'quantilesTimingWeightedOrDefault': ('quantilesTimingWeighted', 'OrDefault'), 'entropyOrDefault': ('entropy', 'OrDefault'), 'maxIntersectionsOrDefault': ('maxIntersections', 'OrDefault'), 'covarPopOrDefault': ('covarPop', 'OrDefault'), 'first_valueOrDefault': ('first_value', 'OrDefault'), 'quantilesDeterministicOrDefault': ('quantilesDeterministic', 'OrDefault'), 'retentionOrDefault': ('retention', 'OrDefault'), 'groupArrayOrDefault': ('groupArray', 'OrDefault'), 'stddevPopOrDefault': ('stddevPop', 'OrDefault'), 'uniqUpToOrDefault': ('uniqUpTo', 'OrDefault'), 'histogramOrDefault': ('histogram', 'OrDefault'), 'avgWeightedOrDefault': ('avgWeighted', 'OrDefault'), 'uniqExactOrDefault': ('uniqExact', 'OrDefault'), 'covarSampOrDefault': ('covarSamp', 'OrDefault'), 'sequenceCountOrDefault': ('sequenceCount', 'OrDefault'), 'anyOrDefault': ('any', 'OrDefault'), 'quantilesExactLowOrDefault': ('quantilesExactLow', 'OrDefault'), 'stddevSampOrDefault': ('stddevSamp', 'OrDefault'), 'minMapOrDefault': ('minMap', 'OrDefault'), 'quantilesTimingOrDefault': ('quantilesTiming', 'OrDefault'), 'maxIntersectionsPositionOrDefault': ('maxIntersectionsPosition', 'OrDefault'), 'deltaSumOrDefault': ('deltaSum', 'OrDefault'), 'quantileTimingOrDefault': ('quantileTiming', 'OrDefault'), 'sumCountOrDefault': ('sumCount', 'OrDefault'), 'quantilesOrDefault': ('quantiles', 'OrDefault'), 'quantileGKOrDefault': ('quantileGK', 'OrDefault'), 'sumKahanOrDefault': ('sumKahan', 'OrDefault'), 'uniqCombined64OrDefault': ('uniqCombined64', 'OrDefault'), 'rankCorrOrDefault': ('rankCorr', 'OrDefault'), 'groupArrayInsertAtOrDefault': ('groupArrayInsertAt', 'OrDefault'), 'cramersVOrDefault': ('cramersV', 'OrDefault'), 'windowFunnelOrDefault': ('windowFunnel', 'OrDefault'), 'kolmogorovSmirnovTestOrDefault': ('kolmogorovSmirnovTest', 'OrDefault'), 'countOrDefault': ('count', 'OrDefault'), 'argMaxOrDefault': ('argMax', 'OrDefault'), 'groupBitmapAndOrNull': ('groupBitmapAnd', 'OrNull'), 'quantileTDigestOrNull': ('quantileTDigest', 'OrNull'), 'anyHeavyOrNull': ('anyHeavy', 'OrNull'), 'kurtSampOrNull': ('kurtSamp', 'OrNull'), 'largestTriangleThreeBucketsOrNull': ('largestTriangleThreeBuckets', 'OrNull'), 'groupBitOrOrNull': ('groupBitOr', 'OrNull'), 'groupBitmapXorOrNull': ('groupBitmapXor', 'OrNull'), 'quantilesTDigestWeightedOrNull': ('quantilesTDigestWeighted', 'OrNull'), 'quantilesExactWeightedOrNull': ('quantilesExactWeighted', 'OrNull'), 'quantilesBFloat16WeightedOrNull': ('quantilesBFloat16Weighted', 'OrNull'), 'welchTTestOrNull': ('welchTTest', 'OrNull'), 'uniqThetaOrNull': ('uniqTheta', 'OrNull'), 'stochasticLogisticRegressionOrNull': ('stochasticLogisticRegression', 'OrNull'), 'quantileExactWeightedOrNull': ('quantileExactWeighted', 'OrNull'), 'exponentialTimeDecayedAvgOrNull': ('exponentialTimeDecayedAvg', 'OrNull'), 'skewSampOrNull': ('skewSamp', 'OrNull'), 'sumWithOverflowOrNull': ('sumWithOverflow', 'OrNull'), 'last_valueOrNull': ('last_value', 'OrNull'), 'groupArrayLastOrNull': ('groupArrayLast', 'OrNull'), 'groupUniqArrayOrNull': ('groupUniqArray', 'OrNull'), 'uniqOrNull': ('uniq', 'OrNull'), 'contingencyOrNull': ('contingency', 'OrNull'), 'quantilesGKOrNull': ('quantilesGK', 'OrNull'), 'meanZTestOrNull': ('meanZTest', 'OrNull'), 'sparkBarOrNull': ('sparkBar', 'OrNull'), 'avgOrNull': ('avg', 'OrNull'), 'quantileExactOrNull': ('quantileExact', 'OrNull'), 'quantileInterpolatedWeightedOrNull': ('quantileInterpolatedWeighted', 'OrNull'), 'quantilesBFloat16OrNull': ('quantilesBFloat16', 'OrNull'), 'quantileBFloat16OrNull': ('quantileBFloat16', 'OrNull'), 'quantileTDigestWeightedOrNull': ('quantileTDigestWeighted', 'OrNull'), 'theilsUOrNull': ('theilsU', 'OrNull'), 'deltaSumTimestampOrNull': ('deltaSumTimestamp', 'OrNull'), 'groupBitXorOrNull': ('groupBitXor', 'OrNull'), 'quantileExactLowOrNull': ('quantileExactLow', 'OrNull'), 'quantileBFloat16WeightedOrNull': ('quantileBFloat16Weighted', 'OrNull'), 'minOrNull': ('min', 'OrNull'), 'sequenceMatchOrNull': ('sequenceMatch', 'OrNull'), 'kurtPopOrNull': ('kurtPop', 'OrNull'), 'quantileTimingWeightedOrNull': ('quantileTimingWeighted', 'OrNull'), 'topKWeightedOrNull': ('topKWeighted', 'OrNull'), 'maxOrNull': ('max', 'OrNull'), 'groupArrayMovingSumOrNull': ('groupArrayMovingSum', 'OrNull'), 'stochasticLinearRegressionOrNull': ('stochasticLinearRegression', 'OrNull'), 'medianOrNull': ('median', 'OrNull'), 'studentTTestOrNull': ('studentTTest', 'OrNull'), 'sumMapOrNull': ('sumMap', 'OrNull'), 'simpleLinearRegressionOrNull': ('simpleLinearRegression', 'OrNull'), 'varSampOrNull': ('varSamp', 'OrNull'), 'groupBitAndOrNull': ('groupBitAnd', 'OrNull'), 'topKOrNull': ('topK', 'OrNull'), 'argMinOrNull': ('argMin', 'OrNull'), 'mannWhitneyUTestOrNull': ('mannWhitneyUTest', 'OrNull'), 'skewPopOrNull': ('skewPop', 'OrNull'), 'intervalLengthSumOrNull': ('intervalLengthSum', 'OrNull'), 'quantilesExactHighOrNull': ('quantilesExactHigh', 'OrNull'), 'corrOrNull': ('corr', 'OrNull'), 'groupBitmapOrOrNull': ('groupBitmapOr', 'OrNull'), 'uniqHLL12OrNull': ('uniqHLL12', 'OrNull'), 'sumOrNull': ('sum', 'OrNull'), 'quantilesInterpolatedWeightedOrNull': ('quantilesInterpolatedWeighted', 'OrNull'), 'anyLastOrNull': ('anyLast', 'OrNull'), 'sequenceNextNodeOrNull': ('sequenceNextNode', 'OrNull'), 'groupArraySampleOrNull': ('groupArraySample', 'OrNull'), 'quantileExactHighOrNull': ('quantileExactHigh', 'OrNull'), 'groupBitmapOrNull': ('groupBitmap', 'OrNull'), 'quantilesExactOrNull': ('quantilesExact', 'OrNull'), 'exponentialMovingAverageOrNull': ('exponentialMovingAverage', 'OrNull'), 'quantilesTDigestOrNull': ('quantilesTDigest', 'OrNull'), 'boundingRatioOrNull': ('boundingRatio', 'OrNull'), 'categoricalInformationValueOrNull': ('categoricalInformationValue', 'OrNull'), 'varPopOrNull': ('varPop', 'OrNull'), 'uniqCombinedOrNull': ('uniqCombined', 'OrNull'), 'cramersVBiasCorrectedOrNull': ('cramersVBiasCorrected', 'OrNull'), 'quantileDeterministicOrNull': ('quantileDeterministic', 'OrNull'), 'groupArrayMovingAvgOrNull': ('groupArrayMovingAvg', 'OrNull'), 'quantileOrNull': ('quantile', 'OrNull'), 'maxMapOrNull': ('maxMap', 'OrNull'), 'quantilesTimingWeightedOrNull': ('quantilesTimingWeighted', 'OrNull'), 'entropyOrNull': ('entropy', 'OrNull'), 'maxIntersectionsOrNull': ('maxIntersections', 'OrNull'), 'covarPopOrNull': ('covarPop', 'OrNull'), 'first_valueOrNull': ('first_value', 'OrNull'), 'quantilesDeterministicOrNull': ('quantilesDeterministic', 'OrNull'), 'retentionOrNull': ('retention', 'OrNull'), 'groupArrayOrNull': ('groupArray', 'OrNull'), 'stddevPopOrNull': ('stddevPop', 'OrNull'), 'uniqUpToOrNull': ('uniqUpTo', 'OrNull'), 'histogramOrNull': ('histogram', 'OrNull'), 'avgWeightedOrNull': ('avgWeighted', 'OrNull'), 'uniqExactOrNull': ('uniqExact', 'OrNull'), 'covarSampOrNull': ('covarSamp', 'OrNull'), 'sequenceCountOrNull': ('sequenceCount', 'OrNull'), 'anyOrNull': ('any', 'OrNull'), 'quantilesExactLowOrNull': ('quantilesExactLow', 'OrNull'), 'stddevSampOrNull': ('stddevSamp', 'OrNull'), 'minMapOrNull': ('minMap', 'OrNull'), 'quantilesTimingOrNull': ('quantilesTiming', 'OrNull'), 'maxIntersectionsPositionOrNull': ('maxIntersectionsPosition', 'OrNull'), 'deltaSumOrNull': ('deltaSum', 'OrNull'), 'quantileTimingOrNull': ('quantileTiming', 'OrNull'), 'sumCountOrNull': ('sumCount', 'OrNull'), 'quantilesOrNull': ('quantiles', 'OrNull'), 'quantileGKOrNull': ('quantileGK', 'OrNull'), 'sumKahanOrNull': ('sumKahan', 'OrNull'), 'uniqCombined64OrNull': ('uniqCombined64', 'OrNull'), 'rankCorrOrNull': ('rankCorr', 'OrNull'), 'groupArrayInsertAtOrNull': ('groupArrayInsertAt', 'OrNull'), 'cramersVOrNull': ('cramersV', 'OrNull'), 'windowFunnelOrNull': ('windowFunnel', 'OrNull'), 'kolmogorovSmirnovTestOrNull': ('kolmogorovSmirnovTest', 'OrNull'), 'countOrNull': ('count', 'OrNull'), 'argMaxOrNull': ('argMax', 'OrNull'), 'groupBitmapAndResample': ('groupBitmapAnd', 'Resample'), 'quantileTDigestResample': ('quantileTDigest', 'Resample'), 'anyHeavyResample': ('anyHeavy', 'Resample'), 'kurtSampResample': ('kurtSamp', 'Resample'), 'largestTriangleThreeBucketsResample': ('largestTriangleThreeBuckets', 'Resample'), 'groupBitOrResample': ('groupBitOr', 'Resample'), 'groupBitmapXorResample': ('groupBitmapXor', 'Resample'), 'quantilesTDigestWeightedResample': ('quantilesTDigestWeighted', 'Resample'), 'quantilesExactWeightedResample': ('quantilesExactWeighted', 'Resample'), 'quantilesBFloat16WeightedResample': ('quantilesBFloat16Weighted', 'Resample'), 'welchTTestResample': ('welchTTest', 'Resample'), 'uniqThetaResample': ('uniqTheta', 'Resample'), 'stochasticLogisticRegressionResample': ('stochasticLogisticRegression', 'Resample'), 'quantileExactWeightedResample': ('quantileExactWeighted', 'Resample'), 'exponentialTimeDecayedAvgResample': ('exponentialTimeDecayedAvg', 'Resample'), 'skewSampResample': ('skewSamp', 'Resample'), 'sumWithOverflowResample': ('sumWithOverflow', 'Resample'), 'last_valueResample': ('last_value', 'Resample'), 'groupArrayLastResample': ('groupArrayLast', 'Resample'), 'groupUniqArrayResample': ('groupUniqArray', 'Resample'), 'uniqResample': ('uniq', 'Resample'), 'contingencyResample': ('contingency', 'Resample'), 'quantilesGKResample': ('quantilesGK', 'Resample'), 'meanZTestResample': ('meanZTest', 'Resample'), 'sparkBarResample': ('sparkBar', 'Resample'), 'avgResample': ('avg', 'Resample'), 'quantileExactResample': ('quantileExact', 'Resample'), 'quantileInterpolatedWeightedResample': ('quantileInterpolatedWeighted', 'Resample'), 'quantilesBFloat16Resample': ('quantilesBFloat16', 'Resample'), 'quantileBFloat16Resample': ('quantileBFloat16', 'Resample'), 'quantileTDigestWeightedResample': ('quantileTDigestWeighted', 'Resample'), 'theilsUResample': ('theilsU', 'Resample'), 'deltaSumTimestampResample': ('deltaSumTimestamp', 'Resample'), 'groupBitXorResample': ('groupBitXor', 'Resample'), 'quantileExactLowResample': ('quantileExactLow', 'Resample'), 'quantileBFloat16WeightedResample': ('quantileBFloat16Weighted', 'Resample'), 'minResample': ('min', 'Resample'), 'sequenceMatchResample': ('sequenceMatch', 'Resample'), 'kurtPopResample': ('kurtPop', 'Resample'), 'quantileTimingWeightedResample': ('quantileTimingWeighted', 'Resample'), 'topKWeightedResample': ('topKWeighted', 'Resample'), 'maxResample': ('max', 'Resample'), 'groupArrayMovingSumResample': ('groupArrayMovingSum', 'Resample'), 'stochasticLinearRegressionResample': ('stochasticLinearRegression', 'Resample'), 'medianResample': ('median', 'Resample'), 'studentTTestResample': ('studentTTest', 'Resample'), 'sumMapResample': ('sumMap', 'Resample'), 'simpleLinearRegressionResample': ('simpleLinearRegression', 'Resample'), 'varSampResample': ('varSamp', 'Resample'), 'groupBitAndResample': ('groupBitAnd', 'Resample'), 'topKResample': ('topK', 'Resample'), 'argMinResample': ('argMin', 'Resample'), 'mannWhitneyUTestResample': ('mannWhitneyUTest', 'Resample'), 'skewPopResample': ('skewPop', 'Resample'), 'intervalLengthSumResample': ('intervalLengthSum', 'Resample'), 'quantilesExactHighResample': ('quantilesExactHigh', 'Resample'), 'corrResample': ('corr', 'Resample'), 'groupBitmapOrResample': ('groupBitmapOr', 'Resample'), 'uniqHLL12Resample': ('uniqHLL12', 'Resample'), 'sumResample': ('sum', 'Resample'), 'quantilesInterpolatedWeightedResample': ('quantilesInterpolatedWeighted', 'Resample'), 'anyLastResample': ('anyLast', 'Resample'), 'sequenceNextNodeResample': ('sequenceNextNode', 'Resample'), 'groupArraySampleResample': ('groupArraySample', 'Resample'), 'quantileExactHighResample': ('quantileExactHigh', 'Resample'), 'groupBitmapResample': ('groupBitmap', 'Resample'), 'quantilesExactResample': ('quantilesExact', 'Resample'), 'exponentialMovingAverageResample': ('exponentialMovingAverage', 'Resample'), 'quantilesTDigestResample': ('quantilesTDigest', 'Resample'), 'boundingRatioResample': ('boundingRatio', 'Resample'), 'categoricalInformationValueResample': ('categoricalInformationValue', 'Resample'), 'varPopResample': ('varPop', 'Resample'), 'uniqCombinedResample': ('uniqCombined', 'Resample'), 'cramersVBiasCorrectedResample': ('cramersVBiasCorrected', 'Resample'), 'quantileDeterministicResample': ('quantileDeterministic', 'Resample'), 'groupArrayMovingAvgResample': ('groupArrayMovingAvg', 'Resample'), 'quantileResample': ('quantile', 'Resample'), 'maxMapResample': ('maxMap', 'Resample'), 'quantilesTimingWeightedResample': ('quantilesTimingWeighted', 'Resample'), 'entropyResample': ('entropy', 'Resample'), 'maxIntersectionsResample': ('maxIntersections', 'Resample'), 'covarPopResample': ('covarPop', 'Resample'), 'first_valueResample': ('first_value', 'Resample'), 'quantilesDeterministicResample': ('quantilesDeterministic', 'Resample'), 'retentionResample': ('retention', 'Resample'), 'groupArrayResample': ('groupArray', 'Resample'), 'stddevPopResample': ('stddevPop', 'Resample'), 'uniqUpToResample': ('uniqUpTo', 'Resample'), 'histogramResample': ('histogram', 'Resample'), 'avgWeightedResample': ('avgWeighted', 'Resample'), 'uniqExactResample': ('uniqExact', 'Resample'), 'covarSampResample': ('covarSamp', 'Resample'), 'sequenceCountResample': ('sequenceCount', 'Resample'), 'anyResample': ('any', 'Resample'), 'quantilesExactLowResample': ('quantilesExactLow', 'Resample'), 'stddevSampResample': ('stddevSamp', 'Resample'), 'minMapResample': ('minMap', 'Resample'), 'quantilesTimingResample': ('quantilesTiming', 'Resample'), 'maxIntersectionsPositionResample': ('maxIntersectionsPosition', 'Resample'), 'deltaSumResample': ('deltaSum', 'Resample'), 'quantileTimingResample': ('quantileTiming', 'Resample'), 'sumCountResample': ('sumCount', 'Resample'), 'quantilesResample': ('quantiles', 'Resample'), 'quantileGKResample': ('quantileGK', 'Resample'), 'sumKahanResample': ('sumKahan', 'Resample'), 'uniqCombined64Resample': ('uniqCombined64', 'Resample'), 'rankCorrResample': ('rankCorr', 'Resample'), 'groupArrayInsertAtResample': ('groupArrayInsertAt', 'Resample'), 'cramersVResample': ('cramersV', 'Resample'), 'windowFunnelResample': ('windowFunnel', 'Resample'), 'kolmogorovSmirnovTestResample': ('kolmogorovSmirnovTest', 'Resample'), 'countResample': ('count', 'Resample'), 'argMaxResample': ('argMax', 'Resample'), 'groupBitmapAndArgMin': ('groupBitmapAnd', 'ArgMin'), 'quantileTDigestArgMin': ('quantileTDigest', 'ArgMin'), 'anyHeavyArgMin': ('anyHeavy', 'ArgMin'), 'kurtSampArgMin': ('kurtSamp', 'ArgMin'), 'largestTriangleThreeBucketsArgMin': ('largestTriangleThreeBuckets', 'ArgMin'), 'groupBitOrArgMin': ('groupBitOr', 'ArgMin'), 'groupBitmapXorArgMin': ('groupBitmapXor', 'ArgMin'), 'quantilesTDigestWeightedArgMin': ('quantilesTDigestWeighted', 'ArgMin'), 'quantilesExactWeightedArgMin': ('quantilesExactWeighted', 'ArgMin'), 'quantilesBFloat16WeightedArgMin': ('quantilesBFloat16Weighted', 'ArgMin'), 'welchTTestArgMin': ('welchTTest', 'ArgMin'), 'uniqThetaArgMin': ('uniqTheta', 'ArgMin'), 'stochasticLogisticRegressionArgMin': ('stochasticLogisticRegression', 'ArgMin'), 'quantileExactWeightedArgMin': ('quantileExactWeighted', 'ArgMin'), 'exponentialTimeDecayedAvgArgMin': ('exponentialTimeDecayedAvg', 'ArgMin'), 'skewSampArgMin': ('skewSamp', 'ArgMin'), 'sumWithOverflowArgMin': ('sumWithOverflow', 'ArgMin'), 'last_valueArgMin': ('last_value', 'ArgMin'), 'groupArrayLastArgMin': ('groupArrayLast', 'ArgMin'), 'groupUniqArrayArgMin': ('groupUniqArray', 'ArgMin'), 'uniqArgMin': ('uniq', 'ArgMin'), 'contingencyArgMin': ('contingency', 'ArgMin'), 'quantilesGKArgMin': ('quantilesGK', 'ArgMin'), 'meanZTestArgMin': ('meanZTest', 'ArgMin'), 'sparkBarArgMin': ('sparkBar', 'ArgMin'), 'avgArgMin': ('avg', 'ArgMin'), 'quantileExactArgMin': ('quantileExact', 'ArgMin'), 'quantileInterpolatedWeightedArgMin': ('quantileInterpolatedWeighted', 'ArgMin'), 'quantilesBFloat16ArgMin': ('quantilesBFloat16', 'ArgMin'), 'quantileBFloat16ArgMin': ('quantileBFloat16', 'ArgMin'), 'quantileTDigestWeightedArgMin': ('quantileTDigestWeighted', 'ArgMin'), 'theilsUArgMin': ('theilsU', 'ArgMin'), 'deltaSumTimestampArgMin': ('deltaSumTimestamp', 'ArgMin'), 'groupBitXorArgMin': ('groupBitXor', 'ArgMin'), 'quantileExactLowArgMin': ('quantileExactLow', 'ArgMin'), 'quantileBFloat16WeightedArgMin': ('quantileBFloat16Weighted', 'ArgMin'), 'minArgMin': ('min', 'ArgMin'), 'sequenceMatchArgMin': ('sequenceMatch', 'ArgMin'), 'kurtPopArgMin': ('kurtPop', 'ArgMin'), 'quantileTimingWeightedArgMin': ('quantileTimingWeighted', 'ArgMin'), 'topKWeightedArgMin': ('topKWeighted', 'ArgMin'), 'maxArgMin': ('max', 'ArgMin'), 'groupArrayMovingSumArgMin': ('groupArrayMovingSum', 'ArgMin'), 'stochasticLinearRegressionArgMin': ('stochasticLinearRegression', 'ArgMin'), 'medianArgMin': ('median', 'ArgMin'), 'studentTTestArgMin': ('studentTTest', 'ArgMin'), 'sumMapArgMin': ('sumMap', 'ArgMin'), 'simpleLinearRegressionArgMin': ('simpleLinearRegression', 'ArgMin'), 'varSampArgMin': ('varSamp', 'ArgMin'), 'groupBitAndArgMin': ('groupBitAnd', 'ArgMin'), 'topKArgMin': ('topK', 'ArgMin'), 'argMinArgMin': ('argMin', 'ArgMin'), 'mannWhitneyUTestArgMin': ('mannWhitneyUTest', 'ArgMin'), 'skewPopArgMin': ('skewPop', 'ArgMin'), 'intervalLengthSumArgMin': ('intervalLengthSum', 'ArgMin'), 'quantilesExactHighArgMin': ('quantilesExactHigh', 'ArgMin'), 'corrArgMin': ('corr', 'ArgMin'), 'groupBitmapOrArgMin': ('groupBitmapOr', 'ArgMin'), 'uniqHLL12ArgMin': ('uniqHLL12', 'ArgMin'), 'sumArgMin': ('sum', 'ArgMin'), 'quantilesInterpolatedWeightedArgMin': ('quantilesInterpolatedWeighted', 'ArgMin'), 'anyLastArgMin': ('anyLast', 'ArgMin'), 'sequenceNextNodeArgMin': ('sequenceNextNode', 'ArgMin'), 'groupArraySampleArgMin': ('groupArraySample', 'ArgMin'), 'quantileExactHighArgMin': ('quantileExactHigh', 'ArgMin'), 'groupBitmapArgMin': ('groupBitmap', 'ArgMin'), 'quantilesExactArgMin': ('quantilesExact', 'ArgMin'), 'exponentialMovingAverageArgMin': ('exponentialMovingAverage', 'ArgMin'), 'quantilesTDigestArgMin': ('quantilesTDigest', 'ArgMin'), 'boundingRatioArgMin': ('boundingRatio', 'ArgMin'), 'categoricalInformationValueArgMin': ('categoricalInformationValue', 'ArgMin'), 'varPopArgMin': ('varPop', 'ArgMin'), 'uniqCombinedArgMin': ('uniqCombined', 'ArgMin'), 'cramersVBiasCorrectedArgMin': ('cramersVBiasCorrected', 'ArgMin'), 'quantileDeterministicArgMin': ('quantileDeterministic', 'ArgMin'), 'groupArrayMovingAvgArgMin': ('groupArrayMovingAvg', 'ArgMin'), 'quantileArgMin': ('quantile', 'ArgMin'), 'maxMapArgMin': ('maxMap', 'ArgMin'), 'quantilesTimingWeightedArgMin': ('quantilesTimingWeighted', 'ArgMin'), 'entropyArgMin': ('entropy', 'ArgMin'), 'maxIntersectionsArgMin': ('maxIntersections', 'ArgMin'), 'covarPopArgMin': ('covarPop', 'ArgMin'), 'first_valueArgMin': ('first_value', 'ArgMin'), 'quantilesDeterministicArgMin': ('quantilesDeterministic', 'ArgMin'), 'retentionArgMin': ('retention', 'ArgMin'), 'groupArrayArgMin': ('groupArray', 'ArgMin'), 'stddevPopArgMin': ('stddevPop', 'ArgMin'), 'uniqUpToArgMin': ('uniqUpTo', 'ArgMin'), 'histogramArgMin': ('histogram', 'ArgMin'), 'avgWeightedArgMin': ('avgWeighted', 'ArgMin'), 'uniqExactArgMin': ('uniqExact', 'ArgMin'), 'covarSampArgMin': ('covarSamp', 'ArgMin'), 'sequenceCountArgMin': ('sequenceCount', 'ArgMin'), 'anyArgMin': ('any', 'ArgMin'), 'quantilesExactLowArgMin': ('quantilesExactLow', 'ArgMin'), 'stddevSampArgMin': ('stddevSamp', 'ArgMin'), 'minMapArgMin': ('minMap', 'ArgMin'), 'quantilesTimingArgMin': ('quantilesTiming', 'ArgMin'), 'maxIntersectionsPositionArgMin': ('maxIntersectionsPosition', 'ArgMin'), 'deltaSumArgMin': ('deltaSum', 'ArgMin'), 'quantileTimingArgMin': ('quantileTiming', 'ArgMin'), 'sumCountArgMin': ('sumCount', 'ArgMin'), 'quantilesArgMin': ('quantiles', 'ArgMin'), 'quantileGKArgMin': ('quantileGK', 'ArgMin'), 'sumKahanArgMin': ('sumKahan', 'ArgMin'), 'uniqCombined64ArgMin': ('uniqCombined64', 'ArgMin'), 'rankCorrArgMin': ('rankCorr', 'ArgMin'), 'groupArrayInsertAtArgMin': ('groupArrayInsertAt', 'ArgMin'), 'cramersVArgMin': ('cramersV', 'ArgMin'), 'windowFunnelArgMin': ('windowFunnel', 'ArgMin'), 'kolmogorovSmirnovTestArgMin': ('kolmogorovSmirnovTest', 'ArgMin'), 'countArgMin': ('count', 'ArgMin'), 'argMaxArgMin': ('argMax', 'ArgMin'), 'groupBitmapAndArgMax': ('groupBitmapAnd', 'ArgMax'), 'quantileTDigestArgMax': ('quantileTDigest', 'ArgMax'), 'anyHeavyArgMax': ('anyHeavy', 'ArgMax'), 'kurtSampArgMax': ('kurtSamp', 'ArgMax'), 'largestTriangleThreeBucketsArgMax': ('largestTriangleThreeBuckets', 'ArgMax'), 'groupBitOrArgMax': ('groupBitOr', 'ArgMax'), 'groupBitmapXorArgMax': ('groupBitmapXor', 'ArgMax'), 'quantilesTDigestWeightedArgMax': ('quantilesTDigestWeighted', 'ArgMax'), 'quantilesExactWeightedArgMax': ('quantilesExactWeighted', 'ArgMax'), 'quantilesBFloat16WeightedArgMax': ('quantilesBFloat16Weighted', 'ArgMax'), 'welchTTestArgMax': ('welchTTest', 'ArgMax'), 'uniqThetaArgMax': ('uniqTheta', 'ArgMax'), 'stochasticLogisticRegressionArgMax': ('stochasticLogisticRegression', 'ArgMax'), 'quantileExactWeightedArgMax': ('quantileExactWeighted', 'ArgMax'), 'exponentialTimeDecayedAvgArgMax': ('exponentialTimeDecayedAvg', 'ArgMax'), 'skewSampArgMax': ('skewSamp', 'ArgMax'), 'sumWithOverflowArgMax': ('sumWithOverflow', 'ArgMax'), 'last_valueArgMax': ('last_value', 'ArgMax'), 'groupArrayLastArgMax': ('groupArrayLast', 'ArgMax'), 'groupUniqArrayArgMax': ('groupUniqArray', 'ArgMax'), 'uniqArgMax': ('uniq', 'ArgMax'), 'contingencyArgMax': ('contingency', 'ArgMax'), 'quantilesGKArgMax': ('quantilesGK', 'ArgMax'), 'meanZTestArgMax': ('meanZTest', 'ArgMax'), 'sparkBarArgMax': ('sparkBar', 'ArgMax'), 'avgArgMax': ('avg', 'ArgMax'), 'quantileExactArgMax': ('quantileExact', 'ArgMax'), 'quantileInterpolatedWeightedArgMax': ('quantileInterpolatedWeighted', 'ArgMax'), 'quantilesBFloat16ArgMax': ('quantilesBFloat16', 'ArgMax'), 'quantileBFloat16ArgMax': ('quantileBFloat16', 'ArgMax'), 'quantileTDigestWeightedArgMax': ('quantileTDigestWeighted', 'ArgMax'), 'theilsUArgMax': ('theilsU', 'ArgMax'), 'deltaSumTimestampArgMax': ('deltaSumTimestamp', 'ArgMax'), 'groupBitXorArgMax': ('groupBitXor', 'ArgMax'), 'quantileExactLowArgMax': ('quantileExactLow', 'ArgMax'), 'quantileBFloat16WeightedArgMax': ('quantileBFloat16Weighted', 'ArgMax'), 'minArgMax': ('min', 'ArgMax'), 'sequenceMatchArgMax': ('sequenceMatch', 'ArgMax'), 'kurtPopArgMax': ('kurtPop', 'ArgMax'), 'quantileTimingWeightedArgMax': ('quantileTimingWeighted', 'ArgMax'), 'topKWeightedArgMax': ('topKWeighted', 'ArgMax'), 'maxArgMax': ('max', 'ArgMax'), 'groupArrayMovingSumArgMax': ('groupArrayMovingSum', 'ArgMax'), 'stochasticLinearRegressionArgMax': ('stochasticLinearRegression', 'ArgMax'), 'medianArgMax': ('median', 'ArgMax'), 'studentTTestArgMax': ('studentTTest', 'ArgMax'), 'sumMapArgMax': ('sumMap', 'ArgMax'), 'simpleLinearRegressionArgMax': ('simpleLinearRegression', 'ArgMax'), 'varSampArgMax': ('varSamp', 'ArgMax'), 'groupBitAndArgMax': ('groupBitAnd', 'ArgMax'), 'topKArgMax': ('topK', 'ArgMax'), 'argMinArgMax': ('argMin', 'ArgMax'), 'mannWhitneyUTestArgMax': ('mannWhitneyUTest', 'ArgMax'), 'skewPopArgMax': ('skewPop', 'ArgMax'), 'intervalLengthSumArgMax': ('intervalLengthSum', 'ArgMax'), 'quantilesExactHighArgMax': ('quantilesExactHigh', 'ArgMax'), 'corrArgMax': ('corr', 'ArgMax'), 'groupBitmapOrArgMax': ('groupBitmapOr', 'ArgMax'), 'uniqHLL12ArgMax': ('uniqHLL12', 'ArgMax'), 'sumArgMax': ('sum', 'ArgMax'), 'quantilesInterpolatedWeightedArgMax': ('quantilesInterpolatedWeighted', 'ArgMax'), 'anyLastArgMax': ('anyLast', 'ArgMax'), 'sequenceNextNodeArgMax': ('sequenceNextNode', 'ArgMax'), 'groupArraySampleArgMax': ('groupArraySample', 'ArgMax'), 'quantileExactHighArgMax': ('quantileExactHigh', 'ArgMax'), 'groupBitmapArgMax': ('groupBitmap', 'ArgMax'), 'quantilesExactArgMax': ('quantilesExact', 'ArgMax'), 'exponentialMovingAverageArgMax': ('exponentialMovingAverage', 'ArgMax'), 'quantilesTDigestArgMax': ('quantilesTDigest', 'ArgMax'), 'boundingRatioArgMax': ('boundingRatio', 'ArgMax'), 'categoricalInformationValueArgMax': ('categoricalInformationValue', 'ArgMax'), 'varPopArgMax': ('varPop', 'ArgMax'), 'uniqCombinedArgMax': ('uniqCombined', 'ArgMax'), 'cramersVBiasCorrectedArgMax': ('cramersVBiasCorrected', 'ArgMax'), 'quantileDeterministicArgMax': ('quantileDeterministic', 'ArgMax'), 'groupArrayMovingAvgArgMax': ('groupArrayMovingAvg', 'ArgMax'), 'quantileArgMax': ('quantile', 'ArgMax'), 'maxMapArgMax': ('maxMap', 'ArgMax'), 'quantilesTimingWeightedArgMax': ('quantilesTimingWeighted', 'ArgMax'), 'entropyArgMax': ('entropy', 'ArgMax'), 'maxIntersectionsArgMax': ('maxIntersections', 'ArgMax'), 'covarPopArgMax': ('covarPop', 'ArgMax'), 'first_valueArgMax': ('first_value', 'ArgMax'), 'quantilesDeterministicArgMax': ('quantilesDeterministic', 'ArgMax'), 'retentionArgMax': ('retention', 'ArgMax'), 'groupArrayArgMax': ('groupArray', 'ArgMax'), 'stddevPopArgMax': ('stddevPop', 'ArgMax'), 'uniqUpToArgMax': ('uniqUpTo', 'ArgMax'), 'histogramArgMax': ('histogram', 'ArgMax'), 'avgWeightedArgMax': ('avgWeighted', 'ArgMax'), 'uniqExactArgMax': ('uniqExact', 'ArgMax'), 'covarSampArgMax': ('covarSamp', 'ArgMax'), 'sequenceCountArgMax': ('sequenceCount', 'ArgMax'), 'anyArgMax': ('any', 'ArgMax'), 'quantilesExactLowArgMax': ('quantilesExactLow', 'ArgMax'), 'stddevSampArgMax': ('stddevSamp', 'ArgMax'), 'minMapArgMax': ('minMap', 'ArgMax'), 'quantilesTimingArgMax': ('quantilesTiming', 'ArgMax'), 'maxIntersectionsPositionArgMax': ('maxIntersectionsPosition', 'ArgMax'), 'deltaSumArgMax': ('deltaSum', 'ArgMax'), 'quantileTimingArgMax': ('quantileTiming', 'ArgMax'), 'sumCountArgMax': ('sumCount', 'ArgMax'), 'quantilesArgMax': ('quantiles', 'ArgMax'), 'quantileGKArgMax': ('quantileGK', 'ArgMax'), 'sumKahanArgMax': ('sumKahan', 'ArgMax'), 'uniqCombined64ArgMax': ('uniqCombined64', 'ArgMax'), 'rankCorrArgMax': ('rankCorr', 'ArgMax'), 'groupArrayInsertAtArgMax': ('groupArrayInsertAt', 'ArgMax'), 'cramersVArgMax': ('cramersV', 'ArgMax'), 'windowFunnelArgMax': ('windowFunnel', 'ArgMax'), 'kolmogorovSmirnovTestArgMax': ('kolmogorovSmirnovTest', 'ArgMax'), 'countArgMax': ('count', 'ArgMax'), 'argMaxArgMax': ('argMax', 'ArgMax'), 'groupBitmapAnd': ('groupBitmapAnd', ''), 'quantileTDigest': ('quantileTDigest', ''), 'anyHeavy': ('anyHeavy', ''), 'kurtSamp': ('kurtSamp', ''), 'largestTriangleThreeBuckets': ('largestTriangleThreeBuckets', ''), 'groupBitOr': ('groupBitOr', ''), 'groupBitmapXor': ('groupBitmapXor', ''), 'quantilesTDigestWeighted': ('quantilesTDigestWeighted', ''), 'quantilesExactWeighted': ('quantilesExactWeighted', ''), 'quantilesBFloat16Weighted': ('quantilesBFloat16Weighted', ''), 'welchTTest': ('welchTTest', ''), 'uniqTheta': ('uniqTheta', ''), 'stochasticLogisticRegression': ('stochasticLogisticRegression', ''), 'quantileExactWeighted': ('quantileExactWeighted', ''), 'exponentialTimeDecayedAvg': ('exponentialTimeDecayedAvg', ''), 'skewSamp': ('skewSamp', ''), 'sumWithOverflow': ('sumWithOverflow', ''), 'last_value': ('last_value', ''), 'groupArrayLast': ('groupArrayLast', ''), 'groupUniqArray': ('groupUniqArray', ''), 'uniq': ('uniq', ''), 'contingency': ('contingency', ''), 'quantilesGK': ('quantilesGK', ''), 'meanZTest': ('meanZTest', ''), 'sparkBar': ('sparkBar', ''), 'avg': ('avg', ''), 'quantileExact': ('quantileExact', ''), 'quantileInterpolatedWeighted': ('quantileInterpolatedWeighted', ''), 'quantilesBFloat16': ('quantilesBFloat16', ''), 'quantileBFloat16': ('quantileBFloat16', ''), 'quantileTDigestWeighted': ('quantileTDigestWeighted', ''), 'theilsU': ('theilsU', ''), 'deltaSumTimestamp': ('deltaSumTimestamp', ''), 'groupBitXor': ('groupBitXor', ''), 'quantileExactLow': ('quantileExactLow', ''), 'quantileBFloat16Weighted': ('quantileBFloat16Weighted', ''), 'min': ('min', ''), 'sequenceMatch': ('sequenceMatch', ''), 'kurtPop': ('kurtPop', ''), 'quantileTimingWeighted': ('quantileTimingWeighted', ''), 'topKWeighted': ('topKWeighted', ''), 'max': ('max', ''), 'groupArrayMovingSum': ('groupArrayMovingSum', ''), 'stochasticLinearRegression': ('stochasticLinearRegression', ''), 'median': ('median', ''), 'studentTTest': ('studentTTest', ''), 'simpleLinearRegression': ('simpleLinearRegression', ''), 'varSamp': ('varSamp', ''), 'groupBitAnd': ('groupBitAnd', ''), 'topK': ('topK', ''), 'argMin': ('argMin', ''), 'mannWhitneyUTest': ('mannWhitneyUTest', ''), 'skewPop': ('skewPop', ''), 'intervalLengthSum': ('intervalLengthSum', ''), 'quantilesExactHigh': ('quantilesExactHigh', ''), 'corr': ('corr', ''), 'groupBitmapOr': ('groupBitmapOr', ''), 'uniqHLL12': ('uniqHLL12', ''), 'sum': ('sum', ''), 'quantilesInterpolatedWeighted': ('quantilesInterpolatedWeighted', ''), 'anyLast': ('anyLast', ''), 'sequenceNextNode': ('sequenceNextNode', ''), 'groupArraySample': ('groupArraySample', ''), 'quantileExactHigh': ('quantileExactHigh', ''), 'groupBitmap': ('groupBitmap', ''), 'quantilesExact': ('quantilesExact', ''), 'exponentialMovingAverage': ('exponentialMovingAverage', ''), 'quantilesTDigest': ('quantilesTDigest', ''), 'boundingRatio': ('boundingRatio', ''), 'categoricalInformationValue': ('categoricalInformationValue', ''), 'varPop': ('varPop', ''), 'uniqCombined': ('uniqCombined', ''), 'cramersVBiasCorrected': ('cramersVBiasCorrected', ''), 'quantileDeterministic': ('quantileDeterministic', ''), 'groupArrayMovingAvg': ('groupArrayMovingAvg', ''), 'quantile': ('quantile', ''), 'quantilesTimingWeighted': ('quantilesTimingWeighted', ''), 'entropy': ('entropy', ''), 'maxIntersections': ('maxIntersections', ''), 'covarPop': ('covarPop', ''), 'first_value': ('first_value', ''), 'quantilesDeterministic': ('quantilesDeterministic', ''), 'retention': ('retention', ''), 'groupArray': ('groupArray', ''), 'stddevPop': ('stddevPop', ''), 'uniqUpTo': ('uniqUpTo', ''), 'histogram': ('histogram', ''), 'avgWeighted': ('avgWeighted', ''), 'uniqExact': ('uniqExact', ''), 'covarSamp': ('covarSamp', ''), 'sequenceCount': ('sequenceCount', ''), 'any': ('any', ''), 'quantilesExactLow': ('quantilesExactLow', ''), 'stddevSamp': ('stddevSamp', ''), 'quantilesTiming': ('quantilesTiming', ''), 'maxIntersectionsPosition': ('maxIntersectionsPosition', ''), 'deltaSum': ('deltaSum', ''), 'quantileTiming': ('quantileTiming', ''), 'sumCount': ('sumCount', ''), 'quantiles': ('quantiles', ''), 'quantileGK': ('quantileGK', ''), 'sumKahan': ('sumKahan', ''), 'uniqCombined64': ('uniqCombined64', ''), 'rankCorr': ('rankCorr', ''), 'groupArrayInsertAt': ('groupArrayInsertAt', ''), 'cramersV': ('cramersV', ''), 'windowFunnel': ('windowFunnel', ''), 'kolmogorovSmirnovTest': ('kolmogorovSmirnovTest', ''), 'count': ('count', ''), 'argMax': ('argMax', '')}
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.ARRAY: 'ARRAY'>, <TokenType.ASOF: 'ASOF'>, <TokenType.CROSS: 'CROSS'>, <TokenType.INNER: 'INNER'>, <TokenType.SEMI: 'SEMI'>, <TokenType.ANTI: 'ANTI'>, <TokenType.OUTER: 'OUTER'>, <TokenType.ANY: 'ANY'>}
TABLE_ALIAS_TOKENS =
{<TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, <TokenType.COLLATE: 'COLLATE'>, <TokenType.SIMPLEAGGREGATEFUNCTION: 'SIMPLEAGGREGATEFUNCTION'>, <TokenType.KILL: 'KILL'>, <TokenType.EXISTS: 'EXISTS'>, <TokenType.SEQUENCE: 'SEQUENCE'>, <TokenType.CURRENT_DATETIME: 'CURRENT_DATETIME'>, <TokenType.TDIGEST: 'TDIGEST'>, <TokenType.IDENTIFIER: 'IDENTIFIER'>, <TokenType.BINARY: 'BINARY'>, <TokenType.IPADDRESS: 'IPADDRESS'>, <TokenType.IPPREFIX: 'IPPREFIX'>, <TokenType.RECURSIVE: 'RECURSIVE'>, <TokenType.IS: 'IS'>, <TokenType.FOREIGN_KEY: 'FOREIGN_KEY'>, <TokenType.LONGBLOB: 'LONGBLOB'>, <TokenType.JSONB: 'JSONB'>, <TokenType.SMALLSERIAL: 'SMALLSERIAL'>, <TokenType.DATERANGE: 'DATERANGE'>, <TokenType.INT: 'INT'>, <TokenType.TINYBLOB: 'TINYBLOB'>, <TokenType.UPDATE: 'UPDATE'>, <TokenType.CHAR: 'CHAR'>, <TokenType.TIMESTAMP_S: 'TIMESTAMP_S'>, <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, <TokenType.TSRANGE: 'TSRANGE'>, <TokenType.SCHEMA: 'SCHEMA'>, <TokenType.DESC: 'DESC'>, <TokenType.MODEL: 'MODEL'>, <TokenType.TRUNCATE: 'TRUNCATE'>, <TokenType.STRUCT: 'STRUCT'>, <TokenType.COPY: 'COPY'>, <TokenType.OVERLAPS: 'OVERLAPS'>, <TokenType.TABLE: 'TABLE'>, <TokenType.ENUM8: 'ENUM8'>, <TokenType.ISNULL: 'ISNULL'>, <TokenType.NEXT: 'NEXT'>, <TokenType.DESCRIBE: 'DESCRIBE'>, <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, <TokenType.UDECIMAL: 'UDECIMAL'>, <TokenType.VARIANT: 'VARIANT'>, <TokenType.REPLACE: 'REPLACE'>, <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, <TokenType.INT256: 'INT256'>, <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, <TokenType.UNKNOWN: 'UNKNOWN'>, <TokenType.PRAGMA: 'PRAGMA'>, <TokenType.DICTIONARY: 'DICTIONARY'>, <TokenType.DELETE: 'DELETE'>, <TokenType.SHOW: 'SHOW'>, <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, <TokenType.DATE: 'DATE'>, <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, <TokenType.IPV6: 'IPV6'>, <TokenType.FUNCTION: 'FUNCTION'>, <TokenType.TIME: 'TIME'>, <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, <TokenType.SMALLINT: 'SMALLINT'>, <TokenType.TIMESTAMP_MS: 'TIMESTAMP_MS'>, <TokenType.STORAGE_INTEGRATION: 'STORAGE_INTEGRATION'>, <TokenType.FILTER: 'FILTER'>, <TokenType.TEMPORARY: 'TEMPORARY'>, <TokenType.CASE: 'CASE'>, <TokenType.INET: 'INET'>, <TokenType.INTERVAL: 'INTERVAL'>, <TokenType.COLUMN: 'COLUMN'>, <TokenType.UINT: 'UINT'>, <TokenType.IMAGE: 'IMAGE'>, <TokenType.USMALLINT: 'USMALLINT'>, <TokenType.NAME: 'NAME'>, <TokenType.DATE32: 'DATE32'>, <TokenType.UNIQUE: 'UNIQUE'>, <TokenType.TINYTEXT: 'TINYTEXT'>, <TokenType.ENUM: 'ENUM'>, <TokenType.ASC: 'ASC'>, <TokenType.ALL: 'ALL'>, <TokenType.BOOLEAN: 'BOOLEAN'>, <TokenType.NULL: 'NULL'>, <TokenType.JSON: 'JSON'>, <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, <TokenType.INT8RANGE: 'INT8RANGE'>, <TokenType.REFERENCES: 'REFERENCES'>, <TokenType.TIMESTAMP: 'TIMESTAMP'>, <TokenType.VARBINARY: 'VARBINARY'>, <TokenType.ROWS: 'ROWS'>, <TokenType.PROCEDURE: 'PROCEDURE'>, <TokenType.GEOMETRY: 'GEOMETRY'>, <TokenType.OBJECT: 'OBJECT'>, <TokenType.FALSE: 'FALSE'>, <TokenType.KEEP: 'KEEP'>, <TokenType.INT128: 'INT128'>, <TokenType.UINT256: 'UINT256'>, <TokenType.SUPER: 'SUPER'>, <TokenType.UINT128: 'UINT128'>, <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, <TokenType.NULLABLE: 'NULLABLE'>, <TokenType.MONEY: 'MONEY'>, <TokenType.SET: 'SET'>, <TokenType.COMMIT: 'COMMIT'>, <TokenType.NESTED: 'NESTED'>, <TokenType.CACHE: 'CACHE'>, <TokenType.INT4RANGE: 'INT4RANGE'>, <TokenType.MAP: 'MAP'>, <TokenType.XML: 'XML'>, <TokenType.VIEW: 'VIEW'>, <TokenType.UNIQUEIDENTIFIER: 'UNIQUEIDENTIFIER'>, <TokenType.OVERWRITE: 'OVERWRITE'>, <TokenType.BIGSERIAL: 'BIGSERIAL'>, <TokenType.COMMAND: 'COMMAND'>, <TokenType.FIXEDSTRING: 'FIXEDSTRING'>, <TokenType.NCHAR: 'NCHAR'>, <TokenType.DATETIME: 'DATETIME'>, <TokenType.CONSTRAINT: 'CONSTRAINT'>, <TokenType.UUID: 'UUID'>, <TokenType.DATABASE: 'DATABASE'>, <TokenType.TIMESTAMP_NS: 'TIMESTAMP_NS'>, <TokenType.LONGTEXT: 'LONGTEXT'>, <TokenType.CURRENT_USER: 'CURRENT_USER'>, <TokenType.USE: 'USE'>, <TokenType.UNPIVOT: 'UNPIVOT'>, <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, <TokenType.UMEDIUMINT: 'UMEDIUMINT'>, <TokenType.MERGE: 'MERGE'>, <TokenType.OPERATOR: 'OPERATOR'>, <TokenType.NVARCHAR: 'NVARCHAR'>, <TokenType.USERDEFINED: 'USERDEFINED'>, <TokenType.VARCHAR: 'VARCHAR'>, <TokenType.MEDIUMINT: 'MEDIUMINT'>, <TokenType.SOME: 'SOME'>, <TokenType.END: 'END'>, <TokenType.SMALLMONEY: 'SMALLMONEY'>, <TokenType.ESCAPE: 'ESCAPE'>, <TokenType.DECIMAL: 'DECIMAL'>, <TokenType.BPCHAR: 'BPCHAR'>, <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, <TokenType.BIT: 'BIT'>, <TokenType.PSEUDO_TYPE: 'PSEUDO_TYPE'>, <TokenType.HLLSKETCH: 'HLLSKETCH'>, <TokenType.DEFAULT: 'DEFAULT'>, <TokenType.REFRESH: 'REFRESH'>, <TokenType.HSTORE: 'HSTORE'>, <TokenType.DATETIME64: 'DATETIME64'>, <TokenType.INDEX: 'INDEX'>, <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, <TokenType.DIV: 'DIV'>, <TokenType.PERCENT: 'PERCENT'>, <TokenType.TOP: 'TOP'>, <TokenType.TEXT: 'TEXT'>, <TokenType.ENUM16: 'ENUM16'>, <TokenType.IPV4: 'IPV4'>, <TokenType.BEGIN: 'BEGIN'>, <TokenType.EXECUTE: 'EXECUTE'>, <TokenType.ROW: 'ROW'>, <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, <TokenType.TRUE: 'TRUE'>, <TokenType.AGGREGATEFUNCTION: 'AGGREGATEFUNCTION'>, <TokenType.TIMETZ: 'TIMETZ'>, <TokenType.ROWVERSION: 'ROWVERSION'>, <TokenType.DOUBLE: 'DOUBLE'>, <TokenType.OBJECT_IDENTIFIER: 'OBJECT_IDENTIFIER'>, <TokenType.TSTZRANGE: 'TSTZRANGE'>, <TokenType.FLOAT: 'FLOAT'>, <TokenType.LOWCARDINALITY: 'LOWCARDINALITY'>, <TokenType.UTINYINT: 'UTINYINT'>, <TokenType.UBIGINT: 'UBIGINT'>, <TokenType.SERIAL: 'SERIAL'>, <TokenType.LOAD: 'LOAD'>, <TokenType.COMMENT: 'COMMENT'>, <TokenType.VOLATILE: 'VOLATILE'>, <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, <TokenType.ORDINALITY: 'ORDINALITY'>, <TokenType.YEAR: 'YEAR'>, <TokenType.PIVOT: 'PIVOT'>, <TokenType.BIGINT: 'BIGINT'>, <TokenType.VAR: 'VAR'>, <TokenType.RANGE: 'RANGE'>, <TokenType.NUMRANGE: 'NUMRANGE'>, <TokenType.PARTITION: 'PARTITION'>, <TokenType.FIRST: 'FIRST'>, <TokenType.TINYINT: 'TINYINT'>}
ALIAS_TOKENS =
{<TokenType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>, <TokenType.COLLATE: 'COLLATE'>, <TokenType.SIMPLEAGGREGATEFUNCTION: 'SIMPLEAGGREGATEFUNCTION'>, <TokenType.KILL: 'KILL'>, <TokenType.EXISTS: 'EXISTS'>, <TokenType.SEQUENCE: 'SEQUENCE'>, <TokenType.CURRENT_DATETIME: 'CURRENT_DATETIME'>, <TokenType.TDIGEST: 'TDIGEST'>, <TokenType.IDENTIFIER: 'IDENTIFIER'>, <TokenType.BINARY: 'BINARY'>, <TokenType.IPADDRESS: 'IPADDRESS'>, <TokenType.IPPREFIX: 'IPPREFIX'>, <TokenType.SEMI: 'SEMI'>, <TokenType.ANTI: 'ANTI'>, <TokenType.RECURSIVE: 'RECURSIVE'>, <TokenType.IS: 'IS'>, <TokenType.FOREIGN_KEY: 'FOREIGN_KEY'>, <TokenType.LONGBLOB: 'LONGBLOB'>, <TokenType.JSONB: 'JSONB'>, <TokenType.SMALLSERIAL: 'SMALLSERIAL'>, <TokenType.DATERANGE: 'DATERANGE'>, <TokenType.INT: 'INT'>, <TokenType.TINYBLOB: 'TINYBLOB'>, <TokenType.UPDATE: 'UPDATE'>, <TokenType.CHAR: 'CHAR'>, <TokenType.TIMESTAMP_S: 'TIMESTAMP_S'>, <TokenType.CURRENT_DATE: 'CURRENT_DATE'>, <TokenType.TSRANGE: 'TSRANGE'>, <TokenType.SCHEMA: 'SCHEMA'>, <TokenType.DESC: 'DESC'>, <TokenType.MODEL: 'MODEL'>, <TokenType.TRUNCATE: 'TRUNCATE'>, <TokenType.STRUCT: 'STRUCT'>, <TokenType.COPY: 'COPY'>, <TokenType.OVERLAPS: 'OVERLAPS'>, <TokenType.TABLE: 'TABLE'>, <TokenType.ENUM8: 'ENUM8'>, <TokenType.ISNULL: 'ISNULL'>, <TokenType.NEXT: 'NEXT'>, <TokenType.DESCRIBE: 'DESCRIBE'>, <TokenType.INT8MULTIRANGE: 'INT8MULTIRANGE'>, <TokenType.UDECIMAL: 'UDECIMAL'>, <TokenType.OFFSET: 'OFFSET'>, <TokenType.VARIANT: 'VARIANT'>, <TokenType.REPLACE: 'REPLACE'>, <TokenType.BIGDECIMAL: 'BIGDECIMAL'>, <TokenType.INT256: 'INT256'>, <TokenType.TSMULTIRANGE: 'TSMULTIRANGE'>, <TokenType.UNKNOWN: 'UNKNOWN'>, <TokenType.ASOF: 'ASOF'>, <TokenType.PRAGMA: 'PRAGMA'>, <TokenType.DICTIONARY: 'DICTIONARY'>, <TokenType.DELETE: 'DELETE'>, <TokenType.SHOW: 'SHOW'>, <TokenType.TIMESTAMPTZ: 'TIMESTAMPTZ'>, <TokenType.AUTO_INCREMENT: 'AUTO_INCREMENT'>, <TokenType.DATE: 'DATE'>, <TokenType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>, <TokenType.IPV6: 'IPV6'>, <TokenType.FULL: 'FULL'>, <TokenType.FUNCTION: 'FUNCTION'>, <TokenType.TIME: 'TIME'>, <TokenType.CURRENT_TIME: 'CURRENT_TIME'>, <TokenType.SMALLINT: 'SMALLINT'>, <TokenType.TIMESTAMP_MS: 'TIMESTAMP_MS'>, <TokenType.STORAGE_INTEGRATION: 'STORAGE_INTEGRATION'>, <TokenType.FILTER: 'FILTER'>, <TokenType.TEMPORARY: 'TEMPORARY'>, <TokenType.CASE: 'CASE'>, <TokenType.INET: 'INET'>, <TokenType.INTERVAL: 'INTERVAL'>, <TokenType.COLUMN: 'COLUMN'>, <TokenType.UINT: 'UINT'>, <TokenType.IMAGE: 'IMAGE'>, <TokenType.USMALLINT: 'USMALLINT'>, <TokenType.NAME: 'NAME'>, <TokenType.DATE32: 'DATE32'>, <TokenType.LEFT: 'LEFT'>, <TokenType.UNIQUE: 'UNIQUE'>, <TokenType.TINYTEXT: 'TINYTEXT'>, <TokenType.ENUM: 'ENUM'>, <TokenType.ASC: 'ASC'>, <TokenType.ALL: 'ALL'>, <TokenType.BOOLEAN: 'BOOLEAN'>, <TokenType.NULL: 'NULL'>, <TokenType.JSON: 'JSON'>, <TokenType.MEDIUMBLOB: 'MEDIUMBLOB'>, <TokenType.INT8RANGE: 'INT8RANGE'>, <TokenType.REFERENCES: 'REFERENCES'>, <TokenType.TIMESTAMP: 'TIMESTAMP'>, <TokenType.VARBINARY: 'VARBINARY'>, <TokenType.ARRAY: 'ARRAY'>, <TokenType.ROWS: 'ROWS'>, <TokenType.PROCEDURE: 'PROCEDURE'>, <TokenType.SETTINGS: 'SETTINGS'>, <TokenType.RIGHT: 'RIGHT'>, <TokenType.GEOMETRY: 'GEOMETRY'>, <TokenType.OBJECT: 'OBJECT'>, <TokenType.FALSE: 'FALSE'>, <TokenType.KEEP: 'KEEP'>, <TokenType.INT128: 'INT128'>, <TokenType.UINT256: 'UINT256'>, <TokenType.SUPER: 'SUPER'>, <TokenType.UINT128: 'UINT128'>, <TokenType.NUMMULTIRANGE: 'NUMMULTIRANGE'>, <TokenType.FINAL: 'FINAL'>, <TokenType.NULLABLE: 'NULLABLE'>, <TokenType.MONEY: 'MONEY'>, <TokenType.SET: 'SET'>, <TokenType.COMMIT: 'COMMIT'>, <TokenType.NESTED: 'NESTED'>, <TokenType.CACHE: 'CACHE'>, <TokenType.INT4RANGE: 'INT4RANGE'>, <TokenType.MAP: 'MAP'>, <TokenType.XML: 'XML'>, <TokenType.VIEW: 'VIEW'>, <TokenType.UNIQUEIDENTIFIER: 'UNIQUEIDENTIFIER'>, <TokenType.OVERWRITE: 'OVERWRITE'>, <TokenType.BIGSERIAL: 'BIGSERIAL'>, <TokenType.COMMAND: 'COMMAND'>, <TokenType.FIXEDSTRING: 'FIXEDSTRING'>, <TokenType.NCHAR: 'NCHAR'>, <TokenType.DATETIME: 'DATETIME'>, <TokenType.CONSTRAINT: 'CONSTRAINT'>, <TokenType.UUID: 'UUID'>, <TokenType.DATABASE: 'DATABASE'>, <TokenType.TIMESTAMP_NS: 'TIMESTAMP_NS'>, <TokenType.LONGTEXT: 'LONGTEXT'>, <TokenType.CURRENT_USER: 'CURRENT_USER'>, <TokenType.USE: 'USE'>, <TokenType.UNPIVOT: 'UNPIVOT'>, <TokenType.INT4MULTIRANGE: 'INT4MULTIRANGE'>, <TokenType.UMEDIUMINT: 'UMEDIUMINT'>, <TokenType.MERGE: 'MERGE'>, <TokenType.OPERATOR: 'OPERATOR'>, <TokenType.NVARCHAR: 'NVARCHAR'>, <TokenType.USERDEFINED: 'USERDEFINED'>, <TokenType.VARCHAR: 'VARCHAR'>, <TokenType.MEDIUMINT: 'MEDIUMINT'>, <TokenType.SOME: 'SOME'>, <TokenType.END: 'END'>, <TokenType.SMALLMONEY: 'SMALLMONEY'>, <TokenType.ESCAPE: 'ESCAPE'>, <TokenType.DECIMAL: 'DECIMAL'>, <TokenType.BPCHAR: 'BPCHAR'>, <TokenType.CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'>, <TokenType.BIT: 'BIT'>, <TokenType.PSEUDO_TYPE: 'PSEUDO_TYPE'>, <TokenType.HLLSKETCH: 'HLLSKETCH'>, <TokenType.NATURAL: 'NATURAL'>, <TokenType.DEFAULT: 'DEFAULT'>, <TokenType.REFRESH: 'REFRESH'>, <TokenType.HSTORE: 'HSTORE'>, <TokenType.DATETIME64: 'DATETIME64'>, <TokenType.INDEX: 'INDEX'>, <TokenType.TSTZMULTIRANGE: 'TSTZMULTIRANGE'>, <TokenType.DIV: 'DIV'>, <TokenType.PERCENT: 'PERCENT'>, <TokenType.TOP: 'TOP'>, <TokenType.TEXT: 'TEXT'>, <TokenType.ENUM16: 'ENUM16'>, <TokenType.IPV4: 'IPV4'>, <TokenType.BEGIN: 'BEGIN'>, <TokenType.WINDOW: 'WINDOW'>, <TokenType.EXECUTE: 'EXECUTE'>, <TokenType.ROW: 'ROW'>, <TokenType.MEDIUMTEXT: 'MEDIUMTEXT'>, <TokenType.TRUE: 'TRUE'>, <TokenType.AGGREGATEFUNCTION: 'AGGREGATEFUNCTION'>, <TokenType.TIMETZ: 'TIMETZ'>, <TokenType.ANY: 'ANY'>, <TokenType.ROWVERSION: 'ROWVERSION'>, <TokenType.DOUBLE: 'DOUBLE'>, <TokenType.OBJECT_IDENTIFIER: 'OBJECT_IDENTIFIER'>, <TokenType.TSTZRANGE: 'TSTZRANGE'>, <TokenType.FLOAT: 'FLOAT'>, <TokenType.LOWCARDINALITY: 'LOWCARDINALITY'>, <TokenType.UTINYINT: 'UTINYINT'>, <TokenType.UBIGINT: 'UBIGINT'>, <TokenType.SERIAL: 'SERIAL'>, <TokenType.LOAD: 'LOAD'>, <TokenType.COMMENT: 'COMMENT'>, <TokenType.VOLATILE: 'VOLATILE'>, <TokenType.GEOGRAPHY: 'GEOGRAPHY'>, <TokenType.DATEMULTIRANGE: 'DATEMULTIRANGE'>, <TokenType.ORDINALITY: 'ORDINALITY'>, <TokenType.YEAR: 'YEAR'>, <TokenType.PIVOT: 'PIVOT'>, <TokenType.BIGINT: 'BIGINT'>, <TokenType.VAR: 'VAR'>, <TokenType.RANGE: 'RANGE'>, <TokenType.NUMRANGE: 'NUMRANGE'>, <TokenType.PARTITION: 'PARTITION'>, <TokenType.FIRST: 'FIRST'>, <TokenType.TINYINT: 'TINYINT'>, <TokenType.APPLY: 'APPLY'>}
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 =
{'LIKE', 'EXCLUDE', 'UNIQUE', 'CHECK', 'PERIOD', 'INDEX', 'PRIMARY KEY', 'FOREIGN KEY'}
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
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
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'}
SUPPORTED_JSON_PATH_PARTS =
{<class 'sqlglot.expressions.JSONPathRoot'>, <class 'sqlglot.expressions.JSONPathKey'>, <class 'sqlglot.expressions.JSONPathSubscript'>}
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'>}
ON_CLUSTER_TARGETS =
{'FUNCTION', 'TABLE', 'DICTIONARY', 'DATABASE', 'INDEX', 'NAMED COLLECTION', 'VIEW'}
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)
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
combinedparameterizedagg_sql(self, expression: sqlglot.expressions.CombinedParameterizedAgg) -> 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)
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}"
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