sqlglot.parsers.postgres
1from __future__ import annotations 2 3import re 4import typing as t 5from decimal import Decimal 6from functools import partial 7 8from sqlglot import exp, parser 9from sqlglot.dialects.dialect import ( 10 DialectType, 11 binary_from_function, 12 build_formatted_time, 13 build_json_extract_path, 14 build_like, 15 build_timestamp_trunc, 16) 17from sqlglot.helper import is_int, seq_get 18from sqlglot.parser import IsPredicatePrecedence, binary_range_parser 19from sqlglot.tokens import TokenType 20 21if t.TYPE_CHECKING: 22 from sqlglot.dialects.dialect import Dialect 23 24 25SIMPLE_INTERVAL_RE = re.compile(r"\s*(?:[+-]?\s*[0-9]+(?:\.[0-9]*)?|\.[0-9]+)\s*[a-zA-Z]+\s*") 26ISO_INTERVAL_RE = re.compile(r"P(T?)(-?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+))([A-Z])") 27 28 29MAKE_INTERVAL_KWARGS = { 30 "years": "year", 31 "months": "month", 32 "weeks": "week", 33 "days": "day", 34 "hours": "hour", 35 "mins": "minute", 36 "secs": "second", 37} 38 39 40def _build_make_interval(args: list) -> exp.MakeInterval: 41 return exp.MakeInterval( 42 **{ 43 MAKE_INTERVAL_KWARGS.get(value.this.name.lower(), key) 44 if isinstance(value, exp.Kwarg) 45 else key: value 46 for key, value in zip(exp.MakeInterval.arg_types, args) 47 } 48 ) 49 50 51def _build_generate_series(args: list) -> exp.ExplodingGenerateSeries: 52 # Normalize simple interval strings for transpilation, preserving other step expressions. 53 step = seq_get(args, 2) 54 if step is not None and step.is_string and SIMPLE_INTERVAL_RE.fullmatch(step.this): 55 interval = exp.to_interval(step.this) 56 interval.set("fraction_in_string", "." in interval.this.name or None) 57 args[2] = interval 58 59 return exp.ExplodingGenerateSeries.from_arg_list(args) 60 61 62def _build_to_timestamp(args: list, dialect: Dialect) -> exp.UnixToTime | exp.StrToTime: 63 # TO_TIMESTAMP accepts either a single double argument or (text, text) 64 if len(args) == 1: 65 # https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-TABLE 66 return exp.UnixToTime.from_arg_list(args) 67 68 # https://www.postgresql.org/docs/current/functions-formatting.html 69 return build_formatted_time(exp.StrToTime)(args, dialect) 70 71 72def _build_regexp_replace(args: list, dialect: DialectType = None) -> exp.RegexpReplace: 73 # The signature of REGEXP_REPLACE is: 74 # regexp_replace(source, pattern, replacement [, start [, N ]] [, flags ]) 75 # 76 # Any one of `start`, `N` and `flags` can be column references, meaning that 77 # unless we can statically see that the last argument is a non-integer string 78 # (eg. not '0'), then it's not possible to construct the correct AST 79 regexp_replace = None 80 if len(args) > 3: 81 last = args[-1] 82 if not is_int(last.name): 83 if not last.type or last.is_type(exp.DType.UNKNOWN, exp.DType.NULL): 84 from sqlglot.optimizer.annotate_types import annotate_types 85 86 last = annotate_types(last, dialect=dialect) 87 88 if last.is_type(*exp.DataType.TEXT_TYPES): 89 regexp_replace = exp.RegexpReplace.from_arg_list(args[:-1]) 90 regexp_replace.set("modifiers", last) 91 92 regexp_replace = regexp_replace or exp.RegexpReplace.from_arg_list(args) 93 regexp_replace.set("single_replace", True) 94 return regexp_replace 95 96 97def _build_levenshtein_less_equal(args: list) -> exp.Levenshtein: 98 # Postgres has two signatures for levenshtein_less_equal function, but in both cases 99 # max_dist is the last argument 100 # levenshtein_less_equal(source, target, ins_cost, del_cost, sub_cost, max_d) 101 # levenshtein_less_equal(source, target, max_d) 102 max_dist = args.pop() 103 104 return exp.Levenshtein( 105 this=seq_get(args, 0), 106 expression=seq_get(args, 1), 107 ins_cost=seq_get(args, 2), 108 del_cost=seq_get(args, 3), 109 sub_cost=seq_get(args, 4), 110 max_dist=max_dist, 111 ) 112 113 114class PostgresParser(parser.Parser): 115 SUPPORTS_TABLE_QUERY = True 116 117 IS_PREDICATE_PRECEDENCE = IsPredicatePrecedence.LOW 118 119 ALTER_DROP_REQUIRES_COLUMN = False 120 ALTER_TABLE_MIXED_ACTIONS = True 121 ALTER_COLUMN_TYPE_REQUIRES_KEYWORD = True 122 SUPPORTS_OMITTED_INTERVAL_SPAN_UNIT = True 123 124 # The one-byte "char" type is distinct from CHAR, and it can only be referenced by 125 # quoting it: https://www.postgresql.org/docs/current/datatype-character.html 126 QUOTED_TYPES_TO_PRESERVE: t.ClassVar = {"char"} 127 128 PROPERTY_PARSERS = { 129 **{k: v for k, v in parser.Parser.PROPERTY_PARSERS.items() if k != "INPUT"}, 130 "SET": lambda self: self.expression(exp.SetConfigProperty(this=self._parse_set())), 131 "TABLESPACE": lambda self: self.expression( 132 exp.TableSpaceProperty(this=self._parse_id_var()) 133 ), 134 } 135 136 PLACEHOLDER_PARSERS = { 137 **parser.Parser.PLACEHOLDER_PARSERS, 138 TokenType.PLACEHOLDER: lambda self: self.expression(exp.Placeholder(jdbc=True)), 139 TokenType.MOD: lambda self: self._parse_query_parameter(), 140 } 141 142 FUNCTIONS = { 143 **{k: v for k, v in parser.Parser.FUNCTIONS.items() if k != "STRUCT"}, 144 "ARRAY_AGG": lambda args: exp.ArrayAgg(this=seq_get(args, 0), null_on_empty=True), 145 "ARRAY_PREPEND": lambda args: exp.ArrayPrepend( 146 this=seq_get(args, 1), expression=seq_get(args, 0) 147 ), 148 "BIT_AND": exp.BitwiseAndAgg.from_arg_list, 149 "BIT_OR": exp.BitwiseOrAgg.from_arg_list, 150 "BIT_XOR": exp.BitwiseXorAgg.from_arg_list, 151 "BTRIM": exp.Trim.from_arg_list, 152 "CARDINALITY": exp.ArraySize.from_arg_list, 153 "VERSION": exp.CurrentVersion.from_arg_list, 154 "DATE_TRUNC": build_timestamp_trunc, 155 "DIV": lambda args: exp.cast(binary_from_function(exp.IntDiv)(args), exp.DType.DECIMAL), 156 "EVERY": exp.LogicalAnd.from_arg_list, 157 "GENERATE_SERIES": _build_generate_series, 158 "GET_BIT": lambda args: exp.Getbit( 159 this=seq_get(args, 0), expression=seq_get(args, 1), zero_is_msb=True 160 ), 161 "JSON_EXTRACT_PATH": build_json_extract_path(exp.JSONExtract), 162 "JSON_EXTRACT_PATH_TEXT": build_json_extract_path(exp.JSONExtractScalar), 163 "LENGTH": lambda args: exp.Length(this=seq_get(args, 0), encoding=seq_get(args, 1)), 164 "LIKE": build_like(exp.Like), 165 "MAKE_DATE": exp.DateFromParts.from_arg_list, 166 "MAKE_INTERVAL": _build_make_interval, 167 "MAKE_TIME": exp.TimeFromParts.from_arg_list, 168 "MAKE_TIMESTAMP": exp.TimestampFromParts.from_arg_list, 169 "NOW": exp.CurrentTimestamp.from_arg_list, 170 "REGEXP_REPLACE": _build_regexp_replace, 171 "TO_CHAR": build_formatted_time(exp.TimeToStr), 172 "TO_DATE": build_formatted_time(exp.StrToDate), 173 "TO_TIMESTAMP": _build_to_timestamp, 174 "UNNEST": exp.Explode.from_arg_list, 175 "SHA256": lambda args: exp.SHA2Digest( 176 this=seq_get(args, 0), length=exp.Literal.number(256) 177 ), 178 "SHA384": lambda args: exp.SHA2Digest( 179 this=seq_get(args, 0), length=exp.Literal.number(384) 180 ), 181 "SHA512": lambda args: exp.SHA2Digest( 182 this=seq_get(args, 0), length=exp.Literal.number(512) 183 ), 184 "LEVENSHTEIN_LESS_EQUAL": _build_levenshtein_less_equal, 185 "JSON_OBJECT_AGG": lambda args: exp.JSONObjectAgg(expressions=args), 186 "JSONB_OBJECT_AGG": exp.JSONBObjectAgg.from_arg_list, 187 "WIDTH_BUCKET": lambda args: ( 188 exp.WidthBucket(this=seq_get(args, 0), threshold=seq_get(args, 1)) 189 if len(args) == 2 190 else exp.WidthBucket.from_arg_list(args) 191 ), 192 "UUID": lambda args: exp.cast(args[0], exp.DType.UUID) if args else exp.Uuid(), 193 } 194 195 NO_PAREN_FUNCTION_PARSERS = { 196 **parser.Parser.NO_PAREN_FUNCTION_PARSERS, 197 "VARIADIC": lambda self: self.expression(exp.Variadic(this=self._parse_bitwise())), 198 } 199 200 NO_PAREN_FUNCTIONS = { 201 **parser.Parser.NO_PAREN_FUNCTIONS, 202 TokenType.LOCALTIME: exp.Localtime, 203 TokenType.LOCALTIMESTAMP: exp.Localtimestamp, 204 TokenType.CURRENT_CATALOG: exp.CurrentCatalog, 205 TokenType.SESSION_USER: exp.SessionUser, 206 TokenType.CURRENT_SCHEMA: exp.CurrentSchema, 207 } 208 209 FUNCTION_PARSERS = { 210 **parser.Parser.FUNCTION_PARSERS, 211 "DATE_PART": lambda self: self._parse_date_part(self._parse_assignment()), 212 "JSON_AGG": lambda self: self.expression( 213 exp.JSONArrayAgg(this=self._parse_lambda(), order=self._parse_order()) 214 ), 215 "JSONB_EXISTS": lambda self: self._parse_jsonb_exists(), 216 "JSON_VALUE": lambda self: self._parse_json_value(json_path=False), 217 "STRING_AGG": lambda self: self._parse_string_agg().set_kwargs( 218 {"null_separator_is_empty": True} 219 ), 220 } 221 222 BITWISE = { 223 **parser.Parser.BITWISE, 224 TokenType.HASH: exp.BitwiseXor, 225 # Extensions define <=> for different operand types (e.g. pgvector and RUM). 226 TokenType.LT_EQ_GT: partial(exp.Operator, operator="<=>"), 227 } 228 229 EXPONENT = { 230 TokenType.CARET: exp.Pow, 231 } 232 233 RANGE_PARSERS = { 234 **parser.Parser.RANGE_PARSERS, 235 TokenType.DAMP: binary_range_parser(exp.ArrayOverlaps), 236 TokenType.DAT: lambda self, this: self.expression( 237 exp.MatchAgainst(this=self._parse_bitwise(), expressions=[this]) 238 ), 239 } 240 241 STATEMENT_PARSERS = { 242 **parser.Parser.STATEMENT_PARSERS, 243 TokenType.END: lambda self: self._parse_commit_or_rollback(), 244 } 245 246 UNARY_PARSERS = { 247 **parser.Parser.UNARY_PARSERS, 248 TokenType.PLUS: lambda self: self.expression(exp.Pos(this=self._parse_unary())), 249 TokenType.AT_SIGN: lambda self: self.expression(exp.Abs(this=self._parse_term())), 250 # The `~` token is remapped from TILDE to RLIKE in Postgres due to the binary REGEXP LIKE operator 251 TokenType.RLIKE: lambda self: self.expression(exp.BitwiseNot(this=self._parse_unary())), 252 } 253 254 JSON_ARROWS_REQUIRE_JSON_TYPE = True 255 256 COLUMN_OPERATORS = { 257 k: v 258 for k, v in parser.Parser.COLUMN_OPERATORS.items() 259 if k 260 not in ( 261 TokenType.ARROW, 262 TokenType.DARROW, 263 TokenType.HASH_ARROW, 264 TokenType.DHASH_ARROW, 265 TokenType.PLACEHOLDER, 266 ) 267 } 268 269 JSON_OPERATORS = { 270 TokenType.ARROW: lambda self, this, path: self.validate_expression( 271 build_json_extract_path( 272 exp.JSONExtract, arrow_req_json_type=self.JSON_ARROWS_REQUIRE_JSON_TYPE 273 )([this, path]) 274 ), 275 TokenType.DARROW: lambda self, this, path: self.validate_expression( 276 build_json_extract_path( 277 exp.JSONExtractScalar, arrow_req_json_type=self.JSON_ARROWS_REQUIRE_JSON_TYPE 278 )([this, path]) 279 ), 280 TokenType.HASH_ARROW: parser.build_jsonb_extract, 281 TokenType.DHASH_ARROW: parser.build_jsonb_extract_scalar, 282 TokenType.PLACEHOLDER: parser.build_jsonb_contains_top_key, 283 } 284 285 ARG_MODE_TOKENS: t.ClassVar = {TokenType.IN, TokenType.OUT, TokenType.INOUT, TokenType.VARIADIC} 286 287 def _parse_parameter_mode(self) -> TokenType | None: 288 """ 289 Parse PostgreSQL function parameter mode (IN, OUT, INOUT, VARIADIC). 290 291 Disambiguates between mode keywords and identifiers with the same name: 292 - MODE TYPE -> keyword is identifier (e.g., "out INT") 293 - MODE NAME TYPE -> keyword is mode (e.g., "OUT x INT") 294 295 Returns: 296 Mode token type if current token is a mode keyword, None otherwise. 297 """ 298 if not self._match_set(self.ARG_MODE_TOKENS, advance=False) or not self._next: 299 return None 300 301 mode_token = self._curr 302 303 # Check Pattern 1: MODE TYPE 304 # Try parsing next token as a built-in type (not UDT) 305 # If successful, the keyword is an identifier, not a mode 306 is_followed_by_builtin_type = self._try_parse( 307 lambda: ( 308 self._advance() # type: ignore 309 or self._parse_types(check_func=False, allow_identifiers=False) 310 ), 311 retreat=True, 312 ) 313 if is_followed_by_builtin_type: 314 return None # Pattern: "out INT" -> out is parameter name 315 316 # Check Pattern 2: MODE NAME TYPE 317 # If next token is an identifier, check if there's a type after it 318 # The type can be built-in or user-defined (allow_identifiers=True) 319 if self._next.token_type not in self.ID_VAR_TOKENS: 320 return None 321 322 is_followed_by_any_type = self._try_parse( 323 lambda: ( 324 self._advance(2) # type: ignore 325 or self._parse_types(check_func=False, allow_identifiers=True) 326 ), 327 retreat=True, 328 ) 329 330 if is_followed_by_any_type: 331 return mode_token.token_type # Pattern: "OUT x INT" -> OUT is mode 332 333 return None 334 335 def _create_mode_constraint(self, param_mode: TokenType) -> exp.InOutColumnConstraint: 336 """ 337 Create parameter mode constraint for function parameters. 338 339 Args: 340 param_mode: The parameter mode token (IN, OUT, INOUT, or VARIADIC). 341 342 Returns: 343 InOutColumnConstraint expression representing the parameter mode. 344 """ 345 return self.expression( 346 exp.InOutColumnConstraint( 347 input_=(param_mode in {TokenType.IN, TokenType.INOUT}), 348 output=(param_mode in {TokenType.OUT, TokenType.INOUT}), 349 variadic=(param_mode == TokenType.VARIADIC), 350 ) 351 ) 352 353 def _parse_function_parameter(self) -> exp.Expr | None: 354 param_mode = self._parse_parameter_mode() 355 356 if param_mode: 357 self._advance() 358 359 # Parse parameter name and type 360 param_name = self._parse_id_var() 361 column_def = self._parse_column_def(this=param_name, computed_column=False) 362 363 # Attach mode as constraint 364 if param_mode and column_def: 365 constraint = self._create_mode_constraint(param_mode) 366 column_def.set("constraints", [constraint] + column_def.args.get("constraints", [])) 367 368 return column_def 369 370 def _parse_query_parameter(self) -> exp.Expr | None: 371 this = ( 372 self._parse_wrapped(self._parse_id_var) 373 if self._match(TokenType.L_PAREN, advance=False) 374 else None 375 ) 376 self._match_text_seq("S") 377 return self.expression(exp.Placeholder(this=this)) 378 379 def _parse_interval_span( 380 self, this: exp.Expr, parse_function_unit: bool = True 381 ) -> exp.Interval: 382 if ( 383 this.is_string 384 and this.name.startswith("P") 385 and not self._match_texts( 386 {"YEAR", "MONTH", "DAY", "HOUR", "MINUTE", "SECOND"}, advance=False 387 ) 388 ): 389 match = ISO_INTERVAL_RE.fullmatch(this.name) 390 if match: 391 time, value, unit = match.groups() 392 if unit in ("HMS" if time else "YMWD"): 393 value = f"{Decimal(value):f}" 394 return self.expression( 395 exp.Interval( 396 this=exp.Literal.string(value), 397 unit=exp.var("MONTH" if unit == "M" and not time else unit), 398 fraction_in_string="." in value or None, 399 ) 400 ) 401 402 return super()._parse_interval_span(this, parse_function_unit) 403 404 def _parse_date_part(self, part: exp.Expr | None) -> exp.Extract: 405 self._match(TokenType.COMMA) 406 if part and part.is_string and exp.SAFE_IDENTIFIER_RE.fullmatch(part.name): 407 part = exp.var(part.name.upper()) 408 409 extract = self._build_extract(part, self._parse_assignment()) 410 extract.set("date_part", True) 411 return extract 412 413 def _build_extract(self, part: exp.Expr | None, value: exp.Expr | None) -> exp.Extract: 414 extract = super()._build_extract(part, value) 415 if isinstance(part, (exp.Var, exp.Literal)) and part.name.upper() in ("DOW", "DOY"): 416 extract.set("uses_session_timezone", True) 417 if part.name.upper() == "DOW": 418 extract.set("zero_based_dow", True) 419 return extract 420 421 def _parse_convert(self, strict: bool, safe: bool | None = None) -> exp.Expr | None: 422 args = self._parse_csv(self._parse_assignment) 423 return self.validate_expression( 424 exp.ConvertToCharset( 425 this=seq_get(args, 0), source=seq_get(args, 1), dest=seq_get(args, 2) 426 ), 427 args, 428 ) 429 430 def _parse_unique(self) -> exp.UniqueColumnConstraint: 431 return self.expression( 432 exp.UniqueColumnConstraint( 433 nulls=self._match_text_seq("NULLS", "NOT", "DISTINCT"), 434 this=self._parse_schema(), 435 include=self._parse_index_params(), 436 options=self._parse_key_constraint_options(), 437 ) 438 ) 439 440 def _parse_primary_key( 441 self, 442 wrapped_optional: bool = False, 443 in_props: bool = False, 444 named_primary_key: bool = False, 445 ) -> exp.PrimaryKeyColumnConstraint | exp.PrimaryKey: 446 this = super()._parse_primary_key(wrapped_optional, in_props, named_primary_key) 447 if isinstance(this, exp.PrimaryKeyColumnConstraint): 448 this.set("include", self._parse_index_params()) 449 this.set("options", this.args["options"] + self._parse_key_constraint_options()) 450 return this 451 452 def _parse_jsonb_exists(self) -> exp.JSONBExists: 453 return self.expression( 454 exp.JSONBExists( 455 this=self._parse_bitwise(), 456 path=self._match(TokenType.COMMA) 457 and self.dialect.to_json_path(self._parse_bitwise()), 458 ) 459 ) 460 461 def _parse_generated_as_identity( 462 self, 463 ) -> ( 464 exp.GeneratedAsIdentityColumnConstraint 465 | exp.ComputedColumnConstraint 466 | exp.GeneratedAsRowColumnConstraint 467 ): 468 this = super()._parse_generated_as_identity() 469 470 if self._match_text_seq("STORED"): 471 this = self.expression(exp.ComputedColumnConstraint(this=this.expression)) 472 473 return this 474 475 def _parse_user_defined_type(self, identifier: exp.Identifier) -> exp.Expr | None: 476 udt_type: exp.Identifier | exp.Dot = identifier 477 478 while self._match(TokenType.DOT): 479 part = self._parse_id_var() 480 if part: 481 udt_type = exp.Dot(this=udt_type, expression=part) 482 483 return exp.DataType.build(udt_type, udt=True)
SIMPLE_INTERVAL_RE =
re.compile('\\s*(?:[+-]?\\s*[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)\\s*[a-zA-Z]+\\s*')
ISO_INTERVAL_RE =
re.compile('P(T?)(-?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+))([A-Z])')
MAKE_INTERVAL_KWARGS =
{'years': 'year', 'months': 'month', 'weeks': 'week', 'days': 'day', 'hours': 'hour', 'mins': 'minute', 'secs': 'second'}
115class PostgresParser(parser.Parser): 116 SUPPORTS_TABLE_QUERY = True 117 118 IS_PREDICATE_PRECEDENCE = IsPredicatePrecedence.LOW 119 120 ALTER_DROP_REQUIRES_COLUMN = False 121 ALTER_TABLE_MIXED_ACTIONS = True 122 ALTER_COLUMN_TYPE_REQUIRES_KEYWORD = True 123 SUPPORTS_OMITTED_INTERVAL_SPAN_UNIT = True 124 125 # The one-byte "char" type is distinct from CHAR, and it can only be referenced by 126 # quoting it: https://www.postgresql.org/docs/current/datatype-character.html 127 QUOTED_TYPES_TO_PRESERVE: t.ClassVar = {"char"} 128 129 PROPERTY_PARSERS = { 130 **{k: v for k, v in parser.Parser.PROPERTY_PARSERS.items() if k != "INPUT"}, 131 "SET": lambda self: self.expression(exp.SetConfigProperty(this=self._parse_set())), 132 "TABLESPACE": lambda self: self.expression( 133 exp.TableSpaceProperty(this=self._parse_id_var()) 134 ), 135 } 136 137 PLACEHOLDER_PARSERS = { 138 **parser.Parser.PLACEHOLDER_PARSERS, 139 TokenType.PLACEHOLDER: lambda self: self.expression(exp.Placeholder(jdbc=True)), 140 TokenType.MOD: lambda self: self._parse_query_parameter(), 141 } 142 143 FUNCTIONS = { 144 **{k: v for k, v in parser.Parser.FUNCTIONS.items() if k != "STRUCT"}, 145 "ARRAY_AGG": lambda args: exp.ArrayAgg(this=seq_get(args, 0), null_on_empty=True), 146 "ARRAY_PREPEND": lambda args: exp.ArrayPrepend( 147 this=seq_get(args, 1), expression=seq_get(args, 0) 148 ), 149 "BIT_AND": exp.BitwiseAndAgg.from_arg_list, 150 "BIT_OR": exp.BitwiseOrAgg.from_arg_list, 151 "BIT_XOR": exp.BitwiseXorAgg.from_arg_list, 152 "BTRIM": exp.Trim.from_arg_list, 153 "CARDINALITY": exp.ArraySize.from_arg_list, 154 "VERSION": exp.CurrentVersion.from_arg_list, 155 "DATE_TRUNC": build_timestamp_trunc, 156 "DIV": lambda args: exp.cast(binary_from_function(exp.IntDiv)(args), exp.DType.DECIMAL), 157 "EVERY": exp.LogicalAnd.from_arg_list, 158 "GENERATE_SERIES": _build_generate_series, 159 "GET_BIT": lambda args: exp.Getbit( 160 this=seq_get(args, 0), expression=seq_get(args, 1), zero_is_msb=True 161 ), 162 "JSON_EXTRACT_PATH": build_json_extract_path(exp.JSONExtract), 163 "JSON_EXTRACT_PATH_TEXT": build_json_extract_path(exp.JSONExtractScalar), 164 "LENGTH": lambda args: exp.Length(this=seq_get(args, 0), encoding=seq_get(args, 1)), 165 "LIKE": build_like(exp.Like), 166 "MAKE_DATE": exp.DateFromParts.from_arg_list, 167 "MAKE_INTERVAL": _build_make_interval, 168 "MAKE_TIME": exp.TimeFromParts.from_arg_list, 169 "MAKE_TIMESTAMP": exp.TimestampFromParts.from_arg_list, 170 "NOW": exp.CurrentTimestamp.from_arg_list, 171 "REGEXP_REPLACE": _build_regexp_replace, 172 "TO_CHAR": build_formatted_time(exp.TimeToStr), 173 "TO_DATE": build_formatted_time(exp.StrToDate), 174 "TO_TIMESTAMP": _build_to_timestamp, 175 "UNNEST": exp.Explode.from_arg_list, 176 "SHA256": lambda args: exp.SHA2Digest( 177 this=seq_get(args, 0), length=exp.Literal.number(256) 178 ), 179 "SHA384": lambda args: exp.SHA2Digest( 180 this=seq_get(args, 0), length=exp.Literal.number(384) 181 ), 182 "SHA512": lambda args: exp.SHA2Digest( 183 this=seq_get(args, 0), length=exp.Literal.number(512) 184 ), 185 "LEVENSHTEIN_LESS_EQUAL": _build_levenshtein_less_equal, 186 "JSON_OBJECT_AGG": lambda args: exp.JSONObjectAgg(expressions=args), 187 "JSONB_OBJECT_AGG": exp.JSONBObjectAgg.from_arg_list, 188 "WIDTH_BUCKET": lambda args: ( 189 exp.WidthBucket(this=seq_get(args, 0), threshold=seq_get(args, 1)) 190 if len(args) == 2 191 else exp.WidthBucket.from_arg_list(args) 192 ), 193 "UUID": lambda args: exp.cast(args[0], exp.DType.UUID) if args else exp.Uuid(), 194 } 195 196 NO_PAREN_FUNCTION_PARSERS = { 197 **parser.Parser.NO_PAREN_FUNCTION_PARSERS, 198 "VARIADIC": lambda self: self.expression(exp.Variadic(this=self._parse_bitwise())), 199 } 200 201 NO_PAREN_FUNCTIONS = { 202 **parser.Parser.NO_PAREN_FUNCTIONS, 203 TokenType.LOCALTIME: exp.Localtime, 204 TokenType.LOCALTIMESTAMP: exp.Localtimestamp, 205 TokenType.CURRENT_CATALOG: exp.CurrentCatalog, 206 TokenType.SESSION_USER: exp.SessionUser, 207 TokenType.CURRENT_SCHEMA: exp.CurrentSchema, 208 } 209 210 FUNCTION_PARSERS = { 211 **parser.Parser.FUNCTION_PARSERS, 212 "DATE_PART": lambda self: self._parse_date_part(self._parse_assignment()), 213 "JSON_AGG": lambda self: self.expression( 214 exp.JSONArrayAgg(this=self._parse_lambda(), order=self._parse_order()) 215 ), 216 "JSONB_EXISTS": lambda self: self._parse_jsonb_exists(), 217 "JSON_VALUE": lambda self: self._parse_json_value(json_path=False), 218 "STRING_AGG": lambda self: self._parse_string_agg().set_kwargs( 219 {"null_separator_is_empty": True} 220 ), 221 } 222 223 BITWISE = { 224 **parser.Parser.BITWISE, 225 TokenType.HASH: exp.BitwiseXor, 226 # Extensions define <=> for different operand types (e.g. pgvector and RUM). 227 TokenType.LT_EQ_GT: partial(exp.Operator, operator="<=>"), 228 } 229 230 EXPONENT = { 231 TokenType.CARET: exp.Pow, 232 } 233 234 RANGE_PARSERS = { 235 **parser.Parser.RANGE_PARSERS, 236 TokenType.DAMP: binary_range_parser(exp.ArrayOverlaps), 237 TokenType.DAT: lambda self, this: self.expression( 238 exp.MatchAgainst(this=self._parse_bitwise(), expressions=[this]) 239 ), 240 } 241 242 STATEMENT_PARSERS = { 243 **parser.Parser.STATEMENT_PARSERS, 244 TokenType.END: lambda self: self._parse_commit_or_rollback(), 245 } 246 247 UNARY_PARSERS = { 248 **parser.Parser.UNARY_PARSERS, 249 TokenType.PLUS: lambda self: self.expression(exp.Pos(this=self._parse_unary())), 250 TokenType.AT_SIGN: lambda self: self.expression(exp.Abs(this=self._parse_term())), 251 # The `~` token is remapped from TILDE to RLIKE in Postgres due to the binary REGEXP LIKE operator 252 TokenType.RLIKE: lambda self: self.expression(exp.BitwiseNot(this=self._parse_unary())), 253 } 254 255 JSON_ARROWS_REQUIRE_JSON_TYPE = True 256 257 COLUMN_OPERATORS = { 258 k: v 259 for k, v in parser.Parser.COLUMN_OPERATORS.items() 260 if k 261 not in ( 262 TokenType.ARROW, 263 TokenType.DARROW, 264 TokenType.HASH_ARROW, 265 TokenType.DHASH_ARROW, 266 TokenType.PLACEHOLDER, 267 ) 268 } 269 270 JSON_OPERATORS = { 271 TokenType.ARROW: lambda self, this, path: self.validate_expression( 272 build_json_extract_path( 273 exp.JSONExtract, arrow_req_json_type=self.JSON_ARROWS_REQUIRE_JSON_TYPE 274 )([this, path]) 275 ), 276 TokenType.DARROW: lambda self, this, path: self.validate_expression( 277 build_json_extract_path( 278 exp.JSONExtractScalar, arrow_req_json_type=self.JSON_ARROWS_REQUIRE_JSON_TYPE 279 )([this, path]) 280 ), 281 TokenType.HASH_ARROW: parser.build_jsonb_extract, 282 TokenType.DHASH_ARROW: parser.build_jsonb_extract_scalar, 283 TokenType.PLACEHOLDER: parser.build_jsonb_contains_top_key, 284 } 285 286 ARG_MODE_TOKENS: t.ClassVar = {TokenType.IN, TokenType.OUT, TokenType.INOUT, TokenType.VARIADIC} 287 288 def _parse_parameter_mode(self) -> TokenType | None: 289 """ 290 Parse PostgreSQL function parameter mode (IN, OUT, INOUT, VARIADIC). 291 292 Disambiguates between mode keywords and identifiers with the same name: 293 - MODE TYPE -> keyword is identifier (e.g., "out INT") 294 - MODE NAME TYPE -> keyword is mode (e.g., "OUT x INT") 295 296 Returns: 297 Mode token type if current token is a mode keyword, None otherwise. 298 """ 299 if not self._match_set(self.ARG_MODE_TOKENS, advance=False) or not self._next: 300 return None 301 302 mode_token = self._curr 303 304 # Check Pattern 1: MODE TYPE 305 # Try parsing next token as a built-in type (not UDT) 306 # If successful, the keyword is an identifier, not a mode 307 is_followed_by_builtin_type = self._try_parse( 308 lambda: ( 309 self._advance() # type: ignore 310 or self._parse_types(check_func=False, allow_identifiers=False) 311 ), 312 retreat=True, 313 ) 314 if is_followed_by_builtin_type: 315 return None # Pattern: "out INT" -> out is parameter name 316 317 # Check Pattern 2: MODE NAME TYPE 318 # If next token is an identifier, check if there's a type after it 319 # The type can be built-in or user-defined (allow_identifiers=True) 320 if self._next.token_type not in self.ID_VAR_TOKENS: 321 return None 322 323 is_followed_by_any_type = self._try_parse( 324 lambda: ( 325 self._advance(2) # type: ignore 326 or self._parse_types(check_func=False, allow_identifiers=True) 327 ), 328 retreat=True, 329 ) 330 331 if is_followed_by_any_type: 332 return mode_token.token_type # Pattern: "OUT x INT" -> OUT is mode 333 334 return None 335 336 def _create_mode_constraint(self, param_mode: TokenType) -> exp.InOutColumnConstraint: 337 """ 338 Create parameter mode constraint for function parameters. 339 340 Args: 341 param_mode: The parameter mode token (IN, OUT, INOUT, or VARIADIC). 342 343 Returns: 344 InOutColumnConstraint expression representing the parameter mode. 345 """ 346 return self.expression( 347 exp.InOutColumnConstraint( 348 input_=(param_mode in {TokenType.IN, TokenType.INOUT}), 349 output=(param_mode in {TokenType.OUT, TokenType.INOUT}), 350 variadic=(param_mode == TokenType.VARIADIC), 351 ) 352 ) 353 354 def _parse_function_parameter(self) -> exp.Expr | None: 355 param_mode = self._parse_parameter_mode() 356 357 if param_mode: 358 self._advance() 359 360 # Parse parameter name and type 361 param_name = self._parse_id_var() 362 column_def = self._parse_column_def(this=param_name, computed_column=False) 363 364 # Attach mode as constraint 365 if param_mode and column_def: 366 constraint = self._create_mode_constraint(param_mode) 367 column_def.set("constraints", [constraint] + column_def.args.get("constraints", [])) 368 369 return column_def 370 371 def _parse_query_parameter(self) -> exp.Expr | None: 372 this = ( 373 self._parse_wrapped(self._parse_id_var) 374 if self._match(TokenType.L_PAREN, advance=False) 375 else None 376 ) 377 self._match_text_seq("S") 378 return self.expression(exp.Placeholder(this=this)) 379 380 def _parse_interval_span( 381 self, this: exp.Expr, parse_function_unit: bool = True 382 ) -> exp.Interval: 383 if ( 384 this.is_string 385 and this.name.startswith("P") 386 and not self._match_texts( 387 {"YEAR", "MONTH", "DAY", "HOUR", "MINUTE", "SECOND"}, advance=False 388 ) 389 ): 390 match = ISO_INTERVAL_RE.fullmatch(this.name) 391 if match: 392 time, value, unit = match.groups() 393 if unit in ("HMS" if time else "YMWD"): 394 value = f"{Decimal(value):f}" 395 return self.expression( 396 exp.Interval( 397 this=exp.Literal.string(value), 398 unit=exp.var("MONTH" if unit == "M" and not time else unit), 399 fraction_in_string="." in value or None, 400 ) 401 ) 402 403 return super()._parse_interval_span(this, parse_function_unit) 404 405 def _parse_date_part(self, part: exp.Expr | None) -> exp.Extract: 406 self._match(TokenType.COMMA) 407 if part and part.is_string and exp.SAFE_IDENTIFIER_RE.fullmatch(part.name): 408 part = exp.var(part.name.upper()) 409 410 extract = self._build_extract(part, self._parse_assignment()) 411 extract.set("date_part", True) 412 return extract 413 414 def _build_extract(self, part: exp.Expr | None, value: exp.Expr | None) -> exp.Extract: 415 extract = super()._build_extract(part, value) 416 if isinstance(part, (exp.Var, exp.Literal)) and part.name.upper() in ("DOW", "DOY"): 417 extract.set("uses_session_timezone", True) 418 if part.name.upper() == "DOW": 419 extract.set("zero_based_dow", True) 420 return extract 421 422 def _parse_convert(self, strict: bool, safe: bool | None = None) -> exp.Expr | None: 423 args = self._parse_csv(self._parse_assignment) 424 return self.validate_expression( 425 exp.ConvertToCharset( 426 this=seq_get(args, 0), source=seq_get(args, 1), dest=seq_get(args, 2) 427 ), 428 args, 429 ) 430 431 def _parse_unique(self) -> exp.UniqueColumnConstraint: 432 return self.expression( 433 exp.UniqueColumnConstraint( 434 nulls=self._match_text_seq("NULLS", "NOT", "DISTINCT"), 435 this=self._parse_schema(), 436 include=self._parse_index_params(), 437 options=self._parse_key_constraint_options(), 438 ) 439 ) 440 441 def _parse_primary_key( 442 self, 443 wrapped_optional: bool = False, 444 in_props: bool = False, 445 named_primary_key: bool = False, 446 ) -> exp.PrimaryKeyColumnConstraint | exp.PrimaryKey: 447 this = super()._parse_primary_key(wrapped_optional, in_props, named_primary_key) 448 if isinstance(this, exp.PrimaryKeyColumnConstraint): 449 this.set("include", self._parse_index_params()) 450 this.set("options", this.args["options"] + self._parse_key_constraint_options()) 451 return this 452 453 def _parse_jsonb_exists(self) -> exp.JSONBExists: 454 return self.expression( 455 exp.JSONBExists( 456 this=self._parse_bitwise(), 457 path=self._match(TokenType.COMMA) 458 and self.dialect.to_json_path(self._parse_bitwise()), 459 ) 460 ) 461 462 def _parse_generated_as_identity( 463 self, 464 ) -> ( 465 exp.GeneratedAsIdentityColumnConstraint 466 | exp.ComputedColumnConstraint 467 | exp.GeneratedAsRowColumnConstraint 468 ): 469 this = super()._parse_generated_as_identity() 470 471 if self._match_text_seq("STORED"): 472 this = self.expression(exp.ComputedColumnConstraint(this=this.expression)) 473 474 return this 475 476 def _parse_user_defined_type(self, identifier: exp.Identifier) -> exp.Expr | None: 477 udt_type: exp.Identifier | exp.Dot = identifier 478 479 while self._match(TokenType.DOT): 480 part = self._parse_id_var() 481 if part: 482 udt_type = exp.Dot(this=udt_type, expression=part) 483 484 return exp.DataType.build(udt_type, udt=True)
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
- max_nodes: Maximum number of AST nodes to prevent memory exhaustion. Set to -1 (default) to disable the check.
PROPERTY_PARSERS =
{'ALLOWED_VALUES': <function Parser.<lambda>>, 'ALGORITHM': <function Parser.<lambda>>, 'AUTO': <function Parser.<lambda>>, 'AUTO_INCREMENT': <function Parser.<lambda>>, 'BACKUP': <function Parser.<lambda>>, 'BLOCKCOMPRESSION': <function Parser.<lambda>>, 'CALLED': <function Parser.<lambda>>, 'CHARSET': <function Parser.<lambda>>, 'CHECKSUM': <function Parser.<lambda>>, 'CLUSTER BY': <function Parser.<lambda>>, 'CLUSTERED': <function Parser.<lambda>>, 'COLLATE': <function Parser.<lambda>>, 'COMMENT': <function Parser.<lambda>>, 'CONTAINS': <function Parser.<lambda>>, 'COPY': <function Parser.<lambda>>, 'DATABLOCKSIZE': <function Parser.<lambda>>, 'DATA_DELETION': <function Parser.<lambda>>, 'DEFINER': <function Parser.<lambda>>, 'DETERMINISTIC': <function Parser.<lambda>>, 'DISTRIBUTED': <function Parser.<lambda>>, 'DUPLICATE': <function Parser.<lambda>>, 'DYNAMIC': <function Parser.<lambda>>, 'DISTKEY': <function Parser.<lambda>>, 'DISTSTYLE': <function Parser.<lambda>>, 'EMPTY': <function Parser.<lambda>>, 'ENGINE': <function Parser.<lambda>>, 'ENVIRONMENT': <function Parser.<lambda>>, 'HANDLER': <function Parser.<lambda>>, 'EXECUTE': <function Parser.<lambda>>, 'EXTERNAL': <function Parser.<lambda>>, 'FALLBACK': <function Parser.<lambda>>, 'FORMAT': <function Parser.<lambda>>, 'FREESPACE': <function Parser.<lambda>>, 'GLOBAL': <function Parser.<lambda>>, 'HEAP': <function Parser.<lambda>>, 'ICEBERG': <function Parser.<lambda>>, 'IMMUTABLE': <function Parser.<lambda>>, 'INHERITS': <function Parser.<lambda>>, 'JOURNAL': <function Parser.<lambda>>, 'LANGUAGE': <function Parser.<lambda>>, 'LAYOUT': <function Parser.<lambda>>, 'LIFETIME': <function Parser.<lambda>>, 'LIKE': <function Parser.<lambda>>, 'LOCATION': <function Parser.<lambda>>, 'LOCK': <function Parser.<lambda>>, 'LOCKING': <function Parser.<lambda>>, 'LOG': <function Parser.<lambda>>, 'MATERIALIZED': <function Parser.<lambda>>, 'MERGEBLOCKRATIO': <function Parser.<lambda>>, 'MODIFIES': <function Parser.<lambda>>, 'MULTISET': <function Parser.<lambda>>, 'NO': <function Parser.<lambda>>, 'ON': <function Parser.<lambda>>, 'ORDER BY': <function Parser.<lambda>>, 'OUTPUT': <function Parser.<lambda>>, 'PARTITION': <function Parser.<lambda>>, 'PARTITION BY': <function Parser.<lambda>>, 'PARTITIONED BY': <function Parser.<lambda>>, 'PARTITIONED_BY': <function Parser.<lambda>>, 'PRIMARY KEY': <function Parser.<lambda>>, 'RANGE': <function Parser.<lambda>>, 'READS': <function Parser.<lambda>>, 'REMOTE': <function Parser.<lambda>>, 'RETURNS': <function Parser.<lambda>>, 'STRICT': <function Parser.<lambda>>, 'STREAMING': <function Parser.<lambda>>, 'ROW': <function Parser.<lambda>>, 'ROW_FORMAT': <function Parser.<lambda>>, 'SAMPLE': <function Parser.<lambda>>, 'SECURE': <function Parser.<lambda>>, 'SECURITY': <function Parser.<lambda>>, 'SQL SECURITY': <function Parser.<lambda>>, 'SET': <function PostgresParser.<lambda>>, 'SETTINGS': <function Parser.<lambda>>, 'SHARING': <function Parser.<lambda>>, 'SORTKEY': <function Parser.<lambda>>, 'SOURCE': <function Parser.<lambda>>, 'STABLE': <function Parser.<lambda>>, 'STORED': <function Parser.<lambda>>, 'SYSTEM_VERSIONING': <function Parser.<lambda>>, 'TBLPROPERTIES': <function Parser.<lambda>>, 'TEMP': <function Parser.<lambda>>, 'TEMPORARY': <function Parser.<lambda>>, 'TO': <function Parser.<lambda>>, 'TRANSIENT': <function Parser.<lambda>>, 'TRANSFORM': <function Parser.<lambda>>, 'TTL': <function Parser.<lambda>>, 'USING': <function Parser.<lambda>>, 'UNLOGGED': <function Parser.<lambda>>, 'VOLATILE': <function Parser.<lambda>>, 'WITH': <function Parser.<lambda>>, 'TABLESPACE': <function PostgresParser.<lambda>>}
PLACEHOLDER_PARSERS =
{<TokenType.PLACEHOLDER: 367>: <function PostgresParser.<lambda>>, <TokenType.PARAMETER: 60>: <function Parser.<lambda>>, <TokenType.COLON: 11>: <function Parser.<lambda>>, <TokenType.MOD: 339>: <function PostgresParser.<lambda>>}
FUNCTIONS =
{'AI_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.AIAgg'>>, 'AI_CLASSIFY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.AIClassify'>>, 'AI_EMBED': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.AIEmbed'>>, 'A_I_FORECAST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.AIForecast'>>, 'AI_GENERATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.AIGenerate'>>, 'AI_SIMILARITY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.AISimilarity'>>, 'AI_SUMMARIZE_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.AISummarizeAgg'>>, 'ABS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Abs'>>, 'ACOS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Acos'>>, 'ACOSH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Acosh'>>, 'ADD_MONTHS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.AddMonths'>>, 'AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Agg'>>, 'AND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.And'>>, 'ANONYMOUS_AGG_FUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.AnonymousAggFunc'>>, 'ANY_VALUE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.AnyValue'>>, 'APPLY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.Apply'>>, 'APPROX_DISTINCT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.ApproxDistinct'>>, 'APPROX_COUNT_DISTINCT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.ApproxDistinct'>>, 'APPROX_PERCENTILE_ACCUMULATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ApproxPercentileAccumulate'>>, 'APPROX_PERCENTILE_COMBINE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ApproxPercentileCombine'>>, 'APPROX_PERCENTILE_ESTIMATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ApproxPercentileEstimate'>>, 'APPROX_QUANTILE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ApproxQuantile'>>, 'APPROX_QUANTILES': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ApproxQuantiles'>>, 'APPROX_TOP_K': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ApproxTopK'>>, 'APPROX_TOP_K_ACCUMULATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ApproxTopKAccumulate'>>, 'APPROX_TOP_K_COMBINE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ApproxTopKCombine'>>, 'APPROX_TOP_K_ESTIMATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ApproxTopKEstimate'>>, 'APPROX_TOP_SUM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ApproxTopSum'>>, 'APPROXIMATE_SIMILARITY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ApproximateSimilarity'>>, 'APPROXIMATE_JACCARD_INDEX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ApproximateSimilarity'>>, 'ARG_MAX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ArgMax'>>, 'ARGMAX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ArgMax'>>, 'MAX_BY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ArgMax'>>, 'ARG_MIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ArgMin'>>, 'ARGMIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ArgMin'>>, 'MIN_BY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ArgMin'>>, 'ARRAY': <function Parser.<lambda>>, 'ARRAY_AGG': <function PostgresParser.<lambda>>, 'ARRAY_ALL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayAll'>>, 'ARRAY_ANY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayAny'>>, 'ARRAY_APPEND': <function build_array_append>, 'ARRAY_COMPACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayCompact'>>, 'ARRAY_CONCAT': <function build_array_concat>, 'ARRAY_CAT': <function build_array_concat>, 'ARRAY_CONCAT_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ArrayConcatAgg'>>, 'ARRAY_CONSTRUCT_COMPACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayConstructCompact'>>, 'ARRAY_CONTAINED_BY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayContainedBy'>>, 'ARRAY_CONTAINS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayContains'>>, 'ARRAY_HAS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayContains'>>, 'ARRAY_CONTAINS_ALL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayContainsAll'>>, 'ARRAY_HAS_ALL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayContainsAll'>>, 'ARRAY_DISTINCT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayDistinct'>>, 'ARRAY_EXCEPT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayExcept'>>, 'FILTER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayFilter'>>, 'ARRAY_FILTER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayFilter'>>, 'ARRAY_FIRST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayFirst'>>, 'ARRAY_INSERT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayInsert'>>, 'ARRAY_INTERSECT': <function Parser.<lambda>>, 'ARRAY_INTERSECTION': <function Parser.<lambda>>, 'ARRAY_LAST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayLast'>>, 'ARRAY_MAX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayMax'>>, 'ARRAY_MIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayMin'>>, 'ARRAY_OVERLAPS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayOverlaps'>>, 'ARRAY_POSITION': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayPosition'>>, 'ARRAY_PREPEND': <function PostgresParser.<lambda>>, 'ARRAY_REMOVE': <function build_array_remove>, 'ARRAY_REMOVE_AT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayRemoveAt'>>, 'ARRAY_REVERSE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayReverse'>>, 'ARRAY_SIZE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArraySize'>>, 'ARRAY_LENGTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArraySize'>>, 'ARRAY_SLICE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArraySlice'>>, 'ARRAY_SORT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArraySort'>>, 'ARRAY_SUM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArraySum'>>, 'ARRAY_TO_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayToString'>>, 'ARRAY_JOIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArrayToString'>>, 'ARRAY_UNION_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ArrayUnionAgg'>>, 'ARRAY_UNIQUE_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ArrayUniqueAgg'>>, 'ARRAYS_ZIP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArraysZip'>>, 'ASCII': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Ascii'>>, 'ASIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Asin'>>, 'ASINH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Asinh'>>, 'ATAN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Atan'>>, 'ATAN2': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Atan2'>>, 'ATANH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Atanh'>>, 'AVG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Avg'>>, 'BASE64_DECODE_BINARY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Base64DecodeBinary'>>, 'BASE64_DECODE_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Base64DecodeString'>>, 'BASE64_ENCODE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Base64Encode'>>, 'BIT_LENGTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.BitLength'>>, 'BITMAP_BIT_POSITION': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BitmapBitPosition'>>, 'BITMAP_BUCKET_NUMBER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BitmapBucketNumber'>>, 'BITMAP_CONSTRUCT_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BitmapConstructAgg'>>, 'BITMAP_COUNT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BitmapCount'>>, 'BITMAP_OR_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BitmapOrAgg'>>, 'BITWISE_AND_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BitwiseAndAgg'>>, 'BITWISE_COUNT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BitwiseCount'>>, 'BITWISE_OR_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BitwiseOrAgg'>>, 'BITWISE_XOR_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BitwiseXorAgg'>>, 'BOOLAND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Booland'>>, 'BOOLNOT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Boolnot'>>, 'BOOLOR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Boolor'>>, 'BOOLXOR_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BoolxorAgg'>>, 'BYTE_LENGTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ByteLength'>>, 'CASE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Case'>>, 'CAST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Cast'>>, 'CAST_TO_STR_TYPE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CastToStrType'>>, 'CBRT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Cbrt'>>, 'CEIL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Ceil'>>, 'CEILING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Ceil'>>, 'CHECK_JSON': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.CheckJson'>>, 'CHECK_XML': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CheckXml'>>, 'CHR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Chr'>>, 'CHAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Chr'>>, 'CITY_HASH64': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.CityHash64'>>, 'COALESCE': <function build_coalesce>, 'IFNULL': <function build_coalesce>, 'NVL': <function build_coalesce>, 'CODE_POINTS_TO_BYTES': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.CodePointsToBytes'>>, 'CODE_POINTS_TO_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.CodePointsToString'>>, 'COLLATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Collate'>>, 'COLLATION': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Collation'>>, 'COLUMNS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Columns'>>, 'COMBINED_AGG_FUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.CombinedAggFunc'>>, 'COMBINED_PARAMETERIZED_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.CombinedParameterizedAgg'>>, 'COMPRESS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Compress'>>, 'CONCAT': <function Parser.<lambda>>, 'CONCAT_WS': <function Parser.<lambda>>, 'CONNECT_BY_ROOT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.ConnectByRoot'>>, 'CONTAINS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Contains'>>, 'CONVERT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Convert'>>, 'CONVERT_TIMEZONE': <function build_convert_timezone>, 'CONVERT_TO_CHARSET': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ConvertToCharset'>>, 'CORR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Corr'>>, 'COS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Cos'>>, 'COSH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Cosh'>>, 'COSINE_DISTANCE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.CosineDistance'>>, 'COT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Cot'>>, 'COTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Coth'>>, 'COUNT': <function Parser.<lambda>>, 'COUNT_IF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.CountIf'>>, 'COUNTIF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.CountIf'>>, 'COVAR_POP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.CovarPop'>>, 'COVAR_SAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.CovarSamp'>>, 'CSC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Csc'>>, 'CSCH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Csch'>>, 'CUME_DIST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.CumeDist'>>, 'CURRENT_ACCOUNT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentAccount'>>, 'CURRENT_ACCOUNT_NAME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentAccountName'>>, 'CURRENT_AVAILABLE_ROLES': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentAvailableRoles'>>, 'CURRENT_CATALOG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentCatalog'>>, 'CURRENT_CLIENT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentClient'>>, 'CURRENT_DATABASE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentDatabase'>>, 'CURRENT_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.CurrentDate'>>, 'CURRENT_DATETIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.CurrentDatetime'>>, 'CURRENT_IP_ADDRESS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentIpAddress'>>, 'CURRENT_ORGANIZATION_NAME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentOrganizationName'>>, 'CURRENT_ORGANIZATION_USER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentOrganizationUser'>>, 'CURRENT_PATH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentPath'>>, 'CURRENT_REGION': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentRegion'>>, 'CURRENT_ROLE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentRole'>>, 'CURRENT_ROLE_TYPE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentRoleType'>>, 'CURRENT_SCHEMA': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentSchema'>>, 'CURRENT_SCHEMAS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentSchemas'>>, 'CURRENT_SECONDARY_ROLES': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentSecondaryRoles'>>, 'CURRENT_SESSION': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentSession'>>, 'CURRENT_STATEMENT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentStatement'>>, 'CURRENT_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.CurrentTime'>>, 'CURRENT_TIMESTAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.CurrentTimestamp'>>, 'CURRENT_TIMESTAMP_L_T_Z': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.CurrentTimestampLTZ'>>, 'CURRENT_TIMEZONE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.CurrentTimezone'>>, 'CURRENT_TRANSACTION': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentTransaction'>>, 'CURRENT_USER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentUser'>>, 'CURRENT_USER_ID': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentUserId'>>, 'CURRENT_VERSION': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentVersion'>>, 'CURRENT_WAREHOUSE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentWarehouse'>>, 'DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Date'>>, 'DATE_ADD': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DateAdd'>>, 'DATE_BIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DateBin'>>, 'DATEDIFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DateDiff'>>, 'DATE_DIFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DateDiff'>>, 'DATE_FROM_PARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DateFromParts'>>, 'DATEFROMPARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DateFromParts'>>, 'DATE_FROM_UNIX_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DateFromUnixDate'>>, 'DATE_STR_TO_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DateStrToDate'>>, 'DATE_SUB': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DateSub'>>, 'DATE_TO_DATE_STR': <function Parser.<lambda>>, 'DATE_TO_DI': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DateToDi'>>, 'DATE_TRUNC': <function build_timestamp_trunc>, 'DATETIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Datetime'>>, 'DATETIME_ADD': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DatetimeAdd'>>, 'DATETIME_DIFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DatetimeDiff'>>, 'DATETIME_SUB': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DatetimeSub'>>, 'DATETIME_TRUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DatetimeTrunc'>>, 'DAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Day'>>, 'DAY_OF_MONTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DayOfMonth'>>, 'DAYOFMONTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DayOfMonth'>>, 'DAY_OF_WEEK': <function Parser.<lambda>>, 'DAYOFWEEK': <function Parser.<lambda>>, 'DAYOFWEEK_ISO': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DayOfWeekIso'>>, 'ISODOW': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DayOfWeekIso'>>, 'DAY_OF_YEAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DayOfYear'>>, 'DAYOFYEAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DayOfYear'>>, 'DAYNAME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Dayname'>>, 'DECODE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Decode'>>, 'DECODE_CASE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.DecodeCase'>>, 'DECOMPRESS_BINARY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.DecompressBinary'>>, 'DECOMPRESS_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.DecompressString'>>, 'DECRYPT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Decrypt'>>, 'DECRYPT_RAW': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.DecryptRaw'>>, 'DEGREES': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Degrees'>>, 'DENSE_RANK': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.DenseRank'>>, 'DI_TO_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DiToDate'>>, 'DOT_PRODUCT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.DotProduct'>>, 'DYNAMIC_IDENTIFIER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.DynamicIdentifier'>>, 'ELT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Elt'>>, 'ENCODE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Encode'>>, 'ENCRYPT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Encrypt'>>, 'ENCRYPT_RAW': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.EncryptRaw'>>, 'ENDS_WITH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.EndsWith'>>, 'ENDSWITH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.EndsWith'>>, 'EQUAL_NULL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.EqualNull'>>, 'EUCLIDEAN_DISTANCE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.EuclideanDistance'>>, 'EXISTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Exists'>>, 'EXP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Exp'>>, 'EXPLODE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.Explode'>>, 'EXPLODING_GENERATE_SERIES': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ExplodingGenerateSeries'>>, 'EXTRACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Extract'>>, 'FACTORIAL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Factorial'>>, 'FARM_FINGERPRINT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.FarmFingerprint'>>, 'FARMFINGERPRINT64': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.FarmFingerprint'>>, 'FEATURES_AT_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.FeaturesAtTime'>>, 'FIND_IN_SET': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.FindInSet'>>, 'FIRST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.First'>>, 'FIRST_VALUE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.FirstValue'>>, 'FLATTEN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.Flatten'>>, 'FLOAT64': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Float64'>>, 'FLOOR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Floor'>>, 'FORMAT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Format'>>, 'FROM_BASE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.FromBase'>>, 'FROM_BASE32': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.FromBase32'>>, 'FROM_BASE64': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.FromBase64'>>, 'FROM_ISO8601_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.FromISO8601Date'>>, 'FROM_ISO8601_TIMESTAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.FromISO8601Timestamp'>>, 'FROM_ISO8601_TIMESTAMP_NANOS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.FromISO8601TimestampNanos'>>, 'FROM_JSON': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.FromJson'>>, 'GAP_FILL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.GapFill'>>, 'GENERATE_BOOL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.GenerateBool'>>, 'GENERATE_DATE_ARRAY': <function Parser.<lambda>>, 'GENERATE_DOUBLE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.GenerateDouble'>>, 'GENERATE_EMBEDDING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.GenerateEmbedding'>>, 'GENERATE_INT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.GenerateInt'>>, 'GENERATE_SERIES': <function _build_generate_series>, 'GENERATE_TABLE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.GenerateTable'>>, 'GENERATE_TEXT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.GenerateText'>>, 'GENERATE_TIMESTAMP_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.GenerateTimestampArray'>>, 'GENERATOR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.Generator'>>, 'GET_EXTRACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.GetExtract'>>, 'GET_IGNORE_CASE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.GetIgnoreCase'>>, 'GETBIT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Getbit'>>, 'GET_BIT': <function PostgresParser.<lambda>>, 'GREATEST': <function Parser.<lambda>>, 'GROUP_CONCAT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.GroupConcat'>>, 'GROUPING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Grouping'>>, 'GROUPING_ID': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.GroupingId'>>, 'HASH_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.HashAgg'>>, 'HEX': <function build_hex>, 'HEX_DECODE_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.HexDecodeString'>>, 'HLL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.Hll'>>, 'HOST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Host'>>, 'HOUR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Hour'>>, 'IF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.If'>>, 'IIF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.If'>>, 'INITCAP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Initcap'>>, 'INLINE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.Inline'>>, 'INT64': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Int64'>>, 'IS_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.IsArray'>>, 'IS_ASCII': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.IsAscii'>>, 'IS_INF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.IsInf'>>, 'ISINF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.IsInf'>>, 'IS_NAN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.IsNan'>>, 'ISNAN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.IsNan'>>, 'IS_NULL_VALUE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.IsNullValue'>>, 'J_S_O_N_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONArray'>>, 'J_S_O_N_ARRAY_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONArrayAgg'>>, 'JSON_ARRAY_APPEND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONArrayAppend'>>, 'JSON_ARRAY_CONTAINS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONArrayContains'>>, 'JSON_ARRAY_INSERT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONArrayInsert'>>, 'JSONB_CONTAINS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONBContains'>>, 'J_S_O_N_B_CONTAINS_ALL_TOP_KEYS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONBContainsAllTopKeys'>>, 'J_S_O_N_B_CONTAINS_ANY_TOP_KEYS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONBContainsAnyTopKeys'>>, 'J_S_O_N_B_CONTAINS_TOP_KEY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONBContainsTopKey'>>, 'J_S_O_N_B_DELETE_AT_PATH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONBDeleteAtPath'>>, 'JSONB_EXISTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONBExists'>>, 'JSONB_EXTRACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONBExtract'>>, 'JSONB_EXTRACT_SCALAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONBExtractScalar'>>, 'J_S_O_N_B_OBJECT_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONBObjectAgg'>>, 'J_S_O_N_B_PATH_EXISTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONBPathExists'>>, 'J_S_O_N_BOOL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONBool'>>, 'J_S_O_N_CAST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.JSONCast'>>, 'J_S_O_N_EXISTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONExists'>>, 'JSON_EXTRACT': <function build_extract_json_with_path.<locals>._builder>, 'JSON_EXTRACT_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONExtractArray'>>, 'JSON_EXTRACT_SCALAR': <function build_extract_json_with_path.<locals>._builder>, 'JSON_FORMAT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONFormat'>>, 'JSON_KEYS': <function Parser.<lambda>>, 'J_S_O_N_KEYS_AT_DEPTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONKeysAtDepth'>>, 'J_S_O_N_OBJECT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONObject'>>, 'J_S_O_N_OBJECT_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONObjectAgg'>>, 'JSON_REMOVE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONRemove'>>, 'JSON_SET': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONSet'>>, 'JSON_STRIP_NULLS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONStripNulls'>>, 'J_S_O_N_TABLE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONTable'>>, 'JSON_TYPE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONType'>>, 'J_S_O_N_VALUE_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.query.JSONValueArray'>>, 'JAROWINKLER_SIMILARITY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.JarowinklerSimilarity'>>, 'JUSTIFY_DAYS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.JustifyDays'>>, 'JUSTIFY_HOURS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.JustifyHours'>>, 'JUSTIFY_INTERVAL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.JustifyInterval'>>, 'KURTOSIS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Kurtosis'>>, 'LAG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Lag'>>, 'LAST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Last'>>, 'LAST_DAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.LastDay'>>, 'LAST_DAY_OF_MONTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.LastDay'>>, 'LAST_VALUE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.LastValue'>>, 'LAX_BOOL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.LaxBool'>>, 'LAX_FLOAT64': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.LaxFloat64'>>, 'LAX_INT64': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.LaxInt64'>>, 'LAX_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.LaxString'>>, 'LEAD': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Lead'>>, 'LEAST': <function Parser.<lambda>>, 'LEFT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Left'>>, 'LENGTH': <function PostgresParser.<lambda>>, 'LEN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Length'>>, 'CHAR_LENGTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Length'>>, 'CHARACTER_LENGTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Length'>>, 'LEVENSHTEIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Levenshtein'>>, 'LIST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.List'>>, 'LN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Ln'>>, 'LOCALTIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Localtime'>>, 'LOCALTIMESTAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Localtimestamp'>>, 'LOG': <function build_logarithm>, 'LOGICAL_AND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.LogicalAnd'>>, 'BOOL_AND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.LogicalAnd'>>, 'BOOLAND_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.LogicalAnd'>>, 'LOGICAL_OR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.LogicalOr'>>, 'BOOL_OR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.LogicalOr'>>, 'BOOLOR_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.LogicalOr'>>, 'LOWER': <function build_lower>, 'LCASE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Lower'>>, 'LOWER_HEX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.LowerHex'>>, 'MD5': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.MD5'>>, 'MD5_DIGEST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.MD5Digest'>>, 'M_D5_NUMBER_LOWER64': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.MD5NumberLower64'>>, 'M_D5_NUMBER_UPPER64': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.MD5NumberUpper64'>>, 'M_L_FORECAST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.MLForecast'>>, 'M_L_TRANSLATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.MLTranslate'>>, 'MAKE_INTERVAL': <function _build_make_interval>, 'MANHATTAN_DISTANCE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.ManhattanDistance'>>, 'MAP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.Map'>>, 'MAP_CAT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.MapCat'>>, 'MAP_CONTAINS_KEY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.MapContainsKey'>>, 'MAP_DELETE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.MapDelete'>>, 'MAP_FROM_ENTRIES': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.MapFromEntries'>>, 'MAP_INSERT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.MapInsert'>>, 'MAP_KEYS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.MapKeys'>>, 'MAP_PICK': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.MapPick'>>, 'MAP_SIZE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.MapSize'>>, 'MATCH_AGAINST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.MatchAgainst'>>, 'MAX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Max'>>, 'MEDIAN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Median'>>, 'MIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Min'>>, 'MINHASH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Minhash'>>, 'MINHASH_COMBINE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.MinhashCombine'>>, 'MINUTE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Minute'>>, 'MODE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Mode'>>, 'MONTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Month'>>, 'MONTHNAME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Monthname'>>, 'MONTHS_BETWEEN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.MonthsBetween'>>, 'NANVL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Nanvl'>>, 'NEGATIVE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Negative'>>, 'NET_FUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.NetFunc'>>, 'NEXT_DAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.NextDay'>>, 'NEXT_VALUE_FOR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.ddl.NextValueFor'>>, 'NORMAL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Normal'>>, 'NORMALIZE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Normalize'>>, 'NTH_VALUE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.NthValue'>>, 'NTILE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Ntile'>>, 'NULLIF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Nullif'>>, 'NUMBER_TO_STR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.NumberToStr'>>, 'NVL2': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Nvl2'>>, 'OBJECT_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.ObjectAgg'>>, 'OBJECT_ID': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.ObjectId'>>, 'OBJECT_INSERT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.ObjectInsert'>>, 'OBJECT_TRANSFORM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.ObjectTransform'>>, 'OPEN_J_S_O_N': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.OpenJSON'>>, 'OR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.Or'>>, 'OVERLAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Overlay'>>, 'PAD': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Pad'>>, 'PARAMETERIZED_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.ParameterizedAgg'>>, 'PARSE_BIGNUMERIC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ParseBignumeric'>>, 'PARSE_DATETIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.ParseDatetime'>>, 'PARSE_IP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.ParseIp'>>, 'PARSE_JSON': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.ParseJSON'>>, 'JSON_PARSE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.ParseJSON'>>, 'PARSE_NUMERIC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ParseNumeric'>>, 'PARSE_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.ParseTime'>>, 'PARSE_URL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ParseUrl'>>, 'PERCENT_RANK': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.PercentRank'>>, 'PERCENTILE_CONT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.PercentileCont'>>, 'PERCENTILE_DISC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.PercentileDisc'>>, 'PI': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Pi'>>, 'POSEXPLODE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.Posexplode'>>, 'POSEXPLODE_OUTER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.PosexplodeOuter'>>, 'POWER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.Pow'>>, 'POW': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.Pow'>>, 'PREDICT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Predict'>>, 'PREVIOUS_DAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.PreviousDay'>>, 'QUANTILE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Quantile'>>, 'QUARTER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Quarter'>>, 'RADIANS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Radians'>>, 'RAND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Rand'>>, 'RANDOM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Rand'>>, 'RANDN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Randn'>>, 'RANDSTR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Randstr'>>, 'RANGE_BUCKET': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.RangeBucket'>>, 'RANGE_N': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.RangeN'>>, 'RANK': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Rank'>>, 'READ_CSV': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.ReadCSV'>>, 'READ_PARQUET': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.ReadParquet'>>, 'REDUCE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.Reduce'>>, 'REG_DOMAIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.RegDomain'>>, 'REGEXP_COUNT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.RegexpCount'>>, 'REGEXP_EXTRACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.RegexpExtract'>>, 'REGEXP_EXTRACT_ALL': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.RegexpExtractAll'>>, 'REGEXP_FULL_MATCH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.RegexpFullMatch'>>, 'REGEXP_I_LIKE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.RegexpILike'>>, 'REGEXP_INSTR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.RegexpInstr'>>, 'REGEXP_LIKE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.RegexpLike'>>, 'REGEXP_REPLACE': <function _build_regexp_replace>, 'REGEXP_SPLIT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.RegexpSplit'>>, 'REGEXP_SUBSTR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.RegexpSubstr'>>, 'REGR_AVGX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.RegrAvgx'>>, 'REGR_AVGY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.RegrAvgy'>>, 'REGR_COUNT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.RegrCount'>>, 'REGR_INTERCEPT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.RegrIntercept'>>, 'REGR_R2': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.RegrR2'>>, 'REGR_SLOPE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.RegrSlope'>>, 'REGR_SXX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.RegrSxx'>>, 'REGR_SXY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.RegrSxy'>>, 'REGR_SYY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.RegrSyy'>>, 'REGR_VALX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.RegrValx'>>, 'REGR_VALY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.RegrValy'>>, 'REPEAT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Repeat'>>, 'REPLACE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Replace'>>, 'REVERSE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Reverse'>>, 'RIGHT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Right'>>, 'RINT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Rint'>>, 'ROUND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Round'>>, 'ROW_NUMBER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.RowNumber'>>, 'RTRIMMED_LENGTH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.RtrimmedLength'>>, 'SHA': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.SHA'>>, 'SHA1': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.SHA'>>, 'S_H_A1_DIGEST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.SHA1Digest'>>, 'SHA2': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.SHA2'>>, 'S_H_A2_DIGEST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.SHA2Digest'>>, 'SAFE_ADD': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.SafeAdd'>>, 'SAFE_CONVERT_BYTES_TO_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.SafeConvertBytesToString'>>, 'SAFE_DIVIDE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.SafeDivide'>>, 'SAFE_FUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.SafeFunc'>>, 'SAFE_MULTIPLY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.SafeMultiply'>>, 'SAFE_NEGATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.SafeNegate'>>, 'SAFE_SUBTRACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.SafeSubtract'>>, 'SEARCH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Search'>>, 'SEARCH_IP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.SearchIp'>>, 'SEC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Sec'>>, 'SECH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Sech'>>, 'SECOND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Second'>>, 'SECRET': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Secret'>>, 'SEQ1': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Seq1'>>, 'SEQ2': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Seq2'>>, 'SEQ4': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Seq4'>>, 'SEQ8': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Seq8'>>, 'SESSION_USER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.SessionUser'>>, 'SHUFFLE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.Shuffle'>>, 'SIGN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Sign'>>, 'SIGNUM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Sign'>>, 'SIN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Sin'>>, 'SINH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Sinh'>>, 'SKEWNESS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Skewness'>>, 'SOUNDEX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Soundex'>>, 'SOUNDEX_P123': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.SoundexP123'>>, 'SPACE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Space'>>, 'SPLIT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Split'>>, 'SPLIT_PART': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.SplitPart'>>, 'SPLIT_TO_TABLE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.SplitToTable'>>, 'SQRT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Sqrt'>>, 'ST_DISTANCE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.StDistance'>>, 'ST_GEOGFROMGEOJSON': <function build_st_geogfromgeojson>, 'ST_GEOGPOINT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.StGeogPoint'>>, 'ST_POINT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.StPoint'>>, 'ST_MAKEPOINT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.StPoint'>>, 'ST_X': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.StX'>>, 'ST_Y': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.StY'>>, 'STACK': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.Stack'>>, 'STANDARD_HASH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.StandardHash'>>, 'STAR_MAP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.StarMap'>>, 'STARTS_WITH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.StartsWith'>>, 'STARTSWITH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.StartsWith'>>, 'STDDEV': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Stddev'>>, 'STDEV': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Stddev'>>, 'STDDEV_POP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.StddevPop'>>, 'STDDEV_SAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.StddevSamp'>>, 'STR_POSITION': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.StrPosition'>>, 'STR_TO_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.StrToDate'>>, 'STR_TO_MAP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.StrToMap'>>, 'STR_TO_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.StrToTime'>>, 'STR_TO_UNIX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.StrToUnix'>>, 'STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.String'>>, 'STRING_TO_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.StringToArray'>>, 'SPLIT_BY_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.StringToArray'>>, 'STRIP_NULL_VALUE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.StripNullValue'>>, 'STRTOK': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Strtok'>>, 'STRTOK_SPLIT_TO_TABLE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.StrtokSplitToTable'>>, 'STRTOK_TO_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.StrtokToArray'>>, 'STRUCT_EXTRACT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.StructExtract'>>, 'STUFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Stuff'>>, 'INSERT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Stuff'>>, 'SUBSTRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Substring'>>, 'SUBSTR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Substring'>>, 'SUBSTRING_INDEX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.SubstringIndex'>>, 'SUM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Sum'>>, 'SYSTIMESTAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Systimestamp'>>, 'TAN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Tan'>>, 'TANH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Tanh'>>, 'TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Time'>>, 'TIME_ADD': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeAdd'>>, 'TIME_DIFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeDiff'>>, 'TIME_FROM_PARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeFromParts'>>, 'TIMEFROMPARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeFromParts'>>, 'TIME_SLICE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeSlice'>>, 'TIME_STR_TO_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeStrToDate'>>, 'TIME_STR_TO_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeStrToTime'>>, 'TIME_STR_TO_UNIX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeStrToUnix'>>, 'TIME_SUB': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeSub'>>, 'TIME_TO_STR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeToStr'>>, 'TIME_TO_TIME_STR': <function Parser.<lambda>>, 'TIME_TO_UNIX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeToUnix'>>, 'TIME_TRUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeTrunc'>>, 'TIMESTAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Timestamp'>>, 'TIMESTAMP_ADD': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimestampAdd'>>, 'TIMESTAMPDIFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimestampDiff'>>, 'TIMESTAMP_DIFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimestampDiff'>>, 'TIMESTAMP_FROM_PARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimestampFromParts'>>, 'TIMESTAMPFROMPARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimestampFromParts'>>, 'TIMESTAMP_LTZ_FROM_PARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimestampLtzFromParts'>>, 'TIMESTAMPLTZFROMPARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimestampLtzFromParts'>>, 'TIMESTAMP_SUB': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimestampSub'>>, 'TIMESTAMP_TRUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimestampTrunc'>>, 'TIMESTAMP_TZ_FROM_PARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimestampTzFromParts'>>, 'TIMESTAMPTZFROMPARTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimestampTzFromParts'>>, 'TO_ARRAY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ToArray'>>, 'TO_BASE32': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ToBase32'>>, 'TO_BASE64': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ToBase64'>>, 'TO_BINARY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ToBinary'>>, 'TO_BOOLEAN': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.ToBoolean'>>, 'TO_CHAR': <function build_formatted_time.<locals>._builder>, 'TO_CODE_POINTS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ToCodePoints'>>, 'TO_DAYS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.ToDays'>>, 'TO_DECFLOAT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ToDecfloat'>>, 'TO_DOUBLE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ToDouble'>>, 'TO_FILE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ToFile'>>, 'TO_MAP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ToMap'>>, 'TO_NUMBER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.ToNumber'>>, 'TO_VARIANT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.ToVariant'>>, 'TRANSFORM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.Transform'>>, 'TRANSLATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Translate'>>, 'TRIM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Trim'>>, 'TRUNC': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Trunc'>>, 'TRUNCATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.Trunc'>>, 'TRY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Try'>>, 'TRY_BASE64_DECODE_BINARY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.TryBase64DecodeBinary'>>, 'TRY_BASE64_DECODE_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.TryBase64DecodeString'>>, 'TRY_CAST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.TryCast'>>, 'TRY_HEX_DECODE_BINARY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.TryHexDecodeBinary'>>, 'TRY_HEX_DECODE_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.TryHexDecodeString'>>, 'TRY_TO_DECFLOAT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.TryToDecfloat'>>, 'TS_OR_DI_TO_DI': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TsOrDiToDi'>>, 'TS_OR_DS_ADD': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TsOrDsAdd'>>, 'TS_OR_DS_DIFF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TsOrDsDiff'>>, 'TS_OR_DS_TO_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TsOrDsToDate'>>, 'TS_OR_DS_TO_DATE_STR': <function Parser.<lambda>>, 'TS_OR_DS_TO_DATETIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TsOrDsToDatetime'>>, 'TS_OR_DS_TO_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TsOrDsToTime'>>, 'TS_OR_DS_TO_TIMESTAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TsOrDsToTimestamp'>>, 'TYPEOF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.Typeof'>>, 'UNHEX': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Unhex'>>, 'UNICODE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Unicode'>>, 'UNIFORM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Uniform'>>, 'UNIX_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.UnixDate'>>, 'UNIX_MICROS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.UnixMicros'>>, 'UNIX_MILLIS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.UnixMillis'>>, 'UNIX_SECONDS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.UnixSeconds'>>, 'UNIX_TO_STR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.UnixToStr'>>, 'UNIX_TO_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.UnixToTime'>>, 'UNIX_TO_TIME_STR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.UnixToTimeStr'>>, 'UNNEST': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.Explode'>>, 'UPPER': <function build_upper>, 'UCASE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Upper'>>, 'UTC_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.UtcDate'>>, 'UTC_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.UtcTime'>>, 'UTC_TIMESTAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.UtcTimestamp'>>, 'UUID': <function PostgresParser.<lambda>>, 'GEN_RANDOM_UUID': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Uuid'>>, 'GENERATE_UUID': <function Parser.<lambda>>, 'UUID_STRING': <function Parser.<lambda>>, 'VAR_MAP': <function build_var_map>, 'VARIANCE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Variance'>>, 'VARIANCE_SAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Variance'>>, 'VAR_SAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.Variance'>>, 'VARIANCE_POP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.VariancePop'>>, 'VAR_POP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.VariancePop'>>, 'VECTOR_SEARCH': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.VectorSearch'>>, 'WEEK': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Week'>>, 'WEEK_OF_YEAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.WeekOfYear'>>, 'WEEKOFYEAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.WeekOfYear'>>, 'WEEK_START': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.WeekStart'>>, 'WEIGHT_STRING': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.WeightString'>>, 'WIDTH_BUCKET': <function PostgresParser.<lambda>>, 'XMLELEMENT': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.XMLElement'>>, 'XMLGET': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.XMLGet'>>, 'X_M_L_TABLE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.XMLTable'>>, 'XOR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.core.Xor'>>, 'YEAR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.Year'>>, 'YEAR_OF_WEEK': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.YearOfWeek'>>, 'YEAROFWEEK': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.YearOfWeek'>>, 'YEAR_OF_WEEK_ISO': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.YearOfWeekIso'>>, 'YEAROFWEEKISO': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.YearOfWeekIso'>>, 'ZIPF': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.Zipf'>>, 'EXPLODE_OUTER': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array._ExplodeOuter'>>, 'SORT_ARRAY': <function build_sort_array>, 'ARRAYAGG': <function Parser.<lambda>>, 'GLOB': <function Parser.<lambda>>, 'JSON_EXTRACT_PATH_TEXT': <function build_json_extract_path.<locals>._builder>, 'LIKE': <function build_like.<locals>._builder>, 'LOG2': <function Parser.<lambda>>, 'LOG10': <function Parser.<lambda>>, 'LPAD': <function Parser.<lambda>>, 'LEFTPAD': <function Parser.<lambda>>, 'LTRIM': <function Parser.<lambda>>, 'MOD': <function build_mod>, 'RIGHTPAD': <function Parser.<lambda>>, 'RPAD': <function Parser.<lambda>>, 'RTRIM': <function Parser.<lambda>>, 'SCOPE_RESOLUTION': <function Parser.<lambda>>, 'STRPOS': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.StrPosition'>>, 'CHARINDEX': <function Parser.<lambda>>, 'INSTR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.StrPosition'>>, 'LOCATE': <function Parser.<lambda>>, 'TO_HEX': <function build_hex>, 'BIT_AND': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BitwiseAndAgg'>>, 'BIT_OR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BitwiseOrAgg'>>, 'BIT_XOR': <bound method Func.from_arg_list of <class 'sqlglot.expressions.math.BitwiseXorAgg'>>, 'BTRIM': <bound method Func.from_arg_list of <class 'sqlglot.expressions.string.Trim'>>, 'CARDINALITY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.array.ArraySize'>>, 'VERSION': <bound method Func.from_arg_list of <class 'sqlglot.expressions.functions.CurrentVersion'>>, 'DIV': <function PostgresParser.<lambda>>, 'EVERY': <bound method Func.from_arg_list of <class 'sqlglot.expressions.aggregate.LogicalAnd'>>, 'JSON_EXTRACT_PATH': <function build_json_extract_path.<locals>._builder>, 'MAKE_DATE': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.DateFromParts'>>, 'MAKE_TIME': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimeFromParts'>>, 'MAKE_TIMESTAMP': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.TimestampFromParts'>>, 'NOW': <bound method Func.from_arg_list of <class 'sqlglot.expressions.temporal.CurrentTimestamp'>>, 'TO_DATE': <function build_formatted_time.<locals>._builder>, 'TO_TIMESTAMP': <function _build_to_timestamp>, 'SHA256': <function PostgresParser.<lambda>>, 'SHA384': <function PostgresParser.<lambda>>, 'SHA512': <function PostgresParser.<lambda>>, 'LEVENSHTEIN_LESS_EQUAL': <function _build_levenshtein_less_equal>, 'JSON_OBJECT_AGG': <function PostgresParser.<lambda>>, 'JSONB_OBJECT_AGG': <bound method Func.from_arg_list of <class 'sqlglot.expressions.json.JSONBObjectAgg'>>}
NO_PAREN_FUNCTION_PARSERS =
{'ANY': <function Parser.<lambda>>, 'CASE': <function Parser.<lambda>>, 'CONNECT_BY_ROOT': <function Parser.<lambda>>, 'IF': <function Parser.<lambda>>, 'VARIADIC': <function PostgresParser.<lambda>>}
NO_PAREN_FUNCTIONS =
{<TokenType.CURRENT_DATE: 255>: <class 'sqlglot.expressions.temporal.CurrentDate'>, <TokenType.CURRENT_DATETIME: 256>: <class 'sqlglot.expressions.temporal.CurrentDate'>, <TokenType.CURRENT_TIME: 258>: <class 'sqlglot.expressions.temporal.CurrentTime'>, <TokenType.CURRENT_TIMESTAMP: 259>: <class 'sqlglot.expressions.temporal.CurrentTimestamp'>, <TokenType.CURRENT_USER: 260>: <class 'sqlglot.expressions.functions.CurrentUser'>, <TokenType.CURRENT_ROLE: 262>: <class 'sqlglot.expressions.functions.CurrentRole'>, <TokenType.LOCALTIME: 186>: <class 'sqlglot.expressions.temporal.Localtime'>, <TokenType.LOCALTIMESTAMP: 187>: <class 'sqlglot.expressions.temporal.Localtimestamp'>, <TokenType.CURRENT_CATALOG: 263>: <class 'sqlglot.expressions.functions.CurrentCatalog'>, <TokenType.SESSION_USER: 63>: <class 'sqlglot.expressions.functions.SessionUser'>, <TokenType.CURRENT_SCHEMA: 257>: <class 'sqlglot.expressions.functions.CurrentSchema'>}
FUNCTION_PARSERS =
{'ARG_MAX': <function parse_distinct_arg_functions.<locals>.<dictcomp>.<lambda>>, 'ARGMAX': <function parse_distinct_arg_functions.<locals>.<dictcomp>.<lambda>>, 'MAX_BY': <function parse_distinct_arg_functions.<locals>.<dictcomp>.<lambda>>, 'ARG_MIN': <function parse_distinct_arg_functions.<locals>.<dictcomp>.<lambda>>, 'ARGMIN': <function parse_distinct_arg_functions.<locals>.<dictcomp>.<lambda>>, 'MIN_BY': <function parse_distinct_arg_functions.<locals>.<dictcomp>.<lambda>>, 'CAST': <function Parser.<lambda>>, 'CEIL': <function Parser.<lambda>>, 'CONVERT': <function Parser.<lambda>>, 'CHAR': <function Parser.<lambda>>, 'CHR': <function Parser.<lambda>>, 'DECODE': <function Parser.<lambda>>, 'EXTRACT': <function Parser.<lambda>>, 'FLOOR': <function Parser.<lambda>>, 'GAP_FILL': <function Parser.<lambda>>, 'INITCAP': <function Parser.<lambda>>, 'JSON_OBJECT': <function Parser.<lambda>>, 'JSON_OBJECTAGG': <function Parser.<lambda>>, 'JSON_TABLE': <function Parser.<lambda>>, 'MATCH': <function Parser.<lambda>>, 'NORMALIZE': <function Parser.<lambda>>, 'OPENJSON': <function Parser.<lambda>>, 'OVERLAY': <function Parser.<lambda>>, 'POSITION': <function Parser.<lambda>>, 'SAFE_CAST': <function Parser.<lambda>>, 'STRING_AGG': <function PostgresParser.<lambda>>, 'SUBSTRING': <function Parser.<lambda>>, 'TRIM': <function Parser.<lambda>>, 'TRY_CAST': <function Parser.<lambda>>, 'TRY_CONVERT': <function Parser.<lambda>>, 'WEIGHT_STRING': <function Parser.<lambda>>, 'XMLELEMENT': <function Parser.<lambda>>, 'XMLTABLE': <function Parser.<lambda>>, 'DATE_PART': <function PostgresParser.<lambda>>, 'JSON_AGG': <function PostgresParser.<lambda>>, 'JSONB_EXISTS': <function PostgresParser.<lambda>>, 'JSON_VALUE': <function PostgresParser.<lambda>>}
BITWISE =
{<TokenType.AMP: 37>: <class 'sqlglot.expressions.core.BitwiseAnd'>, <TokenType.CARET: 43>: <class 'sqlglot.expressions.core.BitwiseXor'>, <TokenType.PIPE: 40>: <class 'sqlglot.expressions.core.BitwiseOr'>, <TokenType.HASH: 49>: <class 'sqlglot.expressions.core.BitwiseXor'>, <TokenType.LT_EQ_GT: 31>: functools.partial(<class 'sqlglot.expressions.core.Operator'>, operator='<=>')}
EXPONENT =
{<TokenType.CARET: 43>: <class 'sqlglot.expressions.core.Pow'>}
RANGE_PARSERS =
{<TokenType.AT_GT: 58>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.BETWEEN: 238>: <function Parser.<lambda>>, <TokenType.GLOB: 297>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.ILIKE: 305>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.IN: 306>: <function Parser.<lambda>>, <TokenType.IRLIKE: 317>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.IS: 318>: <function Parser.<lambda>>, <TokenType.LIKE: 328>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.LT_AT: 57>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.OVERLAPS: 359>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.RLIKE: 391>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.SIMILAR_TO: 406>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.FOR: 289>: <function Parser.<lambda>>, <TokenType.QMARK_AMP: 70>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.QMARK_PIPE: 71>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.HASH_DASH: 72>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.AT_QMARK: 56>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.ADJACENT: 67>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.OPERATOR: 350>: <function Parser.<lambda>>, <TokenType.AMP_LT: 65>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.AMP_GT: 66>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.CARET_AT: 44>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.DAMP: 64>: <function binary_range_parser.<locals>._parse_binary_range>, <TokenType.DAT: 54>: <function PostgresParser.<lambda>>}
STATEMENT_PARSERS =
{<TokenType.ALTER: 227>: <function Parser.<lambda>>, <TokenType.ANALYZE: 450>: <function Parser.<lambda>>, <TokenType.BEGIN: 237>: <function Parser.<lambda>>, <TokenType.CACHE: 240>: <function Parser.<lambda>>, <TokenType.COMMENT: 246>: <function Parser.<lambda>>, <TokenType.COMMIT: 247>: <function Parser.<lambda>>, <TokenType.COPY: 251>: <function Parser.<lambda>>, <TokenType.CREATE: 252>: <function Parser.<lambda>>, <TokenType.DECLARE: 264>: <function Parser.<lambda>>, <TokenType.DELETE: 266>: <function Parser.<lambda>>, <TokenType.DESC: 267>: <function Parser.<lambda>>, <TokenType.DESCRIBE: 268>: <function Parser.<lambda>>, <TokenType.DROP: 275>: <function Parser.<lambda>>, <TokenType.GRANT: 299>: <function Parser.<lambda>>, <TokenType.REVOKE: 388>: <function Parser.<lambda>>, <TokenType.INSERT: 310>: <function Parser.<lambda>>, <TokenType.KILL: 324>: <function Parser.<lambda>>, <TokenType.LOAD: 331>: <function Parser.<lambda>>, <TokenType.MERGE: 338>: <function Parser.<lambda>>, <TokenType.PIVOT: 366>: <function Parser.<lambda>>, <TokenType.PRAGMA: 371>: <function Parser.<lambda>>, <TokenType.REFRESH: 384>: <function Parser.<lambda>>, <TokenType.ROLLBACK: 393>: <function Parser.<lambda>>, <TokenType.SET: 403>: <function Parser.<lambda>>, <TokenType.TRUNCATE: 422>: <function Parser.<lambda>>, <TokenType.UNCACHE: 425>: <function Parser.<lambda>>, <TokenType.UNPIVOT: 429>: <function Parser.<lambda>>, <TokenType.UPDATE: 430>: <function Parser.<lambda>>, <TokenType.USE: 431>: <function Parser.<lambda>>, <TokenType.SEMICOLON: 19>: <function Parser.<lambda>>, <TokenType.END: 277>: <function PostgresParser.<lambda>>}
UNARY_PARSERS =
{<TokenType.PLUS: 10>: <function PostgresParser.<lambda>>, <TokenType.NOT: 27>: <function Parser.<lambda>>, <TokenType.TILDE: 45>: <function Parser.<lambda>>, <TokenType.DASH: 9>: <function Parser.<lambda>>, <TokenType.PIPE_SLASH: 41>: <function Parser.<lambda>>, <TokenType.DPIPE_SLASH: 42>: <function Parser.<lambda>>, <TokenType.AT_SIGN: 55>: <function PostgresParser.<lambda>>, <TokenType.RLIKE: 391>: <function PostgresParser.<lambda>>}
COLUMN_OPERATORS =
{<TokenType.DOT: 8>: None, <TokenType.DOTCOLON: 12>: <function Parser.<lambda>>, <TokenType.DCOLON: 14>: <function Parser.<lambda>>}
JSON_OPERATORS =
{<TokenType.ARROW: 46>: <function PostgresParser.<lambda>>, <TokenType.DARROW: 47>: <function PostgresParser.<lambda>>, <TokenType.HASH_ARROW: 50>: <function build_jsonb_extract>, <TokenType.DHASH_ARROW: 51>: <function build_jsonb_extract_scalar>, <TokenType.PLACEHOLDER: 367>: <function build_jsonb_contains_top_key>}
ARG_MODE_TOKENS: ClassVar =
{<TokenType.VARIADIC: 434>, <TokenType.IN: 306>, <TokenType.OUT: 355>, <TokenType.INOUT: 356>}
Inherited Members
- sqlglot.parser.Parser
- Parser
- STRUCT_TYPE_TOKENS
- NESTED_TYPE_TOKENS
- ENUM_TYPE_TOKENS
- AGGREGATE_TYPE_TOKENS
- TYPE_TOKENS
- SIGNED_TO_UNSIGNED_TYPE_TOKEN
- SUBQUERY_PREDICATES
- SUBQUERY_TOKENS
- RESERVED_TOKENS
- TEXT_MATCH_EXCLUDED_TOKENS
- DB_CREATABLES
- CREATABLES
- TRIGGER_EVENTS
- ALTERABLES
- ID_VAR_TOKENS
- TABLE_ALIAS_TOKENS
- ALIAS_TOKENS
- COLON_PLACEHOLDER_TOKENS
- ARRAY_CONSTRUCTORS
- COMMENT_TABLE_ALIAS_TOKENS
- UPDATE_ALIAS_TOKENS
- TRIM_TYPES
- IDENTIFIER_TOKENS
- BRACKETS
- COLUMN_POSTFIX_TOKENS
- TABLE_POSTFIX_TOKENS
- FUNC_TOKENS
- CONJUNCTION
- ASSIGNMENT
- DISJUNCTION
- EQUALITY
- COMPARISON
- TERM
- FACTOR
- TIMES
- TIMESTAMPS
- SET_OPERATIONS
- JOIN_METHODS
- JOIN_SIDES
- JOIN_KINDS
- JOIN_HINTS
- SUPPORTS_DIRECTED_JOIN
- TABLE_TERMINATORS
- LAMBDAS
- TYPED_LAMBDA_ARGS
- LAMBDA_ARG_TERMINATORS
- CAST_COLUMN_OPERATORS
- EXPRESSION_PARSERS
- STRING_PARSERS
- NUMERIC_PARSERS
- PRIMARY_PARSERS
- PIPE_SYNTAX_TRANSFORM_PARSERS
- CONSTRAINT_PARSERS
- ALTER_PARSERS
- ALTER_ALTER_PARSERS
- SCHEMA_UNNAMED_CONSTRAINTS
- RESERVED_CONSTRAINT_KINDS
- INVALID_FUNC_NAME_TOKENS
- FUNCTIONS_WITH_ALIASED_ARGS
- KEY_VALUE_DEFINITIONS
- EXTRACT_FUNCTIONS
- QUERY_MODIFIER_PARSERS
- QUERY_MODIFIER_TOKENS
- SET_PARSERS
- SHOW_PARSERS
- TYPE_LITERAL_PARSERS
- TYPE_CONVERTERS
- DDL_SELECT_TOKENS
- PRE_VOLATILE_TOKENS
- TRANSACTION_KIND
- TRANSACTION_CHARACTERISTICS
- CONFLICT_ALGORITHMS
- CONFLICT_ACTIONS
- TRIGGER_TIMING
- TRIGGER_DEFERRABLE
- CREATE_SEQUENCE
- ISOLATED_LOADING_OPTIONS
- USABLES
- CAST_ACTIONS
- SCHEMA_BINDING_OPTIONS
- PROCEDURE_OPTIONS
- EXECUTE_AS_OPTIONS
- KEY_CONSTRAINT_OPTIONS
- WINDOW_EXCLUDE_OPTIONS
- INSERT_ALTERNATIVES
- CLONE_KEYWORDS
- VERSION_PHRASES
- HISTORICAL_DATA_PREFIX
- 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
- ADD_CONSTRAINT_KEYWORDS
- DISTINCT_TOKENS
- UNNEST_OFFSET_ALIAS_TOKENS
- SELECT_START_TOKENS
- COPY_INTO_VARLEN_OPTIONS
- IS_PREDICATE_TOKENS
- IS_JSON_PREDICATE_KIND
- ODBC_DATETIME_LITERALS
- ON_CONDITION_TOKENS
- PRIVILEGE_FOLLOW_TOKENS
- DESCRIBE_STYLES
- SET_ASSIGNMENT_DELIMITERS
- ANALYZE_STYLES
- ANALYZE_EXPRESSION_PARSERS
- PARTITION_KEYWORDS
- AMBIGUOUS_ALIAS_TOKENS
- OPERATION_MODIFIERS
- RECURSIVE_CTE_SEARCH_KIND
- SECURITY_PROPERTY_KEYWORDS
- MODIFIABLES
- STRICT_CAST
- PREFIXED_PIVOT_COLUMNS
- IDENTIFY_PIVOT_STRINGS
- UNPIVOT_VALUE_COLUMNS_FIRST
- PIVOT_COLUMN_NAMING
- LOG_DEFAULTS_TO_LN
- TABLESAMPLE_CSV
- DEFAULT_SAMPLING_METHOD
- SET_REQUIRES_ASSIGNMENT_DELIMITER
- TRIM_PATTERN_FIRST
- STRING_ALIASES
- STRING_AGG_DEFAULT_SEPARATOR
- MODIFIERS_ATTACHED_TO_SET_OP
- SET_OP_MODIFIERS
- NO_PAREN_IF_COMMANDS
- COLON_IS_VARIANT_EXTRACT
- COLON_CHAIN_IS_SINGLE_EXTRACT
- VALUES_FOLLOWED_BY_PAREN
- SUPPORTS_IMPLICIT_UNNEST
- SUPPORTS_GROUP_BY_AUTO
- SUPPORTS_DIGIT_PREFIXED_FIELD_NAMES
- INTERVAL_SPANS
- SUPPORTS_PARTITION_SELECTION
- WRAPPED_TRANSFORM_COLUMN_CONSTRAINT
- OPTIONAL_ALIAS_TOKEN_CTE
- ALTER_RENAME_REQUIRES_COLUMN
- ALTER_TABLE_PARTITIONS
- ALTER_TABLE_REQUIRES_ACTION
- JOINS_HAVE_EQUAL_PRECEDENCE
- MATCH_RECOGNIZE_APPLIES_TO_JOINS
- ZONE_AWARE_TIMESTAMP_CONSTRUCTOR
- AT_TIME_ZONE_READS_SESSION_ZONE
- MAP_KEYS_ARE_ARBITRARY_EXPRESSIONS
- JSON_EXTRACT_REQUIRES_JSON_EXPRESSION
- ADD_JOIN_ON_TRUE
- SUPPORTS_MULTI_PART_INTERVAL_ADD
- ADJACENT_STRINGS_CANNOT_BE_CONNECTED
- SUPPORTS_NTH_VALUE_FROM_MODIFIER
- SHOW_TRIE
- SET_TRIE
- error_level
- error_message_context
- max_errors
- max_nodes
- dialect
- sql
- errors
- reset
- raise_error
- validate_expression
- parse
- parse_into
- check_errors
- expression
- parse_set_operation
- build_cast