Edit on GitHub

sqlglot.dialects.redshift

  1from __future__ import annotations
  2
  3import typing as t
  4
  5from sqlglot import exp, transforms
  6from sqlglot.dialects.dialect import rename_func
  7from sqlglot.dialects.postgres import Postgres
  8from sqlglot.helper import seq_get
  9from sqlglot.tokens import TokenType
 10
 11
 12class Redshift(Postgres):
 13    time_format = "'YYYY-MM-DD HH:MI:SS'"
 14    time_mapping = {
 15        **Postgres.time_mapping,  # type: ignore
 16        "MON": "%b",
 17        "HH": "%H",
 18    }
 19
 20    class Parser(Postgres.Parser):
 21        FUNCTIONS = {
 22            **Postgres.Parser.FUNCTIONS,  # type: ignore
 23            "DATEDIFF": lambda args: exp.DateDiff(
 24                this=seq_get(args, 2),
 25                expression=seq_get(args, 1),
 26                unit=seq_get(args, 0),
 27            ),
 28            "DECODE": exp.Matches.from_arg_list,
 29            "NVL": exp.Coalesce.from_arg_list,
 30        }
 31
 32        CONVERT_TYPE_FIRST = True
 33
 34        def _parse_types(self, check_func: bool = False) -> t.Optional[exp.Expression]:
 35            this = super()._parse_types(check_func=check_func)
 36
 37            if (
 38                isinstance(this, exp.DataType)
 39                and this.this == exp.DataType.Type.VARCHAR
 40                and this.expressions
 41                and this.expressions[0] == exp.column("MAX")
 42            ):
 43                this.set("expressions", [exp.Var(this="MAX")])
 44
 45            return this
 46
 47    class Tokenizer(Postgres.Tokenizer):
 48        STRING_ESCAPES = ["\\"]
 49
 50        KEYWORDS = {
 51            **Postgres.Tokenizer.KEYWORDS,  # type: ignore
 52            "GEOMETRY": TokenType.GEOMETRY,
 53            "GEOGRAPHY": TokenType.GEOGRAPHY,
 54            "HLLSKETCH": TokenType.HLLSKETCH,
 55            "SUPER": TokenType.SUPER,
 56            "TIME": TokenType.TIMESTAMP,
 57            "TIMETZ": TokenType.TIMESTAMPTZ,
 58            "TOP": TokenType.TOP,
 59            "UNLOAD": TokenType.COMMAND,
 60            "VARBYTE": TokenType.VARBINARY,
 61        }
 62
 63    class Generator(Postgres.Generator):
 64        TYPE_MAPPING = {
 65            **Postgres.Generator.TYPE_MAPPING,  # type: ignore
 66            exp.DataType.Type.BINARY: "VARBYTE",
 67            exp.DataType.Type.VARBINARY: "VARBYTE",
 68            exp.DataType.Type.INT: "INTEGER",
 69        }
 70
 71        PROPERTIES_LOCATION = {
 72            **Postgres.Generator.PROPERTIES_LOCATION,  # type: ignore
 73            exp.LikeProperty: exp.Properties.Location.POST_WITH,
 74        }
 75
 76        TRANSFORMS = {
 77            **Postgres.Generator.TRANSFORMS,  # type: ignore
 78            **transforms.ELIMINATE_DISTINCT_ON,  # type: ignore
 79            exp.DateDiff: lambda self, e: self.func(
 80                "DATEDIFF", e.args.get("unit") or "day", e.expression, e.this
 81            ),
 82            exp.DistKeyProperty: lambda self, e: f"DISTKEY({e.name})",
 83            exp.SortKeyProperty: lambda self, e: f"{'COMPOUND ' if e.args['compound'] else ''}SORTKEY({self.format_args(*e.this)})",
 84            exp.DistStyleProperty: lambda self, e: self.naked_property(e),
 85            exp.Matches: rename_func("DECODE"),
 86        }
 87
 88        def values_sql(self, expression: exp.Values) -> str:
 89            """
 90            Converts `VALUES...` expression into a series of unions.
 91
 92            Note: If you have a lot of unions then this will result in a large number of recursive statements to
 93            evaluate the expression. You may need to increase `sys.setrecursionlimit` to run and it can also be
 94            very slow.
 95            """
 96            if not isinstance(expression.unnest().parent, exp.From):
 97                return super().values_sql(expression)
 98            rows = [tuple_exp.expressions for tuple_exp in expression.expressions]
 99            selects = []
100            for i, row in enumerate(rows):
101                if i == 0 and expression.alias:
102                    row = [
103                        exp.alias_(value, column_name)
104                        for value, column_name in zip(row, expression.args["alias"].args["columns"])
105                    ]
106                selects.append(exp.Select(expressions=row))
107            subquery_expression = selects[0]
108            if len(selects) > 1:
109                for select in selects[1:]:
110                    subquery_expression = exp.union(subquery_expression, select, distinct=False)
111            return self.subquery_sql(subquery_expression.subquery(expression.alias))
112
113        def with_properties(self, properties: exp.Properties) -> str:
114            """Redshift doesn't have `WITH` as part of their with_properties so we remove it"""
115            return self.properties(properties, prefix=" ", suffix="")
116
117        def renametable_sql(self, expression: exp.RenameTable) -> str:
118            """Redshift only supports defining the table name itself (not the db) when renaming tables"""
119            expression = expression.copy()
120            target_table = expression.this
121            for arg in target_table.args:
122                if arg != "this":
123                    target_table.set(arg, None)
124            this = self.sql(expression, "this")
125            return f"RENAME TO {this}"
126
127        def datatype_sql(self, expression: exp.DataType) -> str:
128            """
129            Redshift converts the `TEXT` data type to `VARCHAR(255)` by default when people more generally mean
130            VARCHAR of max length which is `VARCHAR(max)` in Redshift. Therefore if we get a `TEXT` data type
131            without precision we convert it to `VARCHAR(max)` and if it does have precision then we just convert
132            `TEXT` to `VARCHAR`.
133            """
134            if expression.this == exp.DataType.Type.TEXT:
135                expression = expression.copy()
136                expression.set("this", exp.DataType.Type.VARCHAR)
137                precision = expression.args.get("expressions")
138                if not precision:
139                    expression.append("expressions", exp.Var(this="MAX"))
140            return super().datatype_sql(expression)
class Redshift(sqlglot.dialects.postgres.Postgres):
 13class Redshift(Postgres):
 14    time_format = "'YYYY-MM-DD HH:MI:SS'"
 15    time_mapping = {
 16        **Postgres.time_mapping,  # type: ignore
 17        "MON": "%b",
 18        "HH": "%H",
 19    }
 20
 21    class Parser(Postgres.Parser):
 22        FUNCTIONS = {
 23            **Postgres.Parser.FUNCTIONS,  # type: ignore
 24            "DATEDIFF": lambda args: exp.DateDiff(
 25                this=seq_get(args, 2),
 26                expression=seq_get(args, 1),
 27                unit=seq_get(args, 0),
 28            ),
 29            "DECODE": exp.Matches.from_arg_list,
 30            "NVL": exp.Coalesce.from_arg_list,
 31        }
 32
 33        CONVERT_TYPE_FIRST = True
 34
 35        def _parse_types(self, check_func: bool = False) -> t.Optional[exp.Expression]:
 36            this = super()._parse_types(check_func=check_func)
 37
 38            if (
 39                isinstance(this, exp.DataType)
 40                and this.this == exp.DataType.Type.VARCHAR
 41                and this.expressions
 42                and this.expressions[0] == exp.column("MAX")
 43            ):
 44                this.set("expressions", [exp.Var(this="MAX")])
 45
 46            return this
 47
 48    class Tokenizer(Postgres.Tokenizer):
 49        STRING_ESCAPES = ["\\"]
 50
 51        KEYWORDS = {
 52            **Postgres.Tokenizer.KEYWORDS,  # type: ignore
 53            "GEOMETRY": TokenType.GEOMETRY,
 54            "GEOGRAPHY": TokenType.GEOGRAPHY,
 55            "HLLSKETCH": TokenType.HLLSKETCH,
 56            "SUPER": TokenType.SUPER,
 57            "TIME": TokenType.TIMESTAMP,
 58            "TIMETZ": TokenType.TIMESTAMPTZ,
 59            "TOP": TokenType.TOP,
 60            "UNLOAD": TokenType.COMMAND,
 61            "VARBYTE": TokenType.VARBINARY,
 62        }
 63
 64    class Generator(Postgres.Generator):
 65        TYPE_MAPPING = {
 66            **Postgres.Generator.TYPE_MAPPING,  # type: ignore
 67            exp.DataType.Type.BINARY: "VARBYTE",
 68            exp.DataType.Type.VARBINARY: "VARBYTE",
 69            exp.DataType.Type.INT: "INTEGER",
 70        }
 71
 72        PROPERTIES_LOCATION = {
 73            **Postgres.Generator.PROPERTIES_LOCATION,  # type: ignore
 74            exp.LikeProperty: exp.Properties.Location.POST_WITH,
 75        }
 76
 77        TRANSFORMS = {
 78            **Postgres.Generator.TRANSFORMS,  # type: ignore
 79            **transforms.ELIMINATE_DISTINCT_ON,  # type: ignore
 80            exp.DateDiff: lambda self, e: self.func(
 81                "DATEDIFF", e.args.get("unit") or "day", e.expression, e.this
 82            ),
 83            exp.DistKeyProperty: lambda self, e: f"DISTKEY({e.name})",
 84            exp.SortKeyProperty: lambda self, e: f"{'COMPOUND ' if e.args['compound'] else ''}SORTKEY({self.format_args(*e.this)})",
 85            exp.DistStyleProperty: lambda self, e: self.naked_property(e),
 86            exp.Matches: rename_func("DECODE"),
 87        }
 88
 89        def values_sql(self, expression: exp.Values) -> str:
 90            """
 91            Converts `VALUES...` expression into a series of unions.
 92
 93            Note: If you have a lot of unions then this will result in a large number of recursive statements to
 94            evaluate the expression. You may need to increase `sys.setrecursionlimit` to run and it can also be
 95            very slow.
 96            """
 97            if not isinstance(expression.unnest().parent, exp.From):
 98                return super().values_sql(expression)
 99            rows = [tuple_exp.expressions for tuple_exp in expression.expressions]
100            selects = []
101            for i, row in enumerate(rows):
102                if i == 0 and expression.alias:
103                    row = [
104                        exp.alias_(value, column_name)
105                        for value, column_name in zip(row, expression.args["alias"].args["columns"])
106                    ]
107                selects.append(exp.Select(expressions=row))
108            subquery_expression = selects[0]
109            if len(selects) > 1:
110                for select in selects[1:]:
111                    subquery_expression = exp.union(subquery_expression, select, distinct=False)
112            return self.subquery_sql(subquery_expression.subquery(expression.alias))
113
114        def with_properties(self, properties: exp.Properties) -> str:
115            """Redshift doesn't have `WITH` as part of their with_properties so we remove it"""
116            return self.properties(properties, prefix=" ", suffix="")
117
118        def renametable_sql(self, expression: exp.RenameTable) -> str:
119            """Redshift only supports defining the table name itself (not the db) when renaming tables"""
120            expression = expression.copy()
121            target_table = expression.this
122            for arg in target_table.args:
123                if arg != "this":
124                    target_table.set(arg, None)
125            this = self.sql(expression, "this")
126            return f"RENAME TO {this}"
127
128        def datatype_sql(self, expression: exp.DataType) -> str:
129            """
130            Redshift converts the `TEXT` data type to `VARCHAR(255)` by default when people more generally mean
131            VARCHAR of max length which is `VARCHAR(max)` in Redshift. Therefore if we get a `TEXT` data type
132            without precision we convert it to `VARCHAR(max)` and if it does have precision then we just convert
133            `TEXT` to `VARCHAR`.
134            """
135            if expression.this == exp.DataType.Type.TEXT:
136                expression = expression.copy()
137                expression.set("this", exp.DataType.Type.VARCHAR)
138                precision = expression.args.get("expressions")
139                if not precision:
140                    expression.append("expressions", exp.Var(this="MAX"))
141            return super().datatype_sql(expression)
class Redshift.Parser(sqlglot.dialects.postgres.Postgres.Parser):
21    class Parser(Postgres.Parser):
22        FUNCTIONS = {
23            **Postgres.Parser.FUNCTIONS,  # type: ignore
24            "DATEDIFF": lambda args: exp.DateDiff(
25                this=seq_get(args, 2),
26                expression=seq_get(args, 1),
27                unit=seq_get(args, 0),
28            ),
29            "DECODE": exp.Matches.from_arg_list,
30            "NVL": exp.Coalesce.from_arg_list,
31        }
32
33        CONVERT_TYPE_FIRST = True
34
35        def _parse_types(self, check_func: bool = False) -> t.Optional[exp.Expression]:
36            this = super()._parse_types(check_func=check_func)
37
38            if (
39                isinstance(this, exp.DataType)
40                and this.this == exp.DataType.Type.VARCHAR
41                and this.expressions
42                and this.expressions[0] == exp.column("MAX")
43            ):
44                this.set("expressions", [exp.Var(this="MAX")])
45
46            return this

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

Arguments:
  • error_level: the desired error level. Default: ErrorLevel.RAISE
  • error_message_context: determines the amount of context to capture from a query string when displaying the error message (in number of characters). Default: 50.
  • index_offset: Index offset for arrays eg ARRAY[0] vs ARRAY[1] as the head of a list. Default: 0
  • alias_post_tablesample: If the table alias comes after tablesample. Default: False
  • max_errors: Maximum number of error messages to include in a raised ParseError. This is only relevant if error_level is ErrorLevel.RAISE. Default: 3
  • null_ordering: Indicates the default null ordering method to use if not explicitly set. Options are "nulls_are_small", "nulls_are_large", "nulls_are_last". Default: "nulls_are_small"
class Redshift.Tokenizer(sqlglot.dialects.postgres.Postgres.Tokenizer):
48    class Tokenizer(Postgres.Tokenizer):
49        STRING_ESCAPES = ["\\"]
50
51        KEYWORDS = {
52            **Postgres.Tokenizer.KEYWORDS,  # type: ignore
53            "GEOMETRY": TokenType.GEOMETRY,
54            "GEOGRAPHY": TokenType.GEOGRAPHY,
55            "HLLSKETCH": TokenType.HLLSKETCH,
56            "SUPER": TokenType.SUPER,
57            "TIME": TokenType.TIMESTAMP,
58            "TIMETZ": TokenType.TIMESTAMPTZ,
59            "TOP": TokenType.TOP,
60            "UNLOAD": TokenType.COMMAND,
61            "VARBYTE": TokenType.VARBINARY,
62        }
class Redshift.Generator(sqlglot.dialects.postgres.Postgres.Generator):
 64    class Generator(Postgres.Generator):
 65        TYPE_MAPPING = {
 66            **Postgres.Generator.TYPE_MAPPING,  # type: ignore
 67            exp.DataType.Type.BINARY: "VARBYTE",
 68            exp.DataType.Type.VARBINARY: "VARBYTE",
 69            exp.DataType.Type.INT: "INTEGER",
 70        }
 71
 72        PROPERTIES_LOCATION = {
 73            **Postgres.Generator.PROPERTIES_LOCATION,  # type: ignore
 74            exp.LikeProperty: exp.Properties.Location.POST_WITH,
 75        }
 76
 77        TRANSFORMS = {
 78            **Postgres.Generator.TRANSFORMS,  # type: ignore
 79            **transforms.ELIMINATE_DISTINCT_ON,  # type: ignore
 80            exp.DateDiff: lambda self, e: self.func(
 81                "DATEDIFF", e.args.get("unit") or "day", e.expression, e.this
 82            ),
 83            exp.DistKeyProperty: lambda self, e: f"DISTKEY({e.name})",
 84            exp.SortKeyProperty: lambda self, e: f"{'COMPOUND ' if e.args['compound'] else ''}SORTKEY({self.format_args(*e.this)})",
 85            exp.DistStyleProperty: lambda self, e: self.naked_property(e),
 86            exp.Matches: rename_func("DECODE"),
 87        }
 88
 89        def values_sql(self, expression: exp.Values) -> str:
 90            """
 91            Converts `VALUES...` expression into a series of unions.
 92
 93            Note: If you have a lot of unions then this will result in a large number of recursive statements to
 94            evaluate the expression. You may need to increase `sys.setrecursionlimit` to run and it can also be
 95            very slow.
 96            """
 97            if not isinstance(expression.unnest().parent, exp.From):
 98                return super().values_sql(expression)
 99            rows = [tuple_exp.expressions for tuple_exp in expression.expressions]
100            selects = []
101            for i, row in enumerate(rows):
102                if i == 0 and expression.alias:
103                    row = [
104                        exp.alias_(value, column_name)
105                        for value, column_name in zip(row, expression.args["alias"].args["columns"])
106                    ]
107                selects.append(exp.Select(expressions=row))
108            subquery_expression = selects[0]
109            if len(selects) > 1:
110                for select in selects[1:]:
111                    subquery_expression = exp.union(subquery_expression, select, distinct=False)
112            return self.subquery_sql(subquery_expression.subquery(expression.alias))
113
114        def with_properties(self, properties: exp.Properties) -> str:
115            """Redshift doesn't have `WITH` as part of their with_properties so we remove it"""
116            return self.properties(properties, prefix=" ", suffix="")
117
118        def renametable_sql(self, expression: exp.RenameTable) -> str:
119            """Redshift only supports defining the table name itself (not the db) when renaming tables"""
120            expression = expression.copy()
121            target_table = expression.this
122            for arg in target_table.args:
123                if arg != "this":
124                    target_table.set(arg, None)
125            this = self.sql(expression, "this")
126            return f"RENAME TO {this}"
127
128        def datatype_sql(self, expression: exp.DataType) -> str:
129            """
130            Redshift converts the `TEXT` data type to `VARCHAR(255)` by default when people more generally mean
131            VARCHAR of max length which is `VARCHAR(max)` in Redshift. Therefore if we get a `TEXT` data type
132            without precision we convert it to `VARCHAR(max)` and if it does have precision then we just convert
133            `TEXT` to `VARCHAR`.
134            """
135            if expression.this == exp.DataType.Type.TEXT:
136                expression = expression.copy()
137                expression.set("this", exp.DataType.Type.VARCHAR)
138                precision = expression.args.get("expressions")
139                if not precision:
140                    expression.append("expressions", exp.Var(this="MAX"))
141            return super().datatype_sql(expression)

Generator interprets the given syntax tree and produces a SQL string as an output.

Arguments:
  • time_mapping (dict): the dictionary of custom time mappings in which the key represents a python time format and the output the target time format
  • time_trie (trie): a trie of the time_mapping keys
  • pretty (bool): if set to True the returned string will be formatted. Default: False.
  • quote_start (str): specifies which starting character to use to delimit quotes. Default: '.
  • quote_end (str): specifies which ending character to use to delimit quotes. Default: '.
  • identifier_start (str): specifies which starting character to use to delimit identifiers. Default: ".
  • identifier_end (str): specifies which ending character to use to delimit identifiers. Default: ".
  • identify (bool): if set to True all identifiers will be delimited by the corresponding character.
  • normalize (bool): if set to True all identifiers will lower cased
  • string_escape (str): specifies a string escape character. Default: '.
  • identifier_escape (str): specifies an identifier escape character. Default: ".
  • pad (int): determines padding in a formatted string. Default: 2.
  • indent (int): determines the size of indentation in a formatted string. Default: 4.
  • unnest_column_only (bool): if true unnest table aliases are considered only as column aliases
  • normalize_functions (str): normalize function names, "upper", "lower", or None Default: "upper"
  • alias_post_tablesample (bool): if the table alias comes after tablesample Default: False
  • unsupported_level (ErrorLevel): determines the generator's behavior when it encounters unsupported expressions. Default ErrorLevel.WARN.
  • null_ordering (str): Indicates the default null ordering method to use if not explicitly set. Options are "nulls_are_small", "nulls_are_large", "nulls_are_last". Default: "nulls_are_small"
  • max_unsupported (int): Maximum number of unsupported messages to include in a raised UnsupportedError. This is only relevant if unsupported_level is ErrorLevel.RAISE. Default: 3
  • leading_comma (bool): if the the comma is leading or trailing in select statements Default: False
  • max_text_width: The max number of characters in a segment before creating new lines in pretty mode. The default is on the smaller end because the length only represents a segment and not the true line length. Default: 80
  • comments: Whether or not to preserve comments in the output SQL code. Default: True
def values_sql(self, expression: sqlglot.expressions.Values) -> str:
 89        def values_sql(self, expression: exp.Values) -> str:
 90            """
 91            Converts `VALUES...` expression into a series of unions.
 92
 93            Note: If you have a lot of unions then this will result in a large number of recursive statements to
 94            evaluate the expression. You may need to increase `sys.setrecursionlimit` to run and it can also be
 95            very slow.
 96            """
 97            if not isinstance(expression.unnest().parent, exp.From):
 98                return super().values_sql(expression)
 99            rows = [tuple_exp.expressions for tuple_exp in expression.expressions]
100            selects = []
101            for i, row in enumerate(rows):
102                if i == 0 and expression.alias:
103                    row = [
104                        exp.alias_(value, column_name)
105                        for value, column_name in zip(row, expression.args["alias"].args["columns"])
106                    ]
107                selects.append(exp.Select(expressions=row))
108            subquery_expression = selects[0]
109            if len(selects) > 1:
110                for select in selects[1:]:
111                    subquery_expression = exp.union(subquery_expression, select, distinct=False)
112            return self.subquery_sql(subquery_expression.subquery(expression.alias))

Converts VALUES... expression into a series of unions.

Note: If you have a lot of unions then this will result in a large number of recursive statements to evaluate the expression. You may need to increase sys.setrecursionlimit to run and it can also be very slow.

def with_properties(self, properties: sqlglot.expressions.Properties) -> str:
114        def with_properties(self, properties: exp.Properties) -> str:
115            """Redshift doesn't have `WITH` as part of their with_properties so we remove it"""
116            return self.properties(properties, prefix=" ", suffix="")

Redshift doesn't have WITH as part of their with_properties so we remove it

def renametable_sql(self, expression: sqlglot.expressions.RenameTable) -> str:
118        def renametable_sql(self, expression: exp.RenameTable) -> str:
119            """Redshift only supports defining the table name itself (not the db) when renaming tables"""
120            expression = expression.copy()
121            target_table = expression.this
122            for arg in target_table.args:
123                if arg != "this":
124                    target_table.set(arg, None)
125            this = self.sql(expression, "this")
126            return f"RENAME TO {this}"

Redshift only supports defining the table name itself (not the db) when renaming tables

def datatype_sql(self, expression: sqlglot.expressions.DataType) -> str:
128        def datatype_sql(self, expression: exp.DataType) -> str:
129            """
130            Redshift converts the `TEXT` data type to `VARCHAR(255)` by default when people more generally mean
131            VARCHAR of max length which is `VARCHAR(max)` in Redshift. Therefore if we get a `TEXT` data type
132            without precision we convert it to `VARCHAR(max)` and if it does have precision then we just convert
133            `TEXT` to `VARCHAR`.
134            """
135            if expression.this == exp.DataType.Type.TEXT:
136                expression = expression.copy()
137                expression.set("this", exp.DataType.Type.VARCHAR)
138                precision = expression.args.get("expressions")
139                if not precision:
140                    expression.append("expressions", exp.Var(this="MAX"))
141            return super().datatype_sql(expression)

Redshift converts the TEXT data type to VARCHAR(255) by default when people more generally mean VARCHAR of max length which is VARCHAR(max) in Redshift. Therefore if we get a TEXT data type without precision we convert it to VARCHAR(max) and if it does have precision then we just convert TEXT to VARCHAR.

Inherited Members
sqlglot.generator.Generator
Generator
generate
unsupported
sep
seg
pad_comment
maybe_comment
wrap
no_identify
normalize_func
indent
sql
uncache_sql
cache_sql
characterset_sql
column_sql
columndef_sql
columnconstraint_sql
autoincrementcolumnconstraint_sql
compresscolumnconstraint_sql
generatedasidentitycolumnconstraint_sql
notnullcolumnconstraint_sql
primarykeycolumnconstraint_sql
uniquecolumnconstraint_sql
create_sql
describe_sql
prepend_ctes
with_sql
cte_sql
tablealias_sql
bitstring_sql
hexstring_sql
directory_sql
delete_sql
drop_sql
except_sql
except_op
fetch_sql
filter_sql
hint_sql
index_sql
identifier_sql
national_sql
partition_sql
properties_sql
root_properties
properties
locate_properties
property_sql
likeproperty_sql
fallbackproperty_sql
journalproperty_sql
freespaceproperty_sql
afterjournalproperty_sql
checksumproperty_sql
mergeblockratioproperty_sql
datablocksizeproperty_sql
blockcompressionproperty_sql
isolatedloadingproperty_sql
lockingproperty_sql
withdataproperty_sql
insert_sql
intersect_sql
intersect_op
introducer_sql
pseudotype_sql
returning_sql
rowformatdelimitedproperty_sql
table_sql
tablesample_sql
pivot_sql
tuple_sql
update_sql
var_sql
into_sql
from_sql
group_sql
having_sql
join_sql
lambda_sql
lateral_sql
limit_sql
offset_sql
lock_sql
literal_sql
loaddata_sql
null_sql
boolean_sql
order_sql
cluster_sql
distribute_sql
sort_sql
ordered_sql
matchrecognize_sql
query_modifiers
select_sql
schema_sql
star_sql
structkwarg_sql
parameter_sql
sessionparameter_sql
placeholder_sql
subquery_sql
qualify_sql
union_sql
union_op
unnest_sql
where_sql
window_sql
partition_by_sql
window_spec_sql
withingroup_sql
between_sql
bracket_sql
all_sql
any_sql
exists_sql
case_sql
constraint_sql
extract_sql
trim_sql
concat_sql
check_sql
foreignkey_sql
primarykey_sql
unique_sql
if_sql
in_sql
in_unnest_op
interval_sql
return_sql
reference_sql
anonymous_sql
paren_sql
neg_sql
not_sql
alias_sql
aliases_sql
attimezone_sql
add_sql
and_sql
connector_sql
bitwiseand_sql
bitwiseleftshift_sql
bitwisenot_sql
bitwiseor_sql
bitwiserightshift_sql
bitwisexor_sql
cast_sql
currentdate_sql
collate_sql
command_sql
comment_sql
transaction_sql
commit_sql
rollback_sql
altercolumn_sql
altertable_sql
droppartition_sql
addconstraint_sql
distinct_sql
ignorenulls_sql
respectnulls_sql
intdiv_sql
dpipe_sql
div_sql
floatdiv_sql
overlaps_sql
distance_sql
dot_sql
eq_sql
escape_sql
glob_sql
gt_sql
gte_sql
ilike_sql
is_sql
like_sql
similarto_sql
lt_sql
lte_sql
mod_sql
mul_sql
neq_sql
nullsafeeq_sql
nullsafeneq_sql
or_sql
slice_sql
sub_sql
trycast_sql
use_sql
binary
function_fallback_sql
func
format_args
text_width
format_time
expressions
op_expressions
naked_property
set_operation
tag_sql
token_sql
userdefinedfunction_sql
joinhint_sql
kwarg_sql
when_sql
merge_sql