Edit on GitHub

sqlglot.dialects.drill

  1from __future__ import annotations
  2
  3import re
  4import typing as t
  5
  6from sqlglot import exp, generator, parser, tokens
  7from sqlglot.dialects.dialect import (
  8    Dialect,
  9    create_with_partitions_sql,
 10    datestrtodate_sql,
 11    format_time_lambda,
 12    no_pivot_sql,
 13    no_trycast_sql,
 14    rename_func,
 15    str_position_sql,
 16    timestrtotime_sql,
 17)
 18
 19
 20def _str_to_time_sql(self: generator.Generator, expression: exp.TsOrDsToDate) -> str:
 21    return f"STRPTIME({self.sql(expression, 'this')}, {self.format_time(expression)})"
 22
 23
 24def _ts_or_ds_to_date_sql(self: generator.Generator, expression: exp.TsOrDsToDate) -> str:
 25    time_format = self.format_time(expression)
 26    if time_format and time_format not in (Drill.time_format, Drill.date_format):
 27        return f"CAST({_str_to_time_sql(self, expression)} AS DATE)"
 28    return f"CAST({self.sql(expression, 'this')} AS DATE)"
 29
 30
 31def _date_add_sql(kind: str) -> t.Callable[[generator.Generator, exp.DateAdd | exp.DateSub], str]:
 32    def func(self: generator.Generator, expression: exp.DateAdd | exp.DateSub) -> str:
 33        this = self.sql(expression, "this")
 34        unit = exp.Var(this=expression.text("unit").upper() or "DAY")
 35        return (
 36            f"DATE_{kind}({this}, {self.sql(exp.Interval(this=expression.expression, unit=unit))})"
 37        )
 38
 39    return func
 40
 41
 42def if_sql(self: generator.Generator, expression: exp.If) -> str:
 43    """
 44    Drill requires backticks around certain SQL reserved words, IF being one of them,  This function
 45    adds the backticks around the keyword IF.
 46    Args:
 47        self: The Drill dialect
 48        expression: The input IF expression
 49
 50    Returns:  The expression with IF in backticks.
 51
 52    """
 53    expressions = self.format_args(
 54        expression.this, expression.args.get("true"), expression.args.get("false")
 55    )
 56    return f"`IF`({expressions})"
 57
 58
 59def _str_to_date(self: generator.Generator, expression: exp.StrToDate) -> str:
 60    this = self.sql(expression, "this")
 61    time_format = self.format_time(expression)
 62    if time_format == Drill.date_format:
 63        return f"CAST({this} AS DATE)"
 64    return f"TO_DATE({this}, {time_format})"
 65
 66
 67class Drill(Dialect):
 68    normalize_functions = None
 69    null_ordering = "nulls_are_last"
 70    date_format = "'yyyy-MM-dd'"
 71    dateint_format = "'yyyyMMdd'"
 72    time_format = "'yyyy-MM-dd HH:mm:ss'"
 73
 74    time_mapping = {
 75        "y": "%Y",
 76        "Y": "%Y",
 77        "YYYY": "%Y",
 78        "yyyy": "%Y",
 79        "YY": "%y",
 80        "yy": "%y",
 81        "MMMM": "%B",
 82        "MMM": "%b",
 83        "MM": "%m",
 84        "M": "%-m",
 85        "dd": "%d",
 86        "d": "%-d",
 87        "HH": "%H",
 88        "H": "%-H",
 89        "hh": "%I",
 90        "h": "%-I",
 91        "mm": "%M",
 92        "m": "%-M",
 93        "ss": "%S",
 94        "s": "%-S",
 95        "SSSSSS": "%f",
 96        "a": "%p",
 97        "DD": "%j",
 98        "D": "%-j",
 99        "E": "%a",
100        "EE": "%a",
101        "EEE": "%a",
102        "EEEE": "%A",
103        "''T''": "T",
104    }
105
106    class Tokenizer(tokens.Tokenizer):
107        QUOTES = ["'"]
108        IDENTIFIERS = ["`"]
109        STRING_ESCAPES = ["\\"]
110        ENCODE = "utf-8"
111
112    class Parser(parser.Parser):
113        STRICT_CAST = False
114
115        FUNCTIONS = {
116            **parser.Parser.FUNCTIONS,  # type: ignore
117            "TO_TIMESTAMP": exp.TimeStrToTime.from_arg_list,
118            "TO_CHAR": format_time_lambda(exp.TimeToStr, "drill"),
119        }
120
121    class Generator(generator.Generator):
122        TYPE_MAPPING = {
123            **generator.Generator.TYPE_MAPPING,  # type: ignore
124            exp.DataType.Type.INT: "INTEGER",
125            exp.DataType.Type.SMALLINT: "INTEGER",
126            exp.DataType.Type.TINYINT: "INTEGER",
127            exp.DataType.Type.BINARY: "VARBINARY",
128            exp.DataType.Type.TEXT: "VARCHAR",
129            exp.DataType.Type.NCHAR: "VARCHAR",
130            exp.DataType.Type.TIMESTAMPLTZ: "TIMESTAMP",
131            exp.DataType.Type.TIMESTAMPTZ: "TIMESTAMP",
132            exp.DataType.Type.DATETIME: "TIMESTAMP",
133        }
134
135        PROPERTIES_LOCATION = {
136            **generator.Generator.PROPERTIES_LOCATION,  # type: ignore
137            exp.PartitionedByProperty: exp.Properties.Location.POST_SCHEMA_ROOT,
138        }
139
140        TRANSFORMS = {
141            **generator.Generator.TRANSFORMS,  # type: ignore
142            exp.CurrentTimestamp: lambda *_: "CURRENT_TIMESTAMP",
143            exp.ArrayContains: rename_func("REPEATED_CONTAINS"),
144            exp.ArraySize: rename_func("REPEATED_COUNT"),
145            exp.Create: create_with_partitions_sql,
146            exp.DateAdd: _date_add_sql("ADD"),
147            exp.DateStrToDate: datestrtodate_sql,
148            exp.DateSub: _date_add_sql("SUB"),
149            exp.DateToDi: lambda self, e: f"CAST(TO_DATE({self.sql(e, 'this')}, {Drill.dateint_format}) AS INT)",
150            exp.DiToDate: lambda self, e: f"TO_DATE(CAST({self.sql(e, 'this')} AS VARCHAR), {Drill.dateint_format})",
151            exp.If: if_sql,
152            exp.ILike: lambda self, e: f" {self.sql(e, 'this')} `ILIKE` {self.sql(e, 'expression')}",
153            exp.Levenshtein: rename_func("LEVENSHTEIN_DISTANCE"),
154            exp.PartitionedByProperty: lambda self, e: f"PARTITION BY {self.sql(e, 'this')}",
155            exp.Pivot: no_pivot_sql,
156            exp.RegexpLike: rename_func("REGEXP_MATCHES"),
157            exp.StrPosition: str_position_sql,
158            exp.StrToDate: _str_to_date,
159            exp.StrToTime: lambda self, e: f"TO_TIMESTAMP({self.sql(e, 'this')}, {self.format_time(e)})",
160            exp.TimeStrToDate: lambda self, e: f"CAST({self.sql(e, 'this')} AS DATE)",
161            exp.TimeStrToTime: timestrtotime_sql,
162            exp.TimeStrToUnix: rename_func("UNIX_TIMESTAMP"),
163            exp.TimeToStr: lambda self, e: f"TO_CHAR({self.sql(e, 'this')}, {self.format_time(e)})",
164            exp.TimeToUnix: rename_func("UNIX_TIMESTAMP"),
165            exp.TryCast: no_trycast_sql,
166            exp.TsOrDsAdd: lambda self, e: f"DATE_ADD(CAST({self.sql(e, 'this')} AS DATE), {self.sql(exp.Interval(this=e.expression, unit=exp.Var(this='DAY')))})",
167            exp.TsOrDsToDate: _ts_or_ds_to_date_sql,
168            exp.TsOrDiToDi: lambda self, e: f"CAST(SUBSTR(REPLACE(CAST({self.sql(e, 'this')} AS VARCHAR), '-', ''), 1, 8) AS INT)",
169        }
170
171        def normalize_func(self, name: str) -> str:
172            return name if re.match(exp.SAFE_IDENTIFIER_RE, name) else f"`{name}`"
def if_sql( self: sqlglot.generator.Generator, expression: sqlglot.expressions.If) -> str:
43def if_sql(self: generator.Generator, expression: exp.If) -> str:
44    """
45    Drill requires backticks around certain SQL reserved words, IF being one of them,  This function
46    adds the backticks around the keyword IF.
47    Args:
48        self: The Drill dialect
49        expression: The input IF expression
50
51    Returns:  The expression with IF in backticks.
52
53    """
54    expressions = self.format_args(
55        expression.this, expression.args.get("true"), expression.args.get("false")
56    )
57    return f"`IF`({expressions})"

Drill requires backticks around certain SQL reserved words, IF being one of them, This function adds the backticks around the keyword IF.

Arguments:
  • self: The Drill dialect
  • expression: The input IF expression

Returns: The expression with IF in backticks.

class Drill(sqlglot.dialects.dialect.Dialect):
 68class Drill(Dialect):
 69    normalize_functions = None
 70    null_ordering = "nulls_are_last"
 71    date_format = "'yyyy-MM-dd'"
 72    dateint_format = "'yyyyMMdd'"
 73    time_format = "'yyyy-MM-dd HH:mm:ss'"
 74
 75    time_mapping = {
 76        "y": "%Y",
 77        "Y": "%Y",
 78        "YYYY": "%Y",
 79        "yyyy": "%Y",
 80        "YY": "%y",
 81        "yy": "%y",
 82        "MMMM": "%B",
 83        "MMM": "%b",
 84        "MM": "%m",
 85        "M": "%-m",
 86        "dd": "%d",
 87        "d": "%-d",
 88        "HH": "%H",
 89        "H": "%-H",
 90        "hh": "%I",
 91        "h": "%-I",
 92        "mm": "%M",
 93        "m": "%-M",
 94        "ss": "%S",
 95        "s": "%-S",
 96        "SSSSSS": "%f",
 97        "a": "%p",
 98        "DD": "%j",
 99        "D": "%-j",
100        "E": "%a",
101        "EE": "%a",
102        "EEE": "%a",
103        "EEEE": "%A",
104        "''T''": "T",
105    }
106
107    class Tokenizer(tokens.Tokenizer):
108        QUOTES = ["'"]
109        IDENTIFIERS = ["`"]
110        STRING_ESCAPES = ["\\"]
111        ENCODE = "utf-8"
112
113    class Parser(parser.Parser):
114        STRICT_CAST = False
115
116        FUNCTIONS = {
117            **parser.Parser.FUNCTIONS,  # type: ignore
118            "TO_TIMESTAMP": exp.TimeStrToTime.from_arg_list,
119            "TO_CHAR": format_time_lambda(exp.TimeToStr, "drill"),
120        }
121
122    class Generator(generator.Generator):
123        TYPE_MAPPING = {
124            **generator.Generator.TYPE_MAPPING,  # type: ignore
125            exp.DataType.Type.INT: "INTEGER",
126            exp.DataType.Type.SMALLINT: "INTEGER",
127            exp.DataType.Type.TINYINT: "INTEGER",
128            exp.DataType.Type.BINARY: "VARBINARY",
129            exp.DataType.Type.TEXT: "VARCHAR",
130            exp.DataType.Type.NCHAR: "VARCHAR",
131            exp.DataType.Type.TIMESTAMPLTZ: "TIMESTAMP",
132            exp.DataType.Type.TIMESTAMPTZ: "TIMESTAMP",
133            exp.DataType.Type.DATETIME: "TIMESTAMP",
134        }
135
136        PROPERTIES_LOCATION = {
137            **generator.Generator.PROPERTIES_LOCATION,  # type: ignore
138            exp.PartitionedByProperty: exp.Properties.Location.POST_SCHEMA_ROOT,
139        }
140
141        TRANSFORMS = {
142            **generator.Generator.TRANSFORMS,  # type: ignore
143            exp.CurrentTimestamp: lambda *_: "CURRENT_TIMESTAMP",
144            exp.ArrayContains: rename_func("REPEATED_CONTAINS"),
145            exp.ArraySize: rename_func("REPEATED_COUNT"),
146            exp.Create: create_with_partitions_sql,
147            exp.DateAdd: _date_add_sql("ADD"),
148            exp.DateStrToDate: datestrtodate_sql,
149            exp.DateSub: _date_add_sql("SUB"),
150            exp.DateToDi: lambda self, e: f"CAST(TO_DATE({self.sql(e, 'this')}, {Drill.dateint_format}) AS INT)",
151            exp.DiToDate: lambda self, e: f"TO_DATE(CAST({self.sql(e, 'this')} AS VARCHAR), {Drill.dateint_format})",
152            exp.If: if_sql,
153            exp.ILike: lambda self, e: f" {self.sql(e, 'this')} `ILIKE` {self.sql(e, 'expression')}",
154            exp.Levenshtein: rename_func("LEVENSHTEIN_DISTANCE"),
155            exp.PartitionedByProperty: lambda self, e: f"PARTITION BY {self.sql(e, 'this')}",
156            exp.Pivot: no_pivot_sql,
157            exp.RegexpLike: rename_func("REGEXP_MATCHES"),
158            exp.StrPosition: str_position_sql,
159            exp.StrToDate: _str_to_date,
160            exp.StrToTime: lambda self, e: f"TO_TIMESTAMP({self.sql(e, 'this')}, {self.format_time(e)})",
161            exp.TimeStrToDate: lambda self, e: f"CAST({self.sql(e, 'this')} AS DATE)",
162            exp.TimeStrToTime: timestrtotime_sql,
163            exp.TimeStrToUnix: rename_func("UNIX_TIMESTAMP"),
164            exp.TimeToStr: lambda self, e: f"TO_CHAR({self.sql(e, 'this')}, {self.format_time(e)})",
165            exp.TimeToUnix: rename_func("UNIX_TIMESTAMP"),
166            exp.TryCast: no_trycast_sql,
167            exp.TsOrDsAdd: lambda self, e: f"DATE_ADD(CAST({self.sql(e, 'this')} AS DATE), {self.sql(exp.Interval(this=e.expression, unit=exp.Var(this='DAY')))})",
168            exp.TsOrDsToDate: _ts_or_ds_to_date_sql,
169            exp.TsOrDiToDi: lambda self, e: f"CAST(SUBSTR(REPLACE(CAST({self.sql(e, 'this')} AS VARCHAR), '-', ''), 1, 8) AS INT)",
170        }
171
172        def normalize_func(self, name: str) -> str:
173            return name if re.match(exp.SAFE_IDENTIFIER_RE, name) else f"`{name}`"
Drill()
class Drill.Tokenizer(sqlglot.tokens.Tokenizer):
107    class Tokenizer(tokens.Tokenizer):
108        QUOTES = ["'"]
109        IDENTIFIERS = ["`"]
110        STRING_ESCAPES = ["\\"]
111        ENCODE = "utf-8"
class Drill.Parser(sqlglot.parser.Parser):
113    class Parser(parser.Parser):
114        STRICT_CAST = False
115
116        FUNCTIONS = {
117            **parser.Parser.FUNCTIONS,  # type: ignore
118            "TO_TIMESTAMP": exp.TimeStrToTime.from_arg_list,
119            "TO_CHAR": format_time_lambda(exp.TimeToStr, "drill"),
120        }

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 Drill.Generator(sqlglot.generator.Generator):
122    class Generator(generator.Generator):
123        TYPE_MAPPING = {
124            **generator.Generator.TYPE_MAPPING,  # type: ignore
125            exp.DataType.Type.INT: "INTEGER",
126            exp.DataType.Type.SMALLINT: "INTEGER",
127            exp.DataType.Type.TINYINT: "INTEGER",
128            exp.DataType.Type.BINARY: "VARBINARY",
129            exp.DataType.Type.TEXT: "VARCHAR",
130            exp.DataType.Type.NCHAR: "VARCHAR",
131            exp.DataType.Type.TIMESTAMPLTZ: "TIMESTAMP",
132            exp.DataType.Type.TIMESTAMPTZ: "TIMESTAMP",
133            exp.DataType.Type.DATETIME: "TIMESTAMP",
134        }
135
136        PROPERTIES_LOCATION = {
137            **generator.Generator.PROPERTIES_LOCATION,  # type: ignore
138            exp.PartitionedByProperty: exp.Properties.Location.POST_SCHEMA_ROOT,
139        }
140
141        TRANSFORMS = {
142            **generator.Generator.TRANSFORMS,  # type: ignore
143            exp.CurrentTimestamp: lambda *_: "CURRENT_TIMESTAMP",
144            exp.ArrayContains: rename_func("REPEATED_CONTAINS"),
145            exp.ArraySize: rename_func("REPEATED_COUNT"),
146            exp.Create: create_with_partitions_sql,
147            exp.DateAdd: _date_add_sql("ADD"),
148            exp.DateStrToDate: datestrtodate_sql,
149            exp.DateSub: _date_add_sql("SUB"),
150            exp.DateToDi: lambda self, e: f"CAST(TO_DATE({self.sql(e, 'this')}, {Drill.dateint_format}) AS INT)",
151            exp.DiToDate: lambda self, e: f"TO_DATE(CAST({self.sql(e, 'this')} AS VARCHAR), {Drill.dateint_format})",
152            exp.If: if_sql,
153            exp.ILike: lambda self, e: f" {self.sql(e, 'this')} `ILIKE` {self.sql(e, 'expression')}",
154            exp.Levenshtein: rename_func("LEVENSHTEIN_DISTANCE"),
155            exp.PartitionedByProperty: lambda self, e: f"PARTITION BY {self.sql(e, 'this')}",
156            exp.Pivot: no_pivot_sql,
157            exp.RegexpLike: rename_func("REGEXP_MATCHES"),
158            exp.StrPosition: str_position_sql,
159            exp.StrToDate: _str_to_date,
160            exp.StrToTime: lambda self, e: f"TO_TIMESTAMP({self.sql(e, 'this')}, {self.format_time(e)})",
161            exp.TimeStrToDate: lambda self, e: f"CAST({self.sql(e, 'this')} AS DATE)",
162            exp.TimeStrToTime: timestrtotime_sql,
163            exp.TimeStrToUnix: rename_func("UNIX_TIMESTAMP"),
164            exp.TimeToStr: lambda self, e: f"TO_CHAR({self.sql(e, 'this')}, {self.format_time(e)})",
165            exp.TimeToUnix: rename_func("UNIX_TIMESTAMP"),
166            exp.TryCast: no_trycast_sql,
167            exp.TsOrDsAdd: lambda self, e: f"DATE_ADD(CAST({self.sql(e, 'this')} AS DATE), {self.sql(exp.Interval(this=e.expression, unit=exp.Var(this='DAY')))})",
168            exp.TsOrDsToDate: _ts_or_ds_to_date_sql,
169            exp.TsOrDiToDi: lambda self, e: f"CAST(SUBSTR(REPLACE(CAST({self.sql(e, 'this')} AS VARCHAR), '-', ''), 1, 8) AS INT)",
170        }
171
172        def normalize_func(self, name: str) -> str:
173            return name if re.match(exp.SAFE_IDENTIFIER_RE, name) else f"`{name}`"

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 normalize_func(self, name: str) -> str:
172        def normalize_func(self, name: str) -> str:
173            return name if re.match(exp.SAFE_IDENTIFIER_RE, name) else f"`{name}`"
Inherited Members
sqlglot.generator.Generator
Generator
generate
unsupported
sep
seg
pad_comment
maybe_comment
wrap
no_identify
indent
sql
uncache_sql
cache_sql
characterset_sql
column_sql
columndef_sql
columnconstraint_sql
autoincrementcolumnconstraint_sql
checkcolumnconstraint_sql
commentcolumnconstraint_sql
collatecolumnconstraint_sql
encodecolumnconstraint_sql
defaultcolumnconstraint_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
datatype_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
with_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
insert_sql
intersect_sql
intersect_op
introducer_sql
pseudotype_sql
rowformatdelimitedproperty_sql
table_sql
tablesample_sql
pivot_sql
tuple_sql
update_sql
values_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
transaction_sql
commit_sql
rollback_sql
altercolumn_sql
renametable_sql
altertable_sql
droppartition_sql
addconstraint_sql
distinct_sql
ignorenulls_sql
respectnulls_sql
intdiv_sql
dpipe_sql
div_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
format_args
text_width
format_time
expressions
op_expressions
naked_property
set_operation
tag_sql
token_sql
userdefinedfunction_sql
userdefinedfunctionkwarg_sql
joinhint_sql
kwarg_sql
when_sql
merge_sql