Edit on GitHub

sqlglot.dialects.snowflake

  1from __future__ import annotations
  2
  3from itertools import product
  4
  5from sqlglot import exp, jsonpath, tokens
  6from sqlglot.dialects.dialect import (
  7    Dialect,
  8    NormalizationStrategy,
  9)
 10from sqlglot.generators.snowflake import SnowflakeGenerator
 11from sqlglot.parsers.snowflake import (
 12    SnowflakeParser,
 13)
 14from sqlglot.tokens import TokenType
 15from sqlglot.typing.snowflake import EXPRESSION_METADATA
 16
 17
 18class Snowflake(Dialect):
 19    # https://docs.snowflake.com/en/sql-reference/identifiers-syntax
 20    NORMALIZATION_STRATEGY = NormalizationStrategy.UPPERCASE
 21    # https://docs.snowflake.com/en/sql-reference/data-types-text#escape-sequences
 22    UNESCAPED_SEQUENCES = {"\\a": "a", "\\v": "v"}
 23    NULL_ORDERING = "nulls_are_large"
 24    TIME_FORMAT = "'YYYY-MM-DD HH24:MI:SS'"
 25    SUPPORTS_USER_DEFINED_TYPES = False
 26    PREFER_CTE_ALIAS_COLUMN = True
 27    SUPPORTS_POSITIONAL_COLUMN_REFS = True
 28    TABLESAMPLE_SIZE_IS_PERCENT = True
 29    COPY_PARAMS_ARE_CSV = False
 30    ARRAY_AGG_INCLUDES_NULLS = None
 31    ARRAY_FUNCS_PROPAGATES_NULLS = True
 32    ALTER_TABLE_ADD_REQUIRED_FOR_EACH_COLUMN = False
 33    ALTER_TABLE_DROP_REQUIRED_FOR_EACH_COLUMN = False
 34    TRY_CAST_REQUIRES_STRING = True
 35    SUPPORTS_ALIAS_REFS_IN_JOIN_CONDITIONS = True
 36    LEAST_GREATEST_IGNORES_NULLS = False
 37    UUID_IS_STRING_TYPE = True
 38    STAR_ILIKE_BACKSLASH_ESCAPE = True
 39
 40    # https://docs.snowflake.com/en/sql-reference/functions/split_to_table
 41    DEFAULT_FUNCTIONS_COLUMN_NAMES = {
 42        exp.SplitToTable: ("seq", "index", "value"),
 43        exp.StrtokSplitToTable: ("seq", "index", "value"),
 44    }
 45
 46    EXPRESSION_METADATA = EXPRESSION_METADATA.copy()
 47
 48    # https://docs.snowflake.com/en/en/sql-reference/functions/initcap
 49    INITCAP_DEFAULT_DELIMITER_CHARS = ' \t\n\r\f\v!?@"^#$&~_,.:;+\\-*%/|\\[\\](){}<>'
 50
 51    INVERSE_TIME_MAPPING = {
 52        "%d": "DD",
 53        "%-d": "DD",
 54        "%a": "DY",
 55        "T": "T",  # in TIME_MAPPING we map '"T"' with the double quotes to 'T', and we want to prevent 'T' from being mapped back to '"T"' so that 'AUTO' doesn't become 'AU"T"O'
 56    }
 57
 58    TIME_MAPPING = {
 59        "".join(chars): value
 60        for key, value in {
 61            "YYYY": "%Y",
 62            "YY": "%y",
 63            "MMMM": "%B",
 64            "MON": "%b",
 65            "MM": "%m",
 66            "DD": "%d",
 67            "DY": "%a",
 68            "HH24": "%H",
 69            "HH12": "%I",
 70            "MI": "%M",
 71            "SS": "%S",
 72            "FF": "%f_nine",  # %f_ internal representation with precision specified
 73            "FF0": "%f_zero",
 74            "FF1": "%f_one",
 75            "FF2": "%f_two",
 76            "FF3": "%f_three",
 77            "FF4": "%f_four",
 78            "FF5": "%f_five",
 79            "FF6": "%f",
 80            "FF7": "%f_seven",
 81            "FF8": "%f_eight",
 82            "FF9": "%f_nine",
 83            "TZHTZM": "%z",
 84            "TZH:TZM": "%:z",  # internal representation for ±HH:MM
 85            "TZH": "%-z",  # internal representation ±HH
 86            # Seems like Snowflake treats AM/PM in the format string as equivalent,
 87            # only the time (stamp) value's AM/PM affects the output
 88            "AM": "%p",
 89            "PM": "%p",
 90        }.items()
 91        for chars in product(*zip(key.upper(), key.lower()))
 92    } | {'"T"': "T"}
 93
 94    DATE_PART_MAPPING = {
 95        **Dialect.DATE_PART_MAPPING,
 96        "ISOWEEK": "WEEKISO",
 97        # The base Dialect maps EPOCH_SECOND -> EPOCH, but we need to preserve
 98        # EPOCH_SECOND as a distinct value for two reasons:
 99        # 1. Type annotation: EPOCH_SECOND returns BIGINT, while EPOCH returns DOUBLE
100        # 2. Transpilation: DuckDB's EPOCH() returns float, so we cast EPOCH_SECOND
101        #    to BIGINT to match Snowflake's integer behavior
102        # Without this override, EXTRACT(EPOCH_SECOND FROM ts) would be normalized
103        # to EXTRACT(EPOCH FROM ts) and lose the integer semantics.
104        "EPOCH_SECOND": "EPOCH_SECOND",
105        "EPOCH_SECONDS": "EPOCH_SECOND",
106    }
107
108    PSEUDOCOLUMNS = {"LEVEL"}
109
110    def can_quote(self, identifier: exp.Identifier, identify: str | bool = "safe") -> bool:
111        # This disables quoting DUAL in SELECT ... FROM DUAL, because Snowflake treats an
112        # unquoted DUAL keyword in a special way and does not map it to a user-defined table
113        return super().can_quote(identifier, identify) and not (
114            isinstance(identifier.parent, exp.Table)
115            and not identifier.quoted
116            and identifier.name.lower() == "dual"
117        )
118
119    class JSONPathTokenizer(jsonpath.JSONPathTokenizer):
120        SINGLE_TOKENS = jsonpath.JSONPathTokenizer.SINGLE_TOKENS.copy()
121        SINGLE_TOKENS.pop("$")
122
123    Parser = SnowflakeParser
124
125    class Tokenizer(tokens.Tokenizer):
126        STRING_ESCAPES = ["\\", "'"]
127        NUMERIC_ESCAPES = {"x": (16, 2, 2, 0xFF), "u": (16, 4, 4, 0xFFFF), "0": (8, 1, 3, 0xFF)}
128        DROP_UNKNOWN_ESCAPES = True
129        HEX_STRINGS = [("x'", "'"), ("X'", "'")]
130        RAW_STRINGS = ["$$"]
131        COMMENTS = ["--", "//", ("/*", "*/")]
132        NESTED_COMMENTS = False
133
134        KEYWORDS = {
135            **tokens.Tokenizer.KEYWORDS,
136            "(+)": TokenType.JOIN_MARKER,
137            "BYTEINT": TokenType.INT,
138            "FILE://": TokenType.URI_START,
139            "FILE FORMAT": TokenType.FILE_FORMAT,
140            "GET": TokenType.GET,
141            "INTEGRATION": TokenType.INTEGRATION,
142            "LS": TokenType.LIST,
143            "MATCH_CONDITION": TokenType.MATCH_CONDITION,
144            "MATCH_RECOGNIZE": TokenType.MATCH_RECOGNIZE,
145            "MINUS": TokenType.EXCEPT,
146            "NCHAR VARYING": TokenType.VARCHAR,
147            "PACKAGE": TokenType.PACKAGE,
148            "POLICY": TokenType.POLICY,
149            "POOL": TokenType.POOL,
150            "PUT": TokenType.PUT,
151            "UNDROP": TokenType.UNDROP,
152            "REMOVE": TokenType.COMMAND,
153            "RM": TokenType.COMMAND,
154            "ROLE": TokenType.ROLE,
155            "RULE": TokenType.RULE,
156            "SAMPLE": TokenType.TABLE_SAMPLE,
157            "SEMANTIC VIEW": TokenType.SEMANTIC_VIEW,
158            "SQL_DOUBLE": TokenType.DOUBLE,
159            "SQL_VARCHAR": TokenType.VARCHAR,
160            "STAGE": TokenType.STAGE,
161            "STORAGE INTEGRATION": TokenType.STORAGE_INTEGRATION,
162            "STREAMLIT": TokenType.STREAMLIT,
163            "TAG": TokenType.TAG,
164            "TIMESTAMP_TZ": TokenType.TIMESTAMPTZ,
165            "TOP": TokenType.TOP,
166            "VOLUME": TokenType.VOLUME,
167            "WAREHOUSE": TokenType.WAREHOUSE,
168            # https://docs.snowflake.com/en/sql-reference/data-types-numeric#float
169            # FLOAT is a synonym for DOUBLE in Snowflake
170            "FLOAT": TokenType.DOUBLE,
171        }
172        KEYWORDS.pop("/*+")
173        KEYWORDS.pop("GLOB")
174        KEYWORDS.pop("RETURNING")
175
176        SINGLE_TOKENS = {
177            **tokens.Tokenizer.SINGLE_TOKENS,
178            "$": TokenType.PARAMETER,
179            "!": TokenType.EXCLAMATION,
180        }
181
182        VAR_SINGLE_TOKENS = {"$"}
183
184        COMMANDS = tokens.Tokenizer.COMMANDS - {TokenType.SHOW}
185
186    Generator = SnowflakeGenerator
class Snowflake(sqlglot.dialects.dialect.Dialect):
 19class Snowflake(Dialect):
 20    # https://docs.snowflake.com/en/sql-reference/identifiers-syntax
 21    NORMALIZATION_STRATEGY = NormalizationStrategy.UPPERCASE
 22    # https://docs.snowflake.com/en/sql-reference/data-types-text#escape-sequences
 23    UNESCAPED_SEQUENCES = {"\\a": "a", "\\v": "v"}
 24    NULL_ORDERING = "nulls_are_large"
 25    TIME_FORMAT = "'YYYY-MM-DD HH24:MI:SS'"
 26    SUPPORTS_USER_DEFINED_TYPES = False
 27    PREFER_CTE_ALIAS_COLUMN = True
 28    SUPPORTS_POSITIONAL_COLUMN_REFS = True
 29    TABLESAMPLE_SIZE_IS_PERCENT = True
 30    COPY_PARAMS_ARE_CSV = False
 31    ARRAY_AGG_INCLUDES_NULLS = None
 32    ARRAY_FUNCS_PROPAGATES_NULLS = True
 33    ALTER_TABLE_ADD_REQUIRED_FOR_EACH_COLUMN = False
 34    ALTER_TABLE_DROP_REQUIRED_FOR_EACH_COLUMN = False
 35    TRY_CAST_REQUIRES_STRING = True
 36    SUPPORTS_ALIAS_REFS_IN_JOIN_CONDITIONS = True
 37    LEAST_GREATEST_IGNORES_NULLS = False
 38    UUID_IS_STRING_TYPE = True
 39    STAR_ILIKE_BACKSLASH_ESCAPE = True
 40
 41    # https://docs.snowflake.com/en/sql-reference/functions/split_to_table
 42    DEFAULT_FUNCTIONS_COLUMN_NAMES = {
 43        exp.SplitToTable: ("seq", "index", "value"),
 44        exp.StrtokSplitToTable: ("seq", "index", "value"),
 45    }
 46
 47    EXPRESSION_METADATA = EXPRESSION_METADATA.copy()
 48
 49    # https://docs.snowflake.com/en/en/sql-reference/functions/initcap
 50    INITCAP_DEFAULT_DELIMITER_CHARS = ' \t\n\r\f\v!?@"^#$&~_,.:;+\\-*%/|\\[\\](){}<>'
 51
 52    INVERSE_TIME_MAPPING = {
 53        "%d": "DD",
 54        "%-d": "DD",
 55        "%a": "DY",
 56        "T": "T",  # in TIME_MAPPING we map '"T"' with the double quotes to 'T', and we want to prevent 'T' from being mapped back to '"T"' so that 'AUTO' doesn't become 'AU"T"O'
 57    }
 58
 59    TIME_MAPPING = {
 60        "".join(chars): value
 61        for key, value in {
 62            "YYYY": "%Y",
 63            "YY": "%y",
 64            "MMMM": "%B",
 65            "MON": "%b",
 66            "MM": "%m",
 67            "DD": "%d",
 68            "DY": "%a",
 69            "HH24": "%H",
 70            "HH12": "%I",
 71            "MI": "%M",
 72            "SS": "%S",
 73            "FF": "%f_nine",  # %f_ internal representation with precision specified
 74            "FF0": "%f_zero",
 75            "FF1": "%f_one",
 76            "FF2": "%f_two",
 77            "FF3": "%f_three",
 78            "FF4": "%f_four",
 79            "FF5": "%f_five",
 80            "FF6": "%f",
 81            "FF7": "%f_seven",
 82            "FF8": "%f_eight",
 83            "FF9": "%f_nine",
 84            "TZHTZM": "%z",
 85            "TZH:TZM": "%:z",  # internal representation for ±HH:MM
 86            "TZH": "%-z",  # internal representation ±HH
 87            # Seems like Snowflake treats AM/PM in the format string as equivalent,
 88            # only the time (stamp) value's AM/PM affects the output
 89            "AM": "%p",
 90            "PM": "%p",
 91        }.items()
 92        for chars in product(*zip(key.upper(), key.lower()))
 93    } | {'"T"': "T"}
 94
 95    DATE_PART_MAPPING = {
 96        **Dialect.DATE_PART_MAPPING,
 97        "ISOWEEK": "WEEKISO",
 98        # The base Dialect maps EPOCH_SECOND -> EPOCH, but we need to preserve
 99        # EPOCH_SECOND as a distinct value for two reasons:
100        # 1. Type annotation: EPOCH_SECOND returns BIGINT, while EPOCH returns DOUBLE
101        # 2. Transpilation: DuckDB's EPOCH() returns float, so we cast EPOCH_SECOND
102        #    to BIGINT to match Snowflake's integer behavior
103        # Without this override, EXTRACT(EPOCH_SECOND FROM ts) would be normalized
104        # to EXTRACT(EPOCH FROM ts) and lose the integer semantics.
105        "EPOCH_SECOND": "EPOCH_SECOND",
106        "EPOCH_SECONDS": "EPOCH_SECOND",
107    }
108
109    PSEUDOCOLUMNS = {"LEVEL"}
110
111    def can_quote(self, identifier: exp.Identifier, identify: str | bool = "safe") -> bool:
112        # This disables quoting DUAL in SELECT ... FROM DUAL, because Snowflake treats an
113        # unquoted DUAL keyword in a special way and does not map it to a user-defined table
114        return super().can_quote(identifier, identify) and not (
115            isinstance(identifier.parent, exp.Table)
116            and not identifier.quoted
117            and identifier.name.lower() == "dual"
118        )
119
120    class JSONPathTokenizer(jsonpath.JSONPathTokenizer):
121        SINGLE_TOKENS = jsonpath.JSONPathTokenizer.SINGLE_TOKENS.copy()
122        SINGLE_TOKENS.pop("$")
123
124    Parser = SnowflakeParser
125
126    class Tokenizer(tokens.Tokenizer):
127        STRING_ESCAPES = ["\\", "'"]
128        NUMERIC_ESCAPES = {"x": (16, 2, 2, 0xFF), "u": (16, 4, 4, 0xFFFF), "0": (8, 1, 3, 0xFF)}
129        DROP_UNKNOWN_ESCAPES = True
130        HEX_STRINGS = [("x'", "'"), ("X'", "'")]
131        RAW_STRINGS = ["$$"]
132        COMMENTS = ["--", "//", ("/*", "*/")]
133        NESTED_COMMENTS = False
134
135        KEYWORDS = {
136            **tokens.Tokenizer.KEYWORDS,
137            "(+)": TokenType.JOIN_MARKER,
138            "BYTEINT": TokenType.INT,
139            "FILE://": TokenType.URI_START,
140            "FILE FORMAT": TokenType.FILE_FORMAT,
141            "GET": TokenType.GET,
142            "INTEGRATION": TokenType.INTEGRATION,
143            "LS": TokenType.LIST,
144            "MATCH_CONDITION": TokenType.MATCH_CONDITION,
145            "MATCH_RECOGNIZE": TokenType.MATCH_RECOGNIZE,
146            "MINUS": TokenType.EXCEPT,
147            "NCHAR VARYING": TokenType.VARCHAR,
148            "PACKAGE": TokenType.PACKAGE,
149            "POLICY": TokenType.POLICY,
150            "POOL": TokenType.POOL,
151            "PUT": TokenType.PUT,
152            "UNDROP": TokenType.UNDROP,
153            "REMOVE": TokenType.COMMAND,
154            "RM": TokenType.COMMAND,
155            "ROLE": TokenType.ROLE,
156            "RULE": TokenType.RULE,
157            "SAMPLE": TokenType.TABLE_SAMPLE,
158            "SEMANTIC VIEW": TokenType.SEMANTIC_VIEW,
159            "SQL_DOUBLE": TokenType.DOUBLE,
160            "SQL_VARCHAR": TokenType.VARCHAR,
161            "STAGE": TokenType.STAGE,
162            "STORAGE INTEGRATION": TokenType.STORAGE_INTEGRATION,
163            "STREAMLIT": TokenType.STREAMLIT,
164            "TAG": TokenType.TAG,
165            "TIMESTAMP_TZ": TokenType.TIMESTAMPTZ,
166            "TOP": TokenType.TOP,
167            "VOLUME": TokenType.VOLUME,
168            "WAREHOUSE": TokenType.WAREHOUSE,
169            # https://docs.snowflake.com/en/sql-reference/data-types-numeric#float
170            # FLOAT is a synonym for DOUBLE in Snowflake
171            "FLOAT": TokenType.DOUBLE,
172        }
173        KEYWORDS.pop("/*+")
174        KEYWORDS.pop("GLOB")
175        KEYWORDS.pop("RETURNING")
176
177        SINGLE_TOKENS = {
178            **tokens.Tokenizer.SINGLE_TOKENS,
179            "$": TokenType.PARAMETER,
180            "!": TokenType.EXCLAMATION,
181        }
182
183        VAR_SINGLE_TOKENS = {"$"}
184
185        COMMANDS = tokens.Tokenizer.COMMANDS - {TokenType.SHOW}
186
187    Generator = SnowflakeGenerator
NORMALIZATION_STRATEGY = <NormalizationStrategy.UPPERCASE: 'UPPERCASE'>

Specifies the strategy according to which identifiers should be normalized.

UNESCAPED_SEQUENCES: dict[str, str] = {'\\a': 'a', '\\b': '\x08', '\\f': '\x0c', '\\n': '\n', '\\r': '\r', '\\t': '\t', '\\v': 'v', '\\\\': '\\'}

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

NULL_ORDERING = 'nulls_are_large'

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

TIME_FORMAT = "'YYYY-MM-DD HH24:MI:SS'"
SUPPORTS_USER_DEFINED_TYPES = False

Whether user-defined data types are supported.

PREFER_CTE_ALIAS_COLUMN = True

Some dialects, such as Snowflake, allow you to reference a CTE column alias in the HAVING clause of the CTE. This flag will cause the CTE alias columns to override any projection aliases in the subquery.

For example, WITH y(c) AS ( SELECT SUM(a) FROM (SELECT 1 a) AS x HAVING c > 0 ) SELECT c FROM y;

will be rewritten as

WITH y(c) AS (
    SELECT SUM(a) AS c FROM (SELECT 1 AS a) AS x HAVING c > 0
) SELECT c FROM y;
SUPPORTS_POSITIONAL_COLUMN_REFS = True

Whether qualified $N references the Nth column of their source.

TABLESAMPLE_SIZE_IS_PERCENT = True

Whether a size in the table sample clause represents percentage.

COPY_PARAMS_ARE_CSV = False

Whether COPY statement parameters are separated by comma or whitespace

ARRAY_AGG_INCLUDES_NULLS: bool | None = None

Whether ArrayAgg needs to filter NULL values.

ARRAY_FUNCS_PROPAGATES_NULLS = True

Whether Array update functions return NULL when the input array is NULL.

ALTER_TABLE_ADD_REQUIRED_FOR_EACH_COLUMN = False
ALTER_TABLE_DROP_REQUIRED_FOR_EACH_COLUMN = False
TRY_CAST_REQUIRES_STRING: bool | None = True
SUPPORTS_ALIAS_REFS_IN_JOIN_CONDITIONS = True

Whether alias references are allowed in JOIN ... ON clauses.

Most dialects do not support this, but Snowflake allows alias expansion in the JOIN ... ON clause (and almost everywhere else)

For example, in Snowflake: SELECT a.id AS user_id FROM a JOIN b ON user_id = b.id -- VALID

Reference: sqlglot.dialects.snowflake.com/en/sql-reference/sql/select#usage-notes">https://docssqlglot.dialects.snowflake.com/en/sql-reference/sql/select#usage-notes

LEAST_GREATEST_IGNORES_NULLS = False

Whether LEAST/GREATEST functions ignore NULL values, e.g:

  • BigQuery, Snowflake, MySQL, Presto/Trino: LEAST(1, NULL, 2) -> NULL
  • Spark, Postgres, DuckDB, TSQL: LEAST(1, NULL, 2) -> 1
UUID_IS_STRING_TYPE: bool = True

Whether a UUID is considered a string or a UUID type.

STAR_ILIKE_BACKSLASH_ESCAPE = True

Whether a backslash in a SELECT * ILIKE '<pattern>' filter escapes the following character, so that e.g. \_ matches a literal underscore (Snowflake). When False, backslashes in the pattern are matched literally (DuckDB).

DEFAULT_FUNCTIONS_COLUMN_NAMES: dict[type[sqlglot.expressions.core.Func], str | tuple[str, ...]] = {<class 'sqlglot.expressions.array.SplitToTable'>: ('seq', 'index', 'value'), <class 'sqlglot.expressions.array.StrtokSplitToTable'>: ('seq', 'index', 'value')}

Maps function expressions to their default output column name(s).

For example, in Postgres, generate_series function outputs a column named "generate_series" by default, so we map the ExplodingGenerateSeries expression to "generate_series" string.

EXPRESSION_METADATA = {<class 'sqlglot.expressions.core.Add'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Adjacent'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.And'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayContainedBy'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayContains'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayContainsAll'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayOverlaps'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayPosition'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Binary'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.BitwiseAnd'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.BitwiseLeftShift'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.BitwiseOr'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.BitwiseRightShift'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.BitwiseXor'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.functions.Collate'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.core.Connector'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.Corr'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.DPipe'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.core.Distance'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.DistanceNd'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Div'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.Dot'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.EQ'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Escape'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.ExtendsLeft'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.ExtendsRight'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.GT'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.GTE'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Glob'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.ILike'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.IntDiv'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Is'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONArrayContains'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBContains'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBContainsAllTopKeys'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBContainsAnyTopKeys'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBContainsTopKey'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBDeleteAtPath'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBExtract'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBExtractScalar'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONBPathExists'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONExtract'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.json.JSONExtractScalar'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Kwarg'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.LT'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.LTE'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Like'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Match'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Mod'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Mul'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.NEQ'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.NestedJSONSelect'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.NullSafeEQ'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.NullSafeNEQ'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Operator'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Or'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Overlaps'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Pow'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.core.PropertyEQ'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.string.RegexpFullMatch'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.string.RegexpILike'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.RegexpLike'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.SimilarTo'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Sub'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Xor'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Alias'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.BitwiseNot'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.IgnoreNulls'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Neg'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Not'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Paren'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.PivotAlias'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.RespectNulls'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Unary'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.temporal.UnixSeconds'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.aggregate.Ntile'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.aggregate.Rank'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.UnixMillis'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.array.ArraySize'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.aggregate.RowNumber'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.UnixMicros'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.aggregate.DenseRank'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.functions.Int64'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.core.ApproxDistinct'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.aggregate.CountIf'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.string.FromBase32'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.FromBase64'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.aggregate.LogicalOr'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.aggregate.LogicalAnd'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.string.Contains'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.core.In'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.core.Boolean'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.string.StartsWith'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.math.IsInf'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.core.Between'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.core.Any'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.functions.Exists'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.math.IsNan'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.core.All'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.string.EndsWith'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.temporal.TsOrDsToDate'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.TimeStrToDate'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.DiToDate'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.Date'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.StrToDate'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.DateStrToDate'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.LastDay'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.DateFromParts'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.CurrentDate'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.DatetimeSub'>: {'returns': <DType.DATETIME: 'DATETIME'>}, <class 'sqlglot.expressions.temporal.Datetime'>: {'returns': <DType.DATETIME: 'DATETIME'>}, <class 'sqlglot.expressions.temporal.DatetimeAdd'>: {'returns': <DType.DATETIME: 'DATETIME'>}, <class 'sqlglot.expressions.temporal.CurrentDatetime'>: {'returns': <DType.DATETIME: 'DATETIME'>}, <class 'sqlglot.expressions.aggregate.Kurtosis'>: {'annotator': <function _annotate_kurtosis>}, <class 'sqlglot.expressions.math.Pi'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Atanh'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Acos'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.Quantile'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Asinh'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.CumeDist'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Ln'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.math.Exp'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.math.Radians'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.CovarPop'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.StddevSamp'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Cbrt'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.math.Cosh'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.Stddev'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.SafeDivide'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.Avg'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Tan'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.VariancePop'>: {'annotator': <function _annotate_variance>}, <class 'sqlglot.expressions.string.ToDouble'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.functions.Rand'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.math.Sin'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.ApproxQuantile'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Acosh'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Atan'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.math.Log'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.PercentRank'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Asin'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.CovarSamp'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Degrees'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.PercentileCont'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Cot'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.StddevPop'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.Variance'>: {'annotator': <function _annotate_variance>}, <class 'sqlglot.expressions.math.Cos'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.Skewness'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.Sqrt'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.math.Tanh'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.math.Round'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.math.Sinh'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.temporal.TsOrDiToDi'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.DayOfMonth'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.string.Levenshtein'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.string.BitLength'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.Quarter'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.math.Getbit'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.Hour'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.string.Unicode'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.DateToDi'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.math.Sign'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.DayOfYear'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.DayOfWeek'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.string.StrPosition'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.string.Length'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.TimeDiff'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.TimestampDiff'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.string.Ascii'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.DatetimeDiff'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.UnixDate'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.JustifyDays'>: {'returns': <DType.INTERVAL: 'INTERVAL'>}, <class 'sqlglot.expressions.datatypes.Interval'>: {'returns': <DType.INTERVAL: 'INTERVAL'>}, <class 'sqlglot.expressions.temporal.MakeInterval'>: {'returns': <DType.INTERVAL: 'INTERVAL'>}, <class 'sqlglot.expressions.temporal.JustifyInterval'>: {'returns': <DType.INTERVAL: 'INTERVAL'>}, <class 'sqlglot.expressions.temporal.JustifyHours'>: {'returns': <DType.INTERVAL: 'INTERVAL'>}, <class 'sqlglot.expressions.json.ParseJSON'>: {'returns': <DType.JSON: 'JSON'>}, <class 'sqlglot.expressions.temporal.Time'>: {'returns': <DType.TIME: 'TIME'>}, <class 'sqlglot.expressions.temporal.TimeSub'>: {'returns': <DType.TIME: 'TIME'>}, <class 'sqlglot.expressions.temporal.CurrentTime'>: {'returns': <DType.TIME: 'TIME'>}, <class 'sqlglot.expressions.temporal.Localtime'>: {'returns': <DType.TIME: 'TIME'>}, <class 'sqlglot.expressions.temporal.TimeAdd'>: {'annotator': <function _annotate_date_or_time_add>}, <class 'sqlglot.expressions.temporal.TimestampLtzFromParts'>: {'returns': <DType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>}, <class 'sqlglot.expressions.temporal.CurrentTimestampLTZ'>: {'returns': <DType.TIMESTAMPTZ: 'TIMESTAMPTZ'>}, <class 'sqlglot.expressions.temporal.TimestampTzFromParts'>: {'returns': <DType.TIMESTAMPTZ: 'TIMESTAMPTZ'>}, <class 'sqlglot.expressions.temporal.TimeStrToTime'>: {'returns': <DType.TIMESTAMP: 'TIMESTAMP'>}, <class 'sqlglot.expressions.temporal.StrToTime'>: {'annotator': <function _annotate_str_to_time>}, <class 'sqlglot.expressions.temporal.TimestampAdd'>: {'returns': <DType.TIMESTAMP: 'TIMESTAMP'>}, <class 'sqlglot.expressions.temporal.TimestampSub'>: {'returns': <DType.TIMESTAMP: 'TIMESTAMP'>}, <class 'sqlglot.expressions.temporal.UnixToTime'>: {'returns': <DType.TIMESTAMP: 'TIMESTAMP'>}, <class 'sqlglot.expressions.temporal.CurrentTimestamp'>: {'returns': <DType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>}, <class 'sqlglot.expressions.temporal.YearOfWeekIso'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.Month'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.YearOfWeek'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.Year'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.WeekOfYear'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.Day'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.Week'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.temporal.DayOfWeekIso'>: {'returns': <DType.TINYINT: 'TINYINT'>}, <class 'sqlglot.expressions.string.MD5'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.TimeToTimeStr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Chr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.aggregate.GroupConcat'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.ToBase64'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Initcap'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.array.ArrayToString'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Space'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentCatalog'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.ConcatWs'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.query.RawString'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Translate'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.core.Typeof'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.SessionUser'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Substring'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.functions.CurrentVersion'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.String'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Lower'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentUser'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.TimeToStr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.ToBase32'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Repeat'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.UnixToStr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.Monthname'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentSchema'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Upper'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentRole'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.SHA2'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Concat'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Trim'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.DateToDateStr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.Dayname'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.UnixToTimeStr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.SHA'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.temporal.TsOrDsToDateStr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.math.Floor'>: {'annotator': <function _annotate_floor_ceil>}, <class 'sqlglot.expressions.math.Ceil'>: {'annotator': <function _annotate_floor_ceil>}, <class 'sqlglot.expressions.core.HavingMax'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.NthValue'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.query.Window'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.FirstValue'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Filter'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.query.Order'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.AnyValue'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.LastValue'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.ArrayConcatAgg'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.query.Limit'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArraySort'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArraySlice'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayReverse'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.math.Abs'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayConcat'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.functions.Coalesce'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.Min'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.functions.Least'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.functions.Greatest'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.Max'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayFirst'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.ArrayLast'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.core.Anonymous'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.DateSub'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.temporal.DateTrunc'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.temporal.DateAdd'>: {'annotator': <function _annotate_date_or_time_add>}, <class 'sqlglot.expressions.functions.TryCast'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.functions.Cast'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.VarMap'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.Map'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.array.Array'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.aggregate.ArrayAgg'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.core.Bracket'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.functions.Case'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.aggregate.Count'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.DateDiff'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.datatypes.DataType'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.Distinct'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.array.Explode'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.Extract'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.query.HexString'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.array.GenerateSeries'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.GenerateDateArray'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.GenerateTimestampArray'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.functions.If'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.aggregate.Lag'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.aggregate.Lead'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.Literal'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.Null'>: {'returns': <DType.NULL: 'NULL'>}, <class 'sqlglot.expressions.functions.Nullif'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.array.Struct'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.aggregate.Sum'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.Timestamp'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.array.ToMap'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.array.Unnest'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.core.WithinGroup'>: {'annotator': <function _annotate_within_group>}, <class 'sqlglot.expressions.query.Subquery'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.temporal.AddMonths'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.Mode'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.string.Right'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.string.Left'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.temporal.TimeSlice'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.temporal.TimestampTrunc'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.string.Pad'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.string.Stuff'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.aggregate.ApproxTopK'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.aggregate.ApproxTopKEstimate'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.array.ArrayAppend'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.array.ArrayCompact'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.array.ArrayConstructCompact'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.array.ArrayPrepend'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.array.ArrayRemove'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.array.ArraysZip'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.aggregate.ArrayUniqueAgg'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.aggregate.ArrayUnionAgg'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.array.MapKeys'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.string.RegexpExtractAll'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.string.Split'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.array.StringToArray'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.array.StrtokToArray'>: {'returns': <DType.ARRAY: 'ARRAY'>}, <class 'sqlglot.expressions.string.MD5NumberUpper64'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.math.BitmapBucketNumber'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.functions.Seq8'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.string.MD5NumberLower64'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.aggregate.GroupingId'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.math.BitmapBitPosition'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.functions.Zipf'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.math.Factorial'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.math.BitmapCount'>: {'returns': <DType.BIGINT: 'BIGINT'>}, <class 'sqlglot.expressions.string.DecompressBinary'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.SHA2Digest'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.DecryptRaw'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.MD5Digest'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.Unhex'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.Decrypt'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.SHA1Digest'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.Compress'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.ToBinary'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.TryBase64DecodeBinary'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.TryHexDecodeBinary'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.math.BitmapOrAgg'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.EncryptRaw'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.Encrypt'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.math.BitmapConstructAgg'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.Base64DecodeBinary'>: {'returns': <DType.BINARY: 'BINARY'>}, <class 'sqlglot.expressions.string.SearchIp'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.string.Search'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.math.BoolxorAgg'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.functions.IsNullValue'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.math.Boolor'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.array.MapContainsKey'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.math.Boolnot'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.math.Booland'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.functions.ToBoolean'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.functions.EqualNull'>: {'returns': <DType.BOOLEAN: 'BOOLEAN'>}, <class 'sqlglot.expressions.temporal.PreviousDay'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.temporal.NextDay'>: {'returns': <DType.DATE: 'DATE'>}, <class 'sqlglot.expressions.math.BitwiseAndAgg'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.math.BitwiseOrAgg'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.math.BitwiseXorAgg'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.string.RegexpCount'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.string.RegexpInstr'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.string.ToNumber'>: {'annotator': <function <dictcomp>.<lambda>>}, <class 'sqlglot.expressions.temporal.MonthsBetween'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.ManhattanDistance'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.functions.Normal'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.ApproximateSimilarity'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.EuclideanDistance'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.DotProduct'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.math.CosineDistance'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.aggregate.ApproxPercentileEstimate'>: {'returns': <DType.DOUBLE: 'DOUBLE'>}, <class 'sqlglot.expressions.string.ToDecfloat'>: {'returns': <DType.DECFLOAT: 'DECFLOAT'>}, <class 'sqlglot.expressions.string.TryToDecfloat'>: {'returns': <DType.DECFLOAT: 'DECFLOAT'>}, <class 'sqlglot.expressions.math.Atan2'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.RegrSxx'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.RegrR2'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.RegrValx'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.RegrCount'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.RegrAvgx'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.RegrSxy'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.RegrSlope'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.RegrValy'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.RegrIntercept'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.RegrSyy'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.aggregate.RegrAvgy'>: {'annotator': <function _annotate_math_with_float_decfloat>}, <class 'sqlglot.expressions.functions.Seq4'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.math.JarowinklerSimilarity'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.Minute'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.aggregate.Grouping'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.string.RtrimmedLength'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.functions.Seq2'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.functions.Seq1'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.functions.WidthBucket'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.array.MapSize'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.string.ByteLength'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.temporal.Second'>: {'returns': <DType.INT: 'INT'>}, <class 'sqlglot.expressions.functions.XMLGet'>: {'returns': <DType.OBJECT: 'OBJECT'>}, <class 'sqlglot.expressions.aggregate.ApproxPercentileAccumulate'>: {'returns': <DType.OBJECT: 'OBJECT'>}, <class 'sqlglot.expressions.aggregate.ApproxTopKCombine'>: {'returns': <DType.OBJECT: 'OBJECT'>}, <class 'sqlglot.expressions.functions.ParseIp'>: {'returns': <DType.OBJECT: 'OBJECT'>}, <class 'sqlglot.expressions.string.ParseUrl'>: {'returns': <DType.OBJECT: 'OBJECT'>}, <class 'sqlglot.expressions.aggregate.ApproxTopKAccumulate'>: {'returns': <DType.OBJECT: 'OBJECT'>}, <class 'sqlglot.expressions.aggregate.ObjectAgg'>: {'returns': <DType.OBJECT: 'OBJECT'>}, <class 'sqlglot.expressions.aggregate.ApproxPercentileCombine'>: {'returns': <DType.OBJECT: 'OBJECT'>}, <class 'sqlglot.expressions.array.MapCat'>: {'returns': <DType.MAP: 'MAP'>}, <class 'sqlglot.expressions.array.MapPick'>: {'returns': <DType.MAP: 'MAP'>}, <class 'sqlglot.expressions.array.MapDelete'>: {'returns': <DType.MAP: 'MAP'>}, <class 'sqlglot.expressions.array.MapInsert'>: {'returns': <DType.MAP: 'MAP'>}, <class 'sqlglot.expressions.string.ToFile'>: {'returns': <DType.FILE: 'FILE'>}, <class 'sqlglot.expressions.temporal.TimeFromParts'>: {'returns': <DType.TIME: 'TIME'>}, <class 'sqlglot.expressions.temporal.TsOrDsToTime'>: {'returns': <DType.TIME: 'TIME'>}, <class 'sqlglot.expressions.temporal.Localtimestamp'>: {'returns': <DType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>}, <class 'sqlglot.expressions.functions.CurrentTransaction'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentSession'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.SplitPart'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.SoundexP123'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.Uuid'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Base64DecodeString'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CheckXml'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentSchemas'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentRoleType'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentAccountName'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.json.CheckJson'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentRegion'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.HexDecodeString'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.TryBase64DecodeString'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.aggregate.AIAgg'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Replace'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentOrganizationName'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.Randstr'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentDatabase'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.RegexpReplace'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.RegexpExtract'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.TryHexDecodeString'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentStatement'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Strtok'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Base64Encode'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Soundex'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentSecondaryRoles'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentClient'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.DecompressString'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentAvailableRoles'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentAccount'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.aggregate.AISummarizeAgg'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentOrganizationUser'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.string.Hex'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.AIClassify'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentIpAddress'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.CurrentWarehouse'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.functions.Collation'>: {'returns': <DType.VARCHAR: 'VARCHAR'>}, <class 'sqlglot.expressions.aggregate.Minhash'>: {'returns': <DType.VARIANT: 'VARIANT'>}, <class 'sqlglot.expressions.aggregate.MinhashCombine'>: {'returns': <DType.VARIANT: 'VARIANT'>}, <class 'sqlglot.expressions.aggregate.ArgMax'>: {'annotator': <function _annotate_arg_max_min>}, <class 'sqlglot.expressions.aggregate.ArgMin'>: {'annotator': <function _annotate_arg_max_min>}, <class 'sqlglot.expressions.temporal.ConvertTimezone'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.functions.DecodeCase'>: {'annotator': <function _annotate_decode_case>}, <class 'sqlglot.expressions.core.HashAgg'>: {'annotator': <function <lambda>>}, <class 'sqlglot.expressions.aggregate.Median'>: {'annotator': <function _annotate_median>}, <class 'sqlglot.expressions.string.Reverse'>: {'annotator': <function _annotate_reverse>}, <class 'sqlglot.expressions.temporal.TimestampFromParts'>: {'annotator': <function _annotate_timestamp_from_parts>}}
INITCAP_DEFAULT_DELIMITER_CHARS = ' \t\n\r\x0c\x0b!?@"^#$&~_,.:;+\\-*%/|\\[\\](){}<>'
INVERSE_TIME_MAPPING: dict[str, str] = {'%Y': 'yyyy', '%y': 'yy', '%B': 'mmmm', '%b': 'mon', '%m': 'mm', '%d': 'DD', '%a': 'DY', '%H': 'hh24', '%I': 'hh12', '%M': 'mi', '%S': 'ss', '%f_nine': 'ff9', '%f_zero': 'ff0', '%f_one': 'ff1', '%f_two': 'ff2', '%f_three': 'ff3', '%f_four': 'ff4', '%f_five': 'ff5', '%f': 'ff6', '%f_seven': 'ff7', '%f_eight': 'ff8', '%z': 'tzhtzm', '%:z': 'tzh:tzm', '%-z': 'tzh', '%p': 'pm', 'T': 'T', '%-d': 'DD', '%mstrict': 'mm', '%dstrict': 'DD', '%Hstrict': 'hh24', '%Istrict': 'hh12', '%Mstrict': 'mi', '%Sstrict': 'ss'}
TIME_MAPPING: dict[str, str] = {'YYYY': '%Y', 'YYYy': '%Y', 'YYyY': '%Y', 'YYyy': '%Y', 'YyYY': '%Y', 'YyYy': '%Y', 'YyyY': '%Y', 'Yyyy': '%Y', 'yYYY': '%Y', 'yYYy': '%Y', 'yYyY': '%Y', 'yYyy': '%Y', 'yyYY': '%Y', 'yyYy': '%Y', 'yyyY': '%Y', 'yyyy': '%Y', 'YY': '%y', 'Yy': '%y', 'yY': '%y', 'yy': '%y', 'MMMM': '%B', 'MMMm': '%B', 'MMmM': '%B', 'MMmm': '%B', 'MmMM': '%B', 'MmMm': '%B', 'MmmM': '%B', 'Mmmm': '%B', 'mMMM': '%B', 'mMMm': '%B', 'mMmM': '%B', 'mMmm': '%B', 'mmMM': '%B', 'mmMm': '%B', 'mmmM': '%B', 'mmmm': '%B', 'MON': '%b', 'MOn': '%b', 'MoN': '%b', 'Mon': '%b', 'mON': '%b', 'mOn': '%b', 'moN': '%b', 'mon': '%b', 'MM': '%m', 'Mm': '%m', 'mM': '%m', 'mm': '%m', 'DD': '%d', 'Dd': '%d', 'dD': '%d', 'dd': '%d', 'DY': '%a', 'Dy': '%a', 'dY': '%a', 'dy': '%a', 'HH24': '%H', 'Hh24': '%H', 'hH24': '%H', 'hh24': '%H', 'HH12': '%I', 'Hh12': '%I', 'hH12': '%I', 'hh12': '%I', 'MI': '%M', 'Mi': '%M', 'mI': '%M', 'mi': '%M', 'SS': '%S', 'Ss': '%S', 'sS': '%S', 'ss': '%S', 'FF': '%f_nine', 'Ff': '%f_nine', 'fF': '%f_nine', 'ff': '%f_nine', 'FF0': '%f_zero', 'Ff0': '%f_zero', 'fF0': '%f_zero', 'ff0': '%f_zero', 'FF1': '%f_one', 'Ff1': '%f_one', 'fF1': '%f_one', 'ff1': '%f_one', 'FF2': '%f_two', 'Ff2': '%f_two', 'fF2': '%f_two', 'ff2': '%f_two', 'FF3': '%f_three', 'Ff3': '%f_three', 'fF3': '%f_three', 'ff3': '%f_three', 'FF4': '%f_four', 'Ff4': '%f_four', 'fF4': '%f_four', 'ff4': '%f_four', 'FF5': '%f_five', 'Ff5': '%f_five', 'fF5': '%f_five', 'ff5': '%f_five', 'FF6': '%f', 'Ff6': '%f', 'fF6': '%f', 'ff6': '%f', 'FF7': '%f_seven', 'Ff7': '%f_seven', 'fF7': '%f_seven', 'ff7': '%f_seven', 'FF8': '%f_eight', 'Ff8': '%f_eight', 'fF8': '%f_eight', 'ff8': '%f_eight', 'FF9': '%f_nine', 'Ff9': '%f_nine', 'fF9': '%f_nine', 'ff9': '%f_nine', 'TZHTZM': '%z', 'TZHTZm': '%z', 'TZHTzM': '%z', 'TZHTzm': '%z', 'TZHtZM': '%z', 'TZHtZm': '%z', 'TZHtzM': '%z', 'TZHtzm': '%z', 'TZhTZM': '%z', 'TZhTZm': '%z', 'TZhTzM': '%z', 'TZhTzm': '%z', 'TZhtZM': '%z', 'TZhtZm': '%z', 'TZhtzM': '%z', 'TZhtzm': '%z', 'TzHTZM': '%z', 'TzHTZm': '%z', 'TzHTzM': '%z', 'TzHTzm': '%z', 'TzHtZM': '%z', 'TzHtZm': '%z', 'TzHtzM': '%z', 'TzHtzm': '%z', 'TzhTZM': '%z', 'TzhTZm': '%z', 'TzhTzM': '%z', 'TzhTzm': '%z', 'TzhtZM': '%z', 'TzhtZm': '%z', 'TzhtzM': '%z', 'Tzhtzm': '%z', 'tZHTZM': '%z', 'tZHTZm': '%z', 'tZHTzM': '%z', 'tZHTzm': '%z', 'tZHtZM': '%z', 'tZHtZm': '%z', 'tZHtzM': '%z', 'tZHtzm': '%z', 'tZhTZM': '%z', 'tZhTZm': '%z', 'tZhTzM': '%z', 'tZhTzm': '%z', 'tZhtZM': '%z', 'tZhtZm': '%z', 'tZhtzM': '%z', 'tZhtzm': '%z', 'tzHTZM': '%z', 'tzHTZm': '%z', 'tzHTzM': '%z', 'tzHTzm': '%z', 'tzHtZM': '%z', 'tzHtZm': '%z', 'tzHtzM': '%z', 'tzHtzm': '%z', 'tzhTZM': '%z', 'tzhTZm': '%z', 'tzhTzM': '%z', 'tzhTzm': '%z', 'tzhtZM': '%z', 'tzhtZm': '%z', 'tzhtzM': '%z', 'tzhtzm': '%z', 'TZH:TZM': '%:z', 'TZH:TZm': '%:z', 'TZH:TzM': '%:z', 'TZH:Tzm': '%:z', 'TZH:tZM': '%:z', 'TZH:tZm': '%:z', 'TZH:tzM': '%:z', 'TZH:tzm': '%:z', 'TZh:TZM': '%:z', 'TZh:TZm': '%:z', 'TZh:TzM': '%:z', 'TZh:Tzm': '%:z', 'TZh:tZM': '%:z', 'TZh:tZm': '%:z', 'TZh:tzM': '%:z', 'TZh:tzm': '%:z', 'TzH:TZM': '%:z', 'TzH:TZm': '%:z', 'TzH:TzM': '%:z', 'TzH:Tzm': '%:z', 'TzH:tZM': '%:z', 'TzH:tZm': '%:z', 'TzH:tzM': '%:z', 'TzH:tzm': '%:z', 'Tzh:TZM': '%:z', 'Tzh:TZm': '%:z', 'Tzh:TzM': '%:z', 'Tzh:Tzm': '%:z', 'Tzh:tZM': '%:z', 'Tzh:tZm': '%:z', 'Tzh:tzM': '%:z', 'Tzh:tzm': '%:z', 'tZH:TZM': '%:z', 'tZH:TZm': '%:z', 'tZH:TzM': '%:z', 'tZH:Tzm': '%:z', 'tZH:tZM': '%:z', 'tZH:tZm': '%:z', 'tZH:tzM': '%:z', 'tZH:tzm': '%:z', 'tZh:TZM': '%:z', 'tZh:TZm': '%:z', 'tZh:TzM': '%:z', 'tZh:Tzm': '%:z', 'tZh:tZM': '%:z', 'tZh:tZm': '%:z', 'tZh:tzM': '%:z', 'tZh:tzm': '%:z', 'tzH:TZM': '%:z', 'tzH:TZm': '%:z', 'tzH:TzM': '%:z', 'tzH:Tzm': '%:z', 'tzH:tZM': '%:z', 'tzH:tZm': '%:z', 'tzH:tzM': '%:z', 'tzH:tzm': '%:z', 'tzh:TZM': '%:z', 'tzh:TZm': '%:z', 'tzh:TzM': '%:z', 'tzh:Tzm': '%:z', 'tzh:tZM': '%:z', 'tzh:tZm': '%:z', 'tzh:tzM': '%:z', 'tzh:tzm': '%:z', 'TZH': '%-z', 'TZh': '%-z', 'TzH': '%-z', 'Tzh': '%-z', 'tZH': '%-z', 'tZh': '%-z', 'tzH': '%-z', 'tzh': '%-z', 'AM': '%p', 'Am': '%p', 'aM': '%p', 'am': '%p', 'PM': '%p', 'Pm': '%p', 'pM': '%p', 'pm': '%p', '"T"': 'T'}

Associates this dialect's time formats with their equivalent Python strftime formats.

DATE_PART_MAPPING = {'Y': 'YEAR', 'YY': 'YEAR', 'YYY': 'YEAR', 'YYYY': 'YEAR', 'YR': 'YEAR', 'YEARS': 'YEAR', 'YRS': 'YEAR', 'MM': 'MONTH', 'MON': 'MONTH', 'MONS': 'MONTH', 'MONTHS': 'MONTH', 'D': 'DAY', 'DD': 'DAY', 'DAYS': 'DAY', 'DAYOFMONTH': 'DAY', 'DAY OF WEEK': 'DAYOFWEEK', 'WEEKDAY': 'DAYOFWEEK', 'DOW': 'DAYOFWEEK', 'DW': 'DAYOFWEEK', 'WEEKDAY_ISO': 'DAYOFWEEKISO', 'DOW_ISO': 'DAYOFWEEKISO', 'DW_ISO': 'DAYOFWEEKISO', 'DAYOFWEEK_ISO': 'DAYOFWEEKISO', 'DAY OF YEAR': 'DAYOFYEAR', 'DOY': 'DAYOFYEAR', 'DY': 'DAYOFYEAR', 'W': 'WEEK', 'WK': 'WEEK', 'WEEKOFYEAR': 'WEEK', 'WOY': 'WEEK', 'WY': 'WEEK', 'WEEK_ISO': 'WEEKISO', 'WEEKOFYEARISO': 'WEEKISO', 'WEEKOFYEAR_ISO': 'WEEKISO', 'Q': 'QUARTER', 'QTR': 'QUARTER', 'QTRS': 'QUARTER', 'QUARTERS': 'QUARTER', 'H': 'HOUR', 'HH': 'HOUR', 'HR': 'HOUR', 'HOURS': 'HOUR', 'HRS': 'HOUR', 'M': 'MINUTE', 'MI': 'MINUTE', 'MIN': 'MINUTE', 'MINUTES': 'MINUTE', 'MINS': 'MINUTE', 'S': 'SECOND', 'SEC': 'SECOND', 'SECONDS': 'SECOND', 'SECS': 'SECOND', 'MS': 'MILLISECOND', 'MSEC': 'MILLISECOND', 'MSECS': 'MILLISECOND', 'MSECOND': 'MILLISECOND', 'MSECONDS': 'MILLISECOND', 'MILLISEC': 'MILLISECOND', 'MILLISECS': 'MILLISECOND', 'MILLISECON': 'MILLISECOND', 'MILLISECONDS': 'MILLISECOND', 'US': 'MICROSECOND', 'USEC': 'MICROSECOND', 'USECS': 'MICROSECOND', 'MICROSEC': 'MICROSECOND', 'MICROSECS': 'MICROSECOND', 'USECOND': 'MICROSECOND', 'USECONDS': 'MICROSECOND', 'MICROSECONDS': 'MICROSECOND', 'NS': 'NANOSECOND', 'NSEC': 'NANOSECOND', 'NANOSEC': 'NANOSECOND', 'NSECOND': 'NANOSECOND', 'NSECONDS': 'NANOSECOND', 'NANOSECS': 'NANOSECOND', 'EPOCH_SECOND': 'EPOCH_SECOND', 'EPOCH_SECONDS': 'EPOCH_SECOND', 'EPOCH_MILLISECONDS': 'EPOCH_MILLISECOND', 'EPOCH_MICROSECONDS': 'EPOCH_MICROSECOND', 'EPOCH_NANOSECONDS': 'EPOCH_NANOSECOND', 'TZH': 'TIMEZONE_HOUR', 'TZM': 'TIMEZONE_MINUTE', 'DEC': 'DECADE', 'DECS': 'DECADE', 'DECADES': 'DECADE', 'MIL': 'MILLENNIUM', 'MILS': 'MILLENNIUM', 'MILLENIA': 'MILLENNIUM', 'C': 'CENTURY', 'CENT': 'CENTURY', 'CENTS': 'CENTURY', 'CENTURIES': 'CENTURY', 'ISOWEEK': 'WEEKISO'}
PSEUDOCOLUMNS: set[str] = {'LEVEL'}

Columns that are auto-generated by the engine corresponding to this dialect. For example, such columns may be excluded from SELECT * queries.

def can_quote( self, identifier: sqlglot.expressions.core.Identifier, identify: str | bool = 'safe') -> bool:
111    def can_quote(self, identifier: exp.Identifier, identify: str | bool = "safe") -> bool:
112        # This disables quoting DUAL in SELECT ... FROM DUAL, because Snowflake treats an
113        # unquoted DUAL keyword in a special way and does not map it to a user-defined table
114        return super().can_quote(identifier, identify) and not (
115            isinstance(identifier.parent, exp.Table)
116            and not identifier.quoted
117            and identifier.name.lower() == "dual"
118        )

Checks if an identifier can be quoted

Arguments:
  • identifier: The identifier to check.
  • identify: True: Always returns True except for certain cases. "safe": Only returns True if the identifier is case-insensitive. "unsafe": Only returns True if the identifier is case-sensitive.
Returns:

Whether the given text can be identified.

SUPPORTS_COLUMN_JOIN_MARKS = True

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

STRINGS_SUPPORT_ESCAPED_SEQUENCES: bool = True

Whether string literals support escape sequences (e.g. \n). Set by the metaclass based on the tokenizer's STRING_ESCAPES.

BYTE_STRINGS_SUPPORT_ESCAPED_SEQUENCES: bool = True

Whether byte string literals support escape sequences. Set by the metaclass based on the tokenizer's BYTE_STRING_ESCAPES.

IDENTIFIER_ESCAPED_SEQUENCES: dict[str, str] = {}

Mapping of an identifier escape char (\) to its escaped version (\\). Set by the metaclass based on the tokenizer's IDENTIFIER_ESCAPES.

tokenizer_class = <class 'Snowflake.Tokenizer'>
jsonpath_tokenizer_class = <class 'Snowflake.JSONPathTokenizer'>
TIME_TRIE: dict = {'Y': {'Y': {'Y': {'Y': {0: True}, 'y': {0: True}}, 'y': {'Y': {0: True}, 'y': {0: True}}, 0: True}, 'y': {'Y': {'Y': {0: True}, 'y': {0: True}}, 'y': {'Y': {0: True}, 'y': {0: True}}, 0: True}}, 'y': {'Y': {'Y': {'Y': {0: True}, 'y': {0: True}}, 'y': {'Y': {0: True}, 'y': {0: True}}, 0: True}, 'y': {'Y': {'Y': {0: True}, 'y': {0: True}}, 'y': {'Y': {0: True}, 'y': {0: True}}, 0: True}}, 'M': {'M': {'M': {'M': {0: True}, 'm': {0: True}}, 'm': {'M': {0: True}, 'm': {0: True}}, 0: True}, 'm': {'M': {'M': {0: True}, 'm': {0: True}}, 'm': {'M': {0: True}, 'm': {0: True}}, 0: True}, 'O': {'N': {0: True}, 'n': {0: True}}, 'o': {'N': {0: True}, 'n': {0: True}}, 'I': {0: True}, 'i': {0: True}}, 'm': {'M': {'M': {'M': {0: True}, 'm': {0: True}}, 'm': {'M': {0: True}, 'm': {0: True}}, 0: True}, 'm': {'M': {'M': {0: True}, 'm': {0: True}}, 'm': {'M': {0: True}, 'm': {0: True}}, 0: True}, 'O': {'N': {0: True}, 'n': {0: True}}, 'o': {'N': {0: True}, 'n': {0: True}}, 'I': {0: True}, 'i': {0: True}}, 'D': {'D': {0: True}, 'd': {0: True}, 'Y': {0: True}, 'y': {0: True}}, 'd': {'D': {0: True}, 'd': {0: True}, 'Y': {0: True}, 'y': {0: True}}, 'H': {'H': {'2': {'4': {0: True}}, '1': {'2': {0: True}}}, 'h': {'2': {'4': {0: True}}, '1': {'2': {0: True}}}}, 'h': {'H': {'2': {'4': {0: True}}, '1': {'2': {0: True}}}, 'h': {'2': {'4': {0: True}}, '1': {'2': {0: True}}}}, 'S': {'S': {0: True}, 's': {0: True}}, 's': {'S': {0: True}, 's': {0: True}}, 'F': {'F': {0: True, '0': {0: True}, '1': {0: True}, '2': {0: True}, '3': {0: True}, '4': {0: True}, '5': {0: True}, '6': {0: True}, '7': {0: True}, '8': {0: True}, '9': {0: True}}, 'f': {0: True, '0': {0: True}, '1': {0: True}, '2': {0: True}, '3': {0: True}, '4': {0: True}, '5': {0: True}, '6': {0: True}, '7': {0: True}, '8': {0: True}, '9': {0: True}}}, 'f': {'F': {0: True, '0': {0: True}, '1': {0: True}, '2': {0: True}, '3': {0: True}, '4': {0: True}, '5': {0: True}, '6': {0: True}, '7': {0: True}, '8': {0: True}, '9': {0: True}}, 'f': {0: True, '0': {0: True}, '1': {0: True}, '2': {0: True}, '3': {0: True}, '4': {0: True}, '5': {0: True}, '6': {0: True}, '7': {0: True}, '8': {0: True}, '9': {0: True}}}, 'T': {'Z': {'H': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}, 'h': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}}, 'z': {'H': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}, 'h': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}}}, 't': {'Z': {'H': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}, 'h': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}}, 'z': {'H': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}, 'h': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}}}, 'A': {'M': {0: True}, 'm': {0: True}}, 'a': {'M': {0: True}, 'm': {0: True}}, 'P': {'M': {0: True}, 'm': {0: True}}, 'p': {'M': {0: True}, 'm': {0: True}}, '"': {'T': {'"': {0: True}}}}
FORMAT_TRIE: dict = {'Y': {'Y': {'Y': {'Y': {0: True}, 'y': {0: True}}, 'y': {'Y': {0: True}, 'y': {0: True}}, 0: True}, 'y': {'Y': {'Y': {0: True}, 'y': {0: True}}, 'y': {'Y': {0: True}, 'y': {0: True}}, 0: True}}, 'y': {'Y': {'Y': {'Y': {0: True}, 'y': {0: True}}, 'y': {'Y': {0: True}, 'y': {0: True}}, 0: True}, 'y': {'Y': {'Y': {0: True}, 'y': {0: True}}, 'y': {'Y': {0: True}, 'y': {0: True}}, 0: True}}, 'M': {'M': {'M': {'M': {0: True}, 'm': {0: True}}, 'm': {'M': {0: True}, 'm': {0: True}}, 0: True}, 'm': {'M': {'M': {0: True}, 'm': {0: True}}, 'm': {'M': {0: True}, 'm': {0: True}}, 0: True}, 'O': {'N': {0: True}, 'n': {0: True}}, 'o': {'N': {0: True}, 'n': {0: True}}, 'I': {0: True}, 'i': {0: True}}, 'm': {'M': {'M': {'M': {0: True}, 'm': {0: True}}, 'm': {'M': {0: True}, 'm': {0: True}}, 0: True}, 'm': {'M': {'M': {0: True}, 'm': {0: True}}, 'm': {'M': {0: True}, 'm': {0: True}}, 0: True}, 'O': {'N': {0: True}, 'n': {0: True}}, 'o': {'N': {0: True}, 'n': {0: True}}, 'I': {0: True}, 'i': {0: True}}, 'D': {'D': {0: True}, 'd': {0: True}, 'Y': {0: True}, 'y': {0: True}}, 'd': {'D': {0: True}, 'd': {0: True}, 'Y': {0: True}, 'y': {0: True}}, 'H': {'H': {'2': {'4': {0: True}}, '1': {'2': {0: True}}}, 'h': {'2': {'4': {0: True}}, '1': {'2': {0: True}}}}, 'h': {'H': {'2': {'4': {0: True}}, '1': {'2': {0: True}}}, 'h': {'2': {'4': {0: True}}, '1': {'2': {0: True}}}}, 'S': {'S': {0: True}, 's': {0: True}}, 's': {'S': {0: True}, 's': {0: True}}, 'F': {'F': {0: True, '0': {0: True}, '1': {0: True}, '2': {0: True}, '3': {0: True}, '4': {0: True}, '5': {0: True}, '6': {0: True}, '7': {0: True}, '8': {0: True}, '9': {0: True}}, 'f': {0: True, '0': {0: True}, '1': {0: True}, '2': {0: True}, '3': {0: True}, '4': {0: True}, '5': {0: True}, '6': {0: True}, '7': {0: True}, '8': {0: True}, '9': {0: True}}}, 'f': {'F': {0: True, '0': {0: True}, '1': {0: True}, '2': {0: True}, '3': {0: True}, '4': {0: True}, '5': {0: True}, '6': {0: True}, '7': {0: True}, '8': {0: True}, '9': {0: True}}, 'f': {0: True, '0': {0: True}, '1': {0: True}, '2': {0: True}, '3': {0: True}, '4': {0: True}, '5': {0: True}, '6': {0: True}, '7': {0: True}, '8': {0: True}, '9': {0: True}}}, 'T': {'Z': {'H': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}, 'h': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}}, 'z': {'H': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}, 'h': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}}}, 't': {'Z': {'H': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}, 'h': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}}, 'z': {'H': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}, 'h': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, ':': {'T': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}, 't': {'Z': {'M': {0: True}, 'm': {0: True}}, 'z': {'M': {0: True}, 'm': {0: True}}}}, 0: True}}}, 'A': {'M': {0: True}, 'm': {0: True}}, 'a': {'M': {0: True}, 'm': {0: True}}, 'P': {'M': {0: True}, 'm': {0: True}}, 'p': {'M': {0: True}, 'm': {0: True}}, '"': {'T': {'"': {0: True}}}}
INVERSE_TIME_TRIE: dict = {'%': {'Y': {0: True}, 'y': {0: True}, 'B': {0: True}, 'b': {0: True}, 'm': {0: True, 's': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'd': {0: True, 's': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'a': {0: True}, 'H': {0: True, 's': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'I': {0: True, 's': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'M': {0: True, 's': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'S': {0: True, 's': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'f': {'_': {'n': {'i': {'n': {'e': {0: True}}}}, 'z': {'e': {'r': {'o': {0: True}}}}, 'o': {'n': {'e': {0: True}}}, 't': {'w': {'o': {0: True}}, 'h': {'r': {'e': {'e': {0: True}}}}}, 'f': {'o': {'u': {'r': {0: True}}}, 'i': {'v': {'e': {0: True}}}}, 's': {'e': {'v': {'e': {'n': {0: True}}}}}, 'e': {'i': {'g': {'h': {'t': {0: True}}}}}}, 0: True}, 'z': {0: True}, ':': {'z': {0: True}}, '-': {'z': {0: True}, 'd': {0: True}}, 'p': {0: True}}, 'T': {0: True}}
INVERSE_FORMAT_MAPPING: dict[str, str] = {'%mstrict': '%m', '%dstrict': '%d', '%Hstrict': '%H', '%Istrict': '%I', '%Mstrict': '%M', '%Sstrict': '%S'}
INVERSE_FORMAT_TRIE: dict = {'%': {'m': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'd': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'H': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'I': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'M': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'S': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}}}
INVERSE_CREATABLE_KIND_MAPPING: dict[str, str] = {}
ESCAPED_SEQUENCES: dict[str, str] = {'\x08': '\\b', '\x0c': '\\f', '\n': '\\n', '\r': '\\r', '\t': '\\t', '\\': '\\\\', '\x00': '\\x00', '\x01': '\\x01', '\x02': '\\x02', '\x03': '\\x03', '\x04': '\\x04', '\x05': '\\x05', '\x06': '\\x06', '\x07': '\\x07', '\x0b': '\\x0b', '\x0e': '\\x0e', '\x0f': '\\x0f', '\x10': '\\x10', '\x11': '\\x11', '\x12': '\\x12', '\x13': '\\x13', '\x14': '\\x14', '\x15': '\\x15', '\x16': '\\x16', '\x17': '\\x17', '\x18': '\\x18', '\x19': '\\x19', '\x1a': '\\x1a', '\x1b': '\\x1b', '\x1c': '\\x1c', '\x1d': '\\x1d', '\x1e': '\\x1e', '\x1f': '\\x1f', '\x7f': '\\x7f'}
QUOTE_START = "'"
QUOTE_END = "'"
IDENTIFIER_START = '"'
IDENTIFIER_END = '"'
VALID_INTERVAL_UNITS: set[str] = {'QUARTER', 'D', 'QTR', 'MILLISEC', 'DD', 'WEEKDAY', 'DAYS', 'WEEKISO', 'MONS', 'TZM', 'NS', 'DEC', 'NANOSEC', 'YYY', 'QUARTERS', 'CENTS', 'EPOCH_NANOSECOND', 'MON', 'TIMEZONE_HOUR', 'MONTH', 'HOURS', 'NSEC', 'MSECS', 'MILLENNIUM', 'WOY', 'MILLISECOND', 'EPOCH_MICROSECONDS', 'DAYOFWEEKISO', 'WY', 'WEEKOFYEAR', 'MI', 'H', 'DW_ISO', 'M', 'Y', 'DOY', 'C', 'DAYOFWEEK', 'DAY OF WEEK', 'YYYY', 'USEC', 'TIMEZONE_MINUTE', 'YY', 'WEEKOFYEAR_ISO', 'HRS', 'MINUTES', 'ISOWEEK', 'DECS', 'NSECOND', 'MILLENIA', 'MILS', 'DOW_ISO', 'USECONDS', 'MSEC', 'DECADE', 'MICROSEC', 'MINUTE', 'MICROSECS', 'MILLISECONDS', 'YEAR', 'YR', 'NANOSECS', 'CENTURIES', 'CENTURY', 'WK', 'DW', 'YRS', 'DECADES', 'US', 'HH', 'DAY', 'EPOCH_MILLISECOND', 'MIL', 'YEARS', 'DAYOFMONTH', 'WEEKOFYEARISO', 'S', 'WEEK', 'SECS', 'EPOCH', 'MS', 'USECOND', 'QTRS', 'MILLISECON', 'SECOND', 'MINS', 'MSECONDS', 'DAYOFWEEK_ISO', 'SEC', 'MSECOND', 'NSECONDS', 'EPOCH_NANOSECONDS', 'W', 'MM', 'EPOCH_MICROSECOND', 'EPOCH_SECONDS', 'EPOCH_SECOND', 'EPOCH_MILLISECONDS', 'MONTHS', 'SECONDS', 'DAY OF YEAR', 'MILLISECS', 'Q', 'HR', 'DOW', 'MICROSECOND', 'WEEKDAY_ISO', 'HOUR', 'USECS', 'MIN', 'WEEK_ISO', 'MICROSECONDS', 'DAYOFYEAR', 'NANOSECOND', 'TZH', 'CENT', 'DY'}
BIT_START: str | None = None
BIT_END: str | None = None
HEX_START: str | None = "x'"
HEX_END: str | None = "'"
BYTE_START: str | None = None
BYTE_END: str | None = None
UNICODE_START: str | None = None
UNICODE_END: str | None = None
class Snowflake.JSONPathTokenizer(sqlglot.jsonpath.JSONPathTokenizer):
120    class JSONPathTokenizer(jsonpath.JSONPathTokenizer):
121        SINGLE_TOKENS = jsonpath.JSONPathTokenizer.SINGLE_TOKENS.copy()
122        SINGLE_TOKENS.pop("$")
SINGLE_TOKENS = {'(': <TokenType.L_PAREN: 1>, ')': <TokenType.R_PAREN: 2>, '[': <TokenType.L_BRACKET: 3>, ']': <TokenType.R_BRACKET: 4>, ':': <TokenType.COLON: 11>, ',': <TokenType.COMMA: 7>, '-': <TokenType.DASH: 9>, '.': <TokenType.DOT: 8>, '?': <TokenType.PLACEHOLDER: 361>, '@': <TokenType.PARAMETER: 58>, "'": <TokenType.QUOTE: 374>, '"': <TokenType.QUOTE: 374>, '*': <TokenType.STAR: 20>}
class Snowflake.Tokenizer(sqlglot.tokens.Tokenizer):
126    class Tokenizer(tokens.Tokenizer):
127        STRING_ESCAPES = ["\\", "'"]
128        NUMERIC_ESCAPES = {"x": (16, 2, 2, 0xFF), "u": (16, 4, 4, 0xFFFF), "0": (8, 1, 3, 0xFF)}
129        DROP_UNKNOWN_ESCAPES = True
130        HEX_STRINGS = [("x'", "'"), ("X'", "'")]
131        RAW_STRINGS = ["$$"]
132        COMMENTS = ["--", "//", ("/*", "*/")]
133        NESTED_COMMENTS = False
134
135        KEYWORDS = {
136            **tokens.Tokenizer.KEYWORDS,
137            "(+)": TokenType.JOIN_MARKER,
138            "BYTEINT": TokenType.INT,
139            "FILE://": TokenType.URI_START,
140            "FILE FORMAT": TokenType.FILE_FORMAT,
141            "GET": TokenType.GET,
142            "INTEGRATION": TokenType.INTEGRATION,
143            "LS": TokenType.LIST,
144            "MATCH_CONDITION": TokenType.MATCH_CONDITION,
145            "MATCH_RECOGNIZE": TokenType.MATCH_RECOGNIZE,
146            "MINUS": TokenType.EXCEPT,
147            "NCHAR VARYING": TokenType.VARCHAR,
148            "PACKAGE": TokenType.PACKAGE,
149            "POLICY": TokenType.POLICY,
150            "POOL": TokenType.POOL,
151            "PUT": TokenType.PUT,
152            "UNDROP": TokenType.UNDROP,
153            "REMOVE": TokenType.COMMAND,
154            "RM": TokenType.COMMAND,
155            "ROLE": TokenType.ROLE,
156            "RULE": TokenType.RULE,
157            "SAMPLE": TokenType.TABLE_SAMPLE,
158            "SEMANTIC VIEW": TokenType.SEMANTIC_VIEW,
159            "SQL_DOUBLE": TokenType.DOUBLE,
160            "SQL_VARCHAR": TokenType.VARCHAR,
161            "STAGE": TokenType.STAGE,
162            "STORAGE INTEGRATION": TokenType.STORAGE_INTEGRATION,
163            "STREAMLIT": TokenType.STREAMLIT,
164            "TAG": TokenType.TAG,
165            "TIMESTAMP_TZ": TokenType.TIMESTAMPTZ,
166            "TOP": TokenType.TOP,
167            "VOLUME": TokenType.VOLUME,
168            "WAREHOUSE": TokenType.WAREHOUSE,
169            # https://docs.snowflake.com/en/sql-reference/data-types-numeric#float
170            # FLOAT is a synonym for DOUBLE in Snowflake
171            "FLOAT": TokenType.DOUBLE,
172        }
173        KEYWORDS.pop("/*+")
174        KEYWORDS.pop("GLOB")
175        KEYWORDS.pop("RETURNING")
176
177        SINGLE_TOKENS = {
178            **tokens.Tokenizer.SINGLE_TOKENS,
179            "$": TokenType.PARAMETER,
180            "!": TokenType.EXCLAMATION,
181        }
182
183        VAR_SINGLE_TOKENS = {"$"}
184
185        COMMANDS = tokens.Tokenizer.COMMANDS - {TokenType.SHOW}
STRING_ESCAPES = ['\\', "'"]
NUMERIC_ESCAPES = {'x': (16, 2, 2, 255), 'u': (16, 4, 4, 65535), '0': (8, 1, 3, 255)}
DROP_UNKNOWN_ESCAPES = True
HEX_STRINGS = [("x'", "'"), ("X'", "'")]
RAW_STRINGS = ['$$']
COMMENTS = ['--', '//', ('/*', '*/')]
NESTED_COMMENTS = False
KEYWORDS = {'{%': <TokenType.BLOCK_START: 73>, '{%+': <TokenType.BLOCK_START: 73>, '{%-': <TokenType.BLOCK_START: 73>, '%}': <TokenType.BLOCK_END: 74>, '+%}': <TokenType.BLOCK_END: 74>, '-%}': <TokenType.BLOCK_END: 74>, '{{+': <TokenType.BLOCK_START: 73>, '{{-': <TokenType.BLOCK_START: 73>, '+}}': <TokenType.BLOCK_END: 74>, '-}}': <TokenType.BLOCK_END: 74>, '&<': <TokenType.AMP_LT: 63>, '&>': <TokenType.AMP_GT: 64>, '==': <TokenType.EQ: 28>, '::': <TokenType.DCOLON: 14>, '?::': <TokenType.QDCOLON: 375>, '||': <TokenType.DPIPE: 37>, '|>': <TokenType.PIPE_GT: 38>, '>=': <TokenType.GTE: 26>, '<=': <TokenType.LTE: 24>, '<>': <TokenType.NEQ: 29>, '!=': <TokenType.NEQ: 29>, ':=': <TokenType.COLON_EQ: 31>, '<=>': <TokenType.NULLSAFE_EQ: 30>, '->': <TokenType.ARROW: 45>, '->>': <TokenType.DARROW: 46>, '=>': <TokenType.FARROW: 47>, '#>': <TokenType.HASH_ARROW: 49>, '#>>': <TokenType.DHASH_ARROW: 50>, '<->': <TokenType.LR_ARROW: 51>, '<<->>': <TokenType.LLRR_ARROW: 52>, '&&': <TokenType.DAMP: 62>, '??': <TokenType.DQMARK: 18>, '~~~': <TokenType.GLOB: 291>, '~~': <TokenType.LIKE: 322>, '~~*': <TokenType.ILIKE: 299>, '~*': <TokenType.IRLIKE: 311>, '-|-': <TokenType.ADJACENT: 65>, 'ALL': <TokenType.ALL: 222>, 'AND': <TokenType.AND: 34>, 'ANTI': <TokenType.ANTI: 223>, 'ANY': <TokenType.ANY: 224>, 'ASC': <TokenType.ASC: 227>, 'AS': <TokenType.ALIAS: 220>, 'ASOF': <TokenType.ASOF: 228>, 'AUTOINCREMENT': <TokenType.AUTO_INCREMENT: 230>, 'AUTO_INCREMENT': <TokenType.AUTO_INCREMENT: 230>, 'BEGIN': <TokenType.BEGIN: 231>, 'BETWEEN': <TokenType.BETWEEN: 232>, 'CACHE': <TokenType.CACHE: 234>, 'UNCACHE': <TokenType.UNCACHE: 419>, 'CASE': <TokenType.CASE: 235>, 'CLUSTER BY': <TokenType.CLUSTER_BY: 237>, 'COLLATE': <TokenType.COLLATE: 238>, 'COLUMN': <TokenType.COLUMN: 81>, 'COMMIT': <TokenType.COMMIT: 241>, 'CONNECT BY': <TokenType.CONNECT_BY: 243>, 'CONSTRAINT': <TokenType.CONSTRAINT: 244>, 'COPY': <TokenType.COPY: 245>, 'CREATE': <TokenType.CREATE: 246>, 'CROSS': <TokenType.CROSS: 247>, 'CUBE': <TokenType.CUBE: 248>, 'CURRENT_DATE': <TokenType.CURRENT_DATE: 249>, 'CURRENT_SCHEMA': <TokenType.CURRENT_SCHEMA: 251>, 'CURRENT_TIME': <TokenType.CURRENT_TIME: 252>, 'CURRENT_TIMESTAMP': <TokenType.CURRENT_TIMESTAMP: 253>, 'CURRENT_USER': <TokenType.CURRENT_USER: 254>, 'CURRENT_CATALOG': <TokenType.CURRENT_CATALOG: 257>, 'DATABASE': <TokenType.DATABASE: 80>, 'DEFAULT': <TokenType.DEFAULT: 259>, 'DELETE': <TokenType.DELETE: 260>, 'DESC': <TokenType.DESC: 261>, 'DESCRIBE': <TokenType.DESCRIBE: 262>, 'DISTINCT': <TokenType.DISTINCT: 266>, 'DISTRIBUTE BY': <TokenType.DISTRIBUTE_BY: 267>, 'DIV': <TokenType.DIV: 268>, 'DROP': <TokenType.DROP: 269>, 'ELSE': <TokenType.ELSE: 270>, 'END': <TokenType.END: 271>, 'ENUM': <TokenType.ENUM: 207>, 'ESCAPE': <TokenType.ESCAPE: 272>, 'EXCEPT': <TokenType.EXCEPT: 273>, 'EXECUTE': <TokenType.EXECUTE: 274>, 'EXISTS': <TokenType.EXISTS: 275>, 'FALSE': <TokenType.FALSE: 276>, 'FETCH': <TokenType.FETCH: 277>, 'FILTER': <TokenType.FILTER: 280>, 'FILE': <TokenType.FILE: 278>, 'FIRST': <TokenType.FIRST: 282>, 'FULL': <TokenType.FULL: 288>, 'FUNCTION': <TokenType.FUNCTION: 289>, 'FOR': <TokenType.FOR: 283>, 'FOREIGN KEY': <TokenType.FOREIGN_KEY: 285>, 'FORMAT': <TokenType.FORMAT: 286>, 'FROM': <TokenType.FROM: 287>, 'GEOGRAPHY': <TokenType.GEOGRAPHY: 173>, 'GEOMETRY': <TokenType.GEOMETRY: 176>, 'GROUP BY': <TokenType.GROUP_BY: 294>, 'GROUPING SETS': <TokenType.GROUPING_SETS: 295>, 'HAVING': <TokenType.HAVING: 296>, 'ILIKE': <TokenType.ILIKE: 299>, 'IN': <TokenType.IN: 300>, 'INDEX': <TokenType.INDEX: 301>, 'INET': <TokenType.INET: 202>, 'INNER': <TokenType.INNER: 303>, 'INSERT': <TokenType.INSERT: 304>, 'INTERVAL': <TokenType.INTERVAL: 308>, 'INTERSECT': <TokenType.INTERSECT: 307>, 'INTO': <TokenType.INTO: 309>, 'IS': <TokenType.IS: 312>, 'ISNULL': <TokenType.ISNULL: 313>, 'JOIN': <TokenType.JOIN: 314>, 'KEEP': <TokenType.KEEP: 316>, 'KILL': <TokenType.KILL: 318>, 'LATERAL': <TokenType.LATERAL: 320>, 'LEFT': <TokenType.LEFT: 321>, 'LIKE': <TokenType.LIKE: 322>, 'LIMIT': <TokenType.LIMIT: 323>, 'LOAD': <TokenType.LOAD: 325>, 'LOCALTIME': <TokenType.LOCALTIME: 180>, 'LOCALTIMESTAMP': <TokenType.LOCALTIMESTAMP: 181>, 'LOCK': <TokenType.LOCK: 326>, 'MERGE': <TokenType.MERGE: 332>, 'NAMESPACE': <TokenType.NAMESPACE: 445>, 'NATURAL': <TokenType.NATURAL: 335>, 'NEXT': <TokenType.NEXT: 336>, 'NOT': <TokenType.NOT: 27>, 'NOTNULL': <TokenType.NOTNULL: 338>, 'NULL': <TokenType.NULL: 339>, 'OBJECT': <TokenType.OBJECT: 200>, 'REF': <TokenType.REF: 201>, 'OFFSET': <TokenType.OFFSET: 341>, 'ON': <TokenType.ON: 342>, 'OR': <TokenType.OR: 35>, 'XOR': <TokenType.XOR: 66>, 'ORDER BY': <TokenType.ORDER_BY: 345>, 'ORDINALITY': <TokenType.ORDINALITY: 348>, 'OUT': <TokenType.OUT: 349>, 'OUTER': <TokenType.OUTER: 351>, 'OVER': <TokenType.OVER: 352>, 'OVERLAPS': <TokenType.OVERLAPS: 353>, 'OVERWRITE': <TokenType.OVERWRITE: 354>, 'PARTITION': <TokenType.PARTITION: 356>, 'PARTITION BY': <TokenType.PARTITION_BY: 357>, 'PARTITIONED BY': <TokenType.PARTITION_BY: 357>, 'PARTITIONED_BY': <TokenType.PARTITION_BY: 357>, 'PERCENT': <TokenType.PERCENT: 359>, 'PIVOT': <TokenType.PIVOT: 360>, 'PRAGMA': <TokenType.PRAGMA: 365>, 'PRIMARY KEY': <TokenType.PRIMARY_KEY: 367>, 'PROCEDURE': <TokenType.PROCEDURE: 368>, 'OPERATOR': <TokenType.OPERATOR: 344>, 'QUALIFY': <TokenType.QUALIFY: 373>, 'RANGE': <TokenType.RANGE: 376>, 'RECURSIVE': <TokenType.RECURSIVE: 377>, 'REGEXP': <TokenType.RLIKE: 385>, 'RENAME': <TokenType.RENAME: 379>, 'REPLACE': <TokenType.REPLACE: 380>, 'REFERENCES': <TokenType.REFERENCES: 383>, 'RIGHT': <TokenType.RIGHT: 384>, 'RLIKE': <TokenType.RLIKE: 385>, 'ROLLBACK': <TokenType.ROLLBACK: 387>, 'ROLLUP': <TokenType.ROLLUP: 388>, 'ROW': <TokenType.ROW: 389>, 'ROWS': <TokenType.ROWS: 390>, 'SCHEMA': <TokenType.SCHEMA: 83>, 'SELECT': <TokenType.SELECT: 392>, 'SEMI': <TokenType.SEMI: 393>, 'SESSION': <TokenType.SESSION: 59>, 'SESSION_USER': <TokenType.SESSION_USER: 61>, 'SET': <TokenType.SET: 397>, 'SETTINGS': <TokenType.SETTINGS: 398>, 'SHOW': <TokenType.SHOW: 399>, 'SIMILAR TO': <TokenType.SIMILAR_TO: 400>, 'SOME': <TokenType.SOME: 401>, 'SORT BY': <TokenType.SORT_BY: 402>, 'SQL SECURITY': <TokenType.SQL_SECURITY: 404>, 'STRAIGHT_JOIN': <TokenType.STRAIGHT_JOIN: 407>, 'TABLE': <TokenType.TABLE: 84>, 'TABLESAMPLE': <TokenType.TABLE_SAMPLE: 410>, 'TEMP': <TokenType.TEMPORARY: 412>, 'TEMPORARY': <TokenType.TEMPORARY: 412>, 'THEN': <TokenType.THEN: 414>, 'TRUE': <TokenType.TRUE: 415>, 'TRUNCATE': <TokenType.TRUNCATE: 416>, 'TRIGGER': <TokenType.TRIGGER: 417>, 'UNION': <TokenType.UNION: 421>, 'UNKNOWN': <TokenType.UNKNOWN: 216>, 'UNNEST': <TokenType.UNNEST: 422>, 'UNPIVOT': <TokenType.UNPIVOT: 423>, 'UPDATE': <TokenType.UPDATE: 424>, 'USE': <TokenType.USE: 425>, 'USING': <TokenType.USING: 426>, 'UUID': <TokenType.UUID: 172>, 'VALUES': <TokenType.VALUES: 427>, 'VIEW': <TokenType.VIEW: 429>, 'VOLATILE': <TokenType.VOLATILE: 431>, 'WHEN': <TokenType.WHEN: 433>, 'WHERE': <TokenType.WHERE: 434>, 'WINDOW': <TokenType.WINDOW: 435>, 'WITH': <TokenType.WITH: 436>, 'APPLY': <TokenType.APPLY: 225>, 'ARRAY': <TokenType.ARRAY: 226>, 'BIT': <TokenType.BIT: 98>, 'BOOL': <TokenType.BOOLEAN: 99>, 'BOOLEAN': <TokenType.BOOLEAN: 99>, 'BYTE': <TokenType.TINYINT: 100>, 'MEDIUMINT': <TokenType.MEDIUMINT: 104>, 'INT1': <TokenType.TINYINT: 100>, 'TINYINT': <TokenType.TINYINT: 100>, 'INT16': <TokenType.SMALLINT: 102>, 'SHORT': <TokenType.SMALLINT: 102>, 'SMALLINT': <TokenType.SMALLINT: 102>, 'HUGEINT': <TokenType.INT128: 111>, 'UHUGEINT': <TokenType.UINT128: 112>, 'INT2': <TokenType.SMALLINT: 102>, 'INTEGER': <TokenType.INT: 106>, 'INT': <TokenType.INT: 106>, 'INT4': <TokenType.INT: 106>, 'INT32': <TokenType.INT: 106>, 'INT64': <TokenType.BIGINT: 108>, 'INT128': <TokenType.INT128: 111>, 'INT256': <TokenType.INT256: 113>, 'LONG': <TokenType.BIGINT: 108>, 'BIGINT': <TokenType.BIGINT: 108>, 'INT8': <TokenType.TINYINT: 100>, 'UINT': <TokenType.UINT: 107>, 'UINT128': <TokenType.UINT128: 112>, 'UINT256': <TokenType.UINT256: 114>, 'DEC': <TokenType.DECIMAL: 118>, 'DECIMAL': <TokenType.DECIMAL: 118>, 'DECIMAL32': <TokenType.DECIMAL32: 119>, 'DECIMAL64': <TokenType.DECIMAL64: 120>, 'DECIMAL128': <TokenType.DECIMAL128: 121>, 'DECIMAL256': <TokenType.DECIMAL256: 122>, 'DECFLOAT': <TokenType.DECFLOAT: 123>, 'BIGDECIMAL': <TokenType.BIGDECIMAL: 125>, 'BIGNUMERIC': <TokenType.BIGDECIMAL: 125>, 'BIGNUM': <TokenType.BIGNUM: 110>, 'LIST': <TokenType.LIST: 324>, 'MAP': <TokenType.MAP: 327>, 'NULLABLE': <TokenType.NULLABLE: 175>, 'NUMBER': <TokenType.DECIMAL: 118>, 'NUMERIC': <TokenType.DECIMAL: 118>, 'FIXED': <TokenType.DECIMAL: 118>, 'REAL': <TokenType.FLOAT: 115>, 'FLOAT': <TokenType.DOUBLE: 116>, 'FLOAT4': <TokenType.FLOAT: 115>, 'FLOAT8': <TokenType.DOUBLE: 116>, 'DOUBLE': <TokenType.DOUBLE: 116>, 'DOUBLE PRECISION': <TokenType.DOUBLE: 116>, 'JSON': <TokenType.JSON: 142>, 'JSONB': <TokenType.JSONB: 143>, 'CHAR': <TokenType.CHAR: 126>, 'CHARACTER': <TokenType.CHAR: 126>, 'CHAR VARYING': <TokenType.VARCHAR: 128>, 'CHARACTER VARYING': <TokenType.VARCHAR: 128>, 'NCHAR': <TokenType.NCHAR: 127>, 'VARCHAR': <TokenType.VARCHAR: 128>, 'VARCHAR2': <TokenType.VARCHAR: 128>, 'NVARCHAR': <TokenType.NVARCHAR: 129>, 'NVARCHAR2': <TokenType.NVARCHAR: 129>, 'BPCHAR': <TokenType.BPCHAR: 130>, 'STR': <TokenType.TEXT: 131>, 'STRING': <TokenType.TEXT: 131>, 'TEXT': <TokenType.TEXT: 131>, 'LONGTEXT': <TokenType.LONGTEXT: 133>, 'MEDIUMTEXT': <TokenType.MEDIUMTEXT: 132>, 'TINYTEXT': <TokenType.TINYTEXT: 138>, 'CLOB': <TokenType.TEXT: 131>, 'LONGVARCHAR': <TokenType.TEXT: 131>, 'BINARY': <TokenType.BINARY: 140>, 'BLOB': <TokenType.VARBINARY: 141>, 'LONGBLOB': <TokenType.LONGBLOB: 136>, 'MEDIUMBLOB': <TokenType.MEDIUMBLOB: 135>, 'TINYBLOB': <TokenType.TINYBLOB: 137>, 'BYTEA': <TokenType.VARBINARY: 141>, 'VARBINARY': <TokenType.VARBINARY: 141>, 'TIME': <TokenType.TIME: 144>, 'TIMETZ': <TokenType.TIMETZ: 145>, 'TIME_NS': <TokenType.TIME_NS: 146>, 'TIMESTAMP': <TokenType.TIMESTAMP: 147>, 'TIMESTAMPTZ': <TokenType.TIMESTAMPTZ: 148>, 'TIMESTAMPLTZ': <TokenType.TIMESTAMPLTZ: 149>, 'TIMESTAMP_LTZ': <TokenType.TIMESTAMPLTZ: 149>, 'TIMESTAMPNTZ': <TokenType.TIMESTAMPNTZ: 150>, 'TIMESTAMP_NTZ': <TokenType.TIMESTAMPNTZ: 150>, 'DATE': <TokenType.DATE: 158>, 'DATETIME': <TokenType.DATETIME: 154>, 'INT4RANGE': <TokenType.INT4RANGE: 160>, 'INT4MULTIRANGE': <TokenType.INT4MULTIRANGE: 161>, 'INT8RANGE': <TokenType.INT8RANGE: 162>, 'INT8MULTIRANGE': <TokenType.INT8MULTIRANGE: 163>, 'NUMRANGE': <TokenType.NUMRANGE: 164>, 'NUMMULTIRANGE': <TokenType.NUMMULTIRANGE: 165>, 'TSRANGE': <TokenType.TSRANGE: 166>, 'TSMULTIRANGE': <TokenType.TSMULTIRANGE: 167>, 'TSTZRANGE': <TokenType.TSTZRANGE: 168>, 'TSTZMULTIRANGE': <TokenType.TSTZMULTIRANGE: 169>, 'DATERANGE': <TokenType.DATERANGE: 170>, 'DATEMULTIRANGE': <TokenType.DATEMULTIRANGE: 171>, 'UNIQUE': <TokenType.UNIQUE: 437>, 'VECTOR': <TokenType.VECTOR: 217>, 'STRUCT': <TokenType.STRUCT: 408>, 'SEQUENCE': <TokenType.SEQUENCE: 395>, 'VARIANT': <TokenType.VARIANT: 199>, 'ALTER': <TokenType.ALTER: 221>, 'ANALYZE': <TokenType.ANALYZE: 444>, 'CALL': <TokenType.COMMAND: 239>, 'COMMENT': <TokenType.COMMENT: 240>, 'EXPLAIN': <TokenType.COMMAND: 239>, 'GRANT': <TokenType.GRANT: 293>, 'REVOKE': <TokenType.REVOKE: 382>, 'OPTIMIZE': <TokenType.COMMAND: 239>, 'PREPARE': <TokenType.COMMAND: 239>, 'VACUUM': <TokenType.COMMAND: 239>, 'USER-DEFINED': <TokenType.USERDEFINED: 194>, '(+)': <TokenType.JOIN_MARKER: 315>, 'BYTEINT': <TokenType.INT: 106>, 'FILE://': <TokenType.URI_START: 72>, 'FILE FORMAT': <TokenType.FILE_FORMAT: 279>, 'GET': <TokenType.GET: 290>, 'INTEGRATION': <TokenType.INTEGRATION: 306>, 'LS': <TokenType.LIST: 324>, 'MATCH_CONDITION': <TokenType.MATCH_CONDITION: 329>, 'MATCH_RECOGNIZE': <TokenType.MATCH_RECOGNIZE: 330>, 'MINUS': <TokenType.EXCEPT: 273>, 'NCHAR VARYING': <TokenType.VARCHAR: 128>, 'PACKAGE': <TokenType.PACKAGE: 355>, 'POLICY': <TokenType.POLICY: 362>, 'POOL': <TokenType.POOL: 363>, 'PUT': <TokenType.PUT: 372>, 'UNDROP': <TokenType.UNDROP: 420>, 'REMOVE': <TokenType.COMMAND: 239>, 'RM': <TokenType.COMMAND: 239>, 'ROLE': <TokenType.ROLE: 386>, 'RULE': <TokenType.RULE: 391>, 'SAMPLE': <TokenType.TABLE_SAMPLE: 410>, 'SEMANTIC VIEW': <TokenType.SEMANTIC_VIEW: 430>, 'SQL_DOUBLE': <TokenType.DOUBLE: 116>, 'SQL_VARCHAR': <TokenType.VARCHAR: 128>, 'STAGE': <TokenType.STAGE: 86>, 'STORAGE INTEGRATION': <TokenType.STORAGE_INTEGRATION: 406>, 'STREAMLIT': <TokenType.STREAMLIT: 88>, 'TAG': <TokenType.TAG: 411>, 'TIMESTAMP_TZ': <TokenType.TIMESTAMPTZ: 148>, 'TOP': <TokenType.TOP: 413>, 'VOLUME': <TokenType.VOLUME: 432>, 'WAREHOUSE': <TokenType.WAREHOUSE: 85>}
SINGLE_TOKENS = {'(': <TokenType.L_PAREN: 1>, ')': <TokenType.R_PAREN: 2>, '[': <TokenType.L_BRACKET: 3>, ']': <TokenType.R_BRACKET: 4>, '{': <TokenType.L_BRACE: 5>, '}': <TokenType.R_BRACE: 6>, '&': <TokenType.AMP: 36>, '^': <TokenType.CARET: 42>, ':': <TokenType.COLON: 11>, ',': <TokenType.COMMA: 7>, '.': <TokenType.DOT: 8>, '-': <TokenType.DASH: 9>, '=': <TokenType.EQ: 28>, '>': <TokenType.GT: 25>, '<': <TokenType.LT: 23>, '%': <TokenType.MOD: 333>, '!': <TokenType.EXCLAMATION: 71>, '|': <TokenType.PIPE: 39>, '+': <TokenType.PLUS: 10>, ';': <TokenType.SEMICOLON: 19>, '/': <TokenType.SLASH: 22>, '\\': <TokenType.BACKSLASH: 21>, '*': <TokenType.STAR: 20>, '~': <TokenType.TILDE: 44>, '?': <TokenType.PLACEHOLDER: 361>, '@': <TokenType.PARAMETER: 58>, '#': <TokenType.HASH: 48>, "'": <TokenType.UNKNOWN: 216>, '`': <TokenType.UNKNOWN: 216>, '"': <TokenType.UNKNOWN: 216>, '$': <TokenType.PARAMETER: 58>}
VAR_SINGLE_TOKENS = {'$'}
COMMANDS = {<TokenType.EXECUTE: 274>, <TokenType.RENAME: 379>, <TokenType.FETCH: 277>, <TokenType.COMMAND: 239>}
BYTE_STRING_ESCAPES: ClassVar[list[str]] = ['\\', "'"]