sqlglot.generators.starrocks
1from __future__ import annotations 2 3 4from sqlglot import exp, transforms 5from sqlglot.dialects.dialect import ( 6 approx_count_distinct_sql, 7 arrow_json_extract_sql, 8 rename_func, 9 unit_to_str, 10 inline_array_sql, 11 property_sql, 12) 13from sqlglot.generators.mysql import MySQLGenerator 14 15 16def _eliminate_between_in_delete(expression: exp.Expr) -> exp.Expr: 17 """ 18 StarRocks doesn't support BETWEEN in DELETE statements, so we convert 19 BETWEEN expressions to explicit comparisons. 20 21 https://docs.starrocks.io/docs/sql-reference/sql-statements/table_bucket_part_index/DELETE/#parameters 22 23 Example: 24 >>> from sqlglot import parse_one 25 >>> expr = parse_one("DELETE FROM t WHERE x BETWEEN 1 AND 10") 26 >>> print(_eliminate_between_in_delete(expr).sql(dialect="starrocks")) 27 DELETE FROM t WHERE x >= 1 AND x <= 10 28 """ 29 if where := expression.args.get("where"): 30 for between in where.find_all(exp.Between): 31 between.replace( 32 exp.and_( 33 exp.GTE(this=between.this.copy(), expression=between.args["low"]), 34 exp.LTE(this=between.this.copy(), expression=between.args["high"]), 35 copy=False, 36 ) 37 ) 38 return expression 39 40 41# https://docs.starrocks.io/docs/sql-reference/sql-functions/spatial-functions/st_distance_sphere/ 42def st_distance_sphere(self, expression: exp.StDistance) -> str: 43 point1 = expression.this 44 point2 = expression.expression 45 46 point1_x = self.func("ST_X", point1) 47 point1_y = self.func("ST_Y", point1) 48 point2_x = self.func("ST_X", point2) 49 point2_y = self.func("ST_Y", point2) 50 51 return self.func("ST_Distance_Sphere", point1_x, point1_y, point2_x, point2_y) 52 53 54class StarRocksGenerator(MySQLGenerator): 55 EXCEPT_INTERSECT_SUPPORT_ALL_CLAUSE = False 56 JSON_TYPE_REQUIRED_FOR_EXTRACTION = False 57 VARCHAR_REQUIRES_SIZE = False 58 PARSE_JSON_NAME: str | None = "PARSE_JSON" 59 WITH_PROPERTIES_PREFIX = "PROPERTIES" 60 UPDATE_STATEMENT_SUPPORTS_FROM = True 61 INSERT_OVERWRITE = " OVERWRITE" 62 63 # StarRocks doesn't support "IS TRUE/FALSE" syntax. 64 IS_BOOL_ALLOWED = False 65 # StarRocks doesn't support renaming a table with a database. 66 RENAME_TABLE_WITH_DB = False 67 68 CAST_MAPPING = {} 69 70 TYPE_MAPPING = { 71 **MySQLGenerator.TYPE_MAPPING, 72 exp.DType.INT128: "LARGEINT", 73 exp.DType.TEXT: "STRING", 74 exp.DType.TIMESTAMP: "DATETIME", 75 exp.DType.TIMESTAMPTZ: "DATETIME", 76 } 77 78 SQL_SECURITY_VIEW_LOCATION = exp.Properties.Location.POST_SCHEMA 79 80 PROPERTIES_LOCATION = { 81 **MySQLGenerator.PROPERTIES_LOCATION, 82 exp.PrimaryKey: exp.Properties.Location.POST_SCHEMA, 83 exp.UniqueKeyProperty: exp.Properties.Location.POST_SCHEMA, 84 exp.RollupProperty: exp.Properties.Location.POST_SCHEMA, 85 exp.PartitionedByProperty: exp.Properties.Location.POST_SCHEMA, 86 } 87 88 TRANSFORMS = { 89 **{k: v for k, v in MySQLGenerator.TRANSFORMS.items() if k is not exp.DateTrunc}, 90 exp.Array: inline_array_sql, 91 exp.ArrayAgg: rename_func("ARRAY_AGG"), 92 exp.ArrayFilter: rename_func("ARRAY_FILTER"), 93 exp.ArrayToString: rename_func("ARRAY_JOIN"), 94 exp.ApproxDistinct: approx_count_distinct_sql, 95 exp.CurrentVersion: lambda *_: "CURRENT_VERSION()", 96 exp.DateDiff: lambda self, e: self.func("DATE_DIFF", unit_to_str(e), e.this, e.expression), 97 exp.Delete: transforms.preprocess([_eliminate_between_in_delete]), 98 exp.Flatten: rename_func("ARRAY_FLATTEN"), 99 exp.JSONExtractScalar: arrow_json_extract_sql, 100 exp.JSONExtract: arrow_json_extract_sql, 101 exp.Property: property_sql, 102 exp.RegexpLike: rename_func("REGEXP"), 103 # Inherited from MySQL, minus operations StarRocks supports natively 104 # (QUALIFY, FULL OUTER JOIN, SEMI/ANTI JOIN) 105 exp.Select: transforms.preprocess( 106 [ 107 transforms.eliminate_distinct_on, 108 transforms.unnest_generate_date_array_using_recursive_cte, 109 ] 110 ), 111 exp.SchemaCommentProperty: lambda self, e: self.naked_property(e), 112 exp.SqlSecurityProperty: lambda self, e: f"SECURITY {self.sql(e.this)}", 113 exp.StDistance: st_distance_sphere, 114 exp.StrToUnix: lambda self, e: self.func("UNIX_TIMESTAMP", e.this, self.format_time(e)), 115 exp.TimestampTrunc: lambda self, e: self.func("DATE_TRUNC", unit_to_str(e), e.this), 116 exp.TimeStrToDate: rename_func("TO_DATE"), 117 exp.UnixToStr: lambda self, e: self.func("FROM_UNIXTIME", e.this, self.format_time(e)), 118 exp.UnixToTime: rename_func("FROM_UNIXTIME"), 119 } 120 121 # https://docs.starrocks.io/docs/sql-reference/sql-statements/keywords/#reserved-keywords 122 RESERVED_KEYWORDS = { 123 "add", 124 "all", 125 "alter", 126 "analyze", 127 "and", 128 "array", 129 "as", 130 "asc", 131 "between", 132 "bigint", 133 "bitmap", 134 "both", 135 "by", 136 "case", 137 "char", 138 "character", 139 "check", 140 "collate", 141 "column", 142 "compaction", 143 "convert", 144 "create", 145 "cross", 146 "cube", 147 "current_date", 148 "current_role", 149 "current_time", 150 "current_timestamp", 151 "current_user", 152 "database", 153 "databases", 154 "decimal", 155 "decimalv2", 156 "decimal32", 157 "decimal64", 158 "decimal128", 159 "default", 160 "deferred", 161 "delete", 162 "dense_rank", 163 "desc", 164 "describe", 165 "distinct", 166 "double", 167 "drop", 168 "dual", 169 "else", 170 "except", 171 "exists", 172 "explain", 173 "false", 174 "first_value", 175 "float", 176 "for", 177 "force", 178 "from", 179 "full", 180 "function", 181 "grant", 182 "group", 183 "grouping", 184 "grouping_id", 185 "groups", 186 "having", 187 "hll", 188 "host", 189 "if", 190 "ignore", 191 "immediate", 192 "in", 193 "index", 194 "infile", 195 "inner", 196 "insert", 197 "int", 198 "integer", 199 "intersect", 200 "into", 201 "is", 202 "join", 203 "json", 204 "key", 205 "keys", 206 "kill", 207 "lag", 208 "largeint", 209 "last_value", 210 "lateral", 211 "lead", 212 "left", 213 "like", 214 "limit", 215 "load", 216 "localtime", 217 "localtimestamp", 218 "maxvalue", 219 "minus", 220 "mod", 221 "not", 222 "ntile", 223 "null", 224 "on", 225 "or", 226 "order", 227 "outer", 228 "outfile", 229 "over", 230 "partition", 231 "percentile", 232 "primary", 233 "procedure", 234 "qualify", 235 "range", 236 "rank", 237 "read", 238 "regexp", 239 "release", 240 "rename", 241 "replace", 242 "revoke", 243 "right", 244 "rlike", 245 "row", 246 "row_number", 247 "rows", 248 "schema", 249 "schemas", 250 "select", 251 "set", 252 "set_var", 253 "show", 254 "smallint", 255 "system", 256 "table", 257 "terminated", 258 "text", 259 "then", 260 "tinyint", 261 "to", 262 "true", 263 "union", 264 "unique", 265 "unsigned", 266 "update", 267 "use", 268 "using", 269 "values", 270 "varchar", 271 "when", 272 "where", 273 "with", 274 } 275 276 def create_sql(self, expression: exp.Create) -> str: 277 # Starrocks' primary key is defined outside of the schema, so we need to move it there 278 schema = expression.this 279 if isinstance(schema, exp.Schema): 280 primary_key = schema.find(exp.PrimaryKey) 281 282 if primary_key: 283 props = expression.args.get("properties") 284 285 if not props: 286 props = exp.Properties(expressions=[]) 287 expression.set("properties", props) 288 289 # Verify if the first one is an engine property. Is true then insert it after the engine, 290 # otherwise insert it at the beginning 291 engine = props.find(exp.EngineProperty) 292 engine_index = (engine.index or 0) if engine else -1 293 props.set("expressions", primary_key.pop(), engine_index + 1, overwrite=False) 294 295 return super().create_sql(expression) 296 297 def partitionedbyproperty_sql(self, expression: exp.PartitionedByProperty) -> str: 298 this = expression.this 299 if isinstance(this, exp.Schema): 300 # For MVs, StarRocks needs outer parentheses. 301 create = expression.find_ancestor(exp.Create) 302 303 sql = self.expressions(this, flat=True) 304 if (create and create.kind == "VIEW") or all( 305 isinstance(col, (exp.Column, exp.Identifier)) for col in this.expressions 306 ): 307 sql = f"({sql})" 308 309 return f"PARTITION BY {sql}" 310 311 return f"PARTITION BY {self.sql(this)}" 312 313 def cluster_sql(self, expression: exp.Cluster) -> str: 314 """Generate StarRocks ORDER BY clause for clustering.""" 315 expressions = self.expressions(expression, flat=True) 316 return f"ORDER BY ({expressions})" if expressions else "" 317 318 def refreshtriggerproperty_sql(self, expression: exp.RefreshTriggerProperty) -> str: 319 """Generate StarRocks REFRESH clause for materialized views. 320 There is a little difference of the syntax between StarRocks and Doris. 321 """ 322 method = self.sql(expression, "method") 323 method = f" {method}" if method else "" 324 kind = self.sql(expression, "kind") 325 kind = f" {kind}" if kind else "" 326 starts = self.sql(expression, "starts") 327 starts = f" START ({starts})" if starts else "" 328 every = self.sql(expression, "every") 329 unit = self.sql(expression, "unit") 330 every = f" EVERY (INTERVAL {every} {unit})" if every and unit else "" 331 332 return f"REFRESH{method}{kind}{starts}{every}"
43def st_distance_sphere(self, expression: exp.StDistance) -> str: 44 point1 = expression.this 45 point2 = expression.expression 46 47 point1_x = self.func("ST_X", point1) 48 point1_y = self.func("ST_Y", point1) 49 point2_x = self.func("ST_X", point2) 50 point2_y = self.func("ST_Y", point2) 51 52 return self.func("ST_Distance_Sphere", point1_x, point1_y, point2_x, point2_y)
55class StarRocksGenerator(MySQLGenerator): 56 EXCEPT_INTERSECT_SUPPORT_ALL_CLAUSE = False 57 JSON_TYPE_REQUIRED_FOR_EXTRACTION = False 58 VARCHAR_REQUIRES_SIZE = False 59 PARSE_JSON_NAME: str | None = "PARSE_JSON" 60 WITH_PROPERTIES_PREFIX = "PROPERTIES" 61 UPDATE_STATEMENT_SUPPORTS_FROM = True 62 INSERT_OVERWRITE = " OVERWRITE" 63 64 # StarRocks doesn't support "IS TRUE/FALSE" syntax. 65 IS_BOOL_ALLOWED = False 66 # StarRocks doesn't support renaming a table with a database. 67 RENAME_TABLE_WITH_DB = False 68 69 CAST_MAPPING = {} 70 71 TYPE_MAPPING = { 72 **MySQLGenerator.TYPE_MAPPING, 73 exp.DType.INT128: "LARGEINT", 74 exp.DType.TEXT: "STRING", 75 exp.DType.TIMESTAMP: "DATETIME", 76 exp.DType.TIMESTAMPTZ: "DATETIME", 77 } 78 79 SQL_SECURITY_VIEW_LOCATION = exp.Properties.Location.POST_SCHEMA 80 81 PROPERTIES_LOCATION = { 82 **MySQLGenerator.PROPERTIES_LOCATION, 83 exp.PrimaryKey: exp.Properties.Location.POST_SCHEMA, 84 exp.UniqueKeyProperty: exp.Properties.Location.POST_SCHEMA, 85 exp.RollupProperty: exp.Properties.Location.POST_SCHEMA, 86 exp.PartitionedByProperty: exp.Properties.Location.POST_SCHEMA, 87 } 88 89 TRANSFORMS = { 90 **{k: v for k, v in MySQLGenerator.TRANSFORMS.items() if k is not exp.DateTrunc}, 91 exp.Array: inline_array_sql, 92 exp.ArrayAgg: rename_func("ARRAY_AGG"), 93 exp.ArrayFilter: rename_func("ARRAY_FILTER"), 94 exp.ArrayToString: rename_func("ARRAY_JOIN"), 95 exp.ApproxDistinct: approx_count_distinct_sql, 96 exp.CurrentVersion: lambda *_: "CURRENT_VERSION()", 97 exp.DateDiff: lambda self, e: self.func("DATE_DIFF", unit_to_str(e), e.this, e.expression), 98 exp.Delete: transforms.preprocess([_eliminate_between_in_delete]), 99 exp.Flatten: rename_func("ARRAY_FLATTEN"), 100 exp.JSONExtractScalar: arrow_json_extract_sql, 101 exp.JSONExtract: arrow_json_extract_sql, 102 exp.Property: property_sql, 103 exp.RegexpLike: rename_func("REGEXP"), 104 # Inherited from MySQL, minus operations StarRocks supports natively 105 # (QUALIFY, FULL OUTER JOIN, SEMI/ANTI JOIN) 106 exp.Select: transforms.preprocess( 107 [ 108 transforms.eliminate_distinct_on, 109 transforms.unnest_generate_date_array_using_recursive_cte, 110 ] 111 ), 112 exp.SchemaCommentProperty: lambda self, e: self.naked_property(e), 113 exp.SqlSecurityProperty: lambda self, e: f"SECURITY {self.sql(e.this)}", 114 exp.StDistance: st_distance_sphere, 115 exp.StrToUnix: lambda self, e: self.func("UNIX_TIMESTAMP", e.this, self.format_time(e)), 116 exp.TimestampTrunc: lambda self, e: self.func("DATE_TRUNC", unit_to_str(e), e.this), 117 exp.TimeStrToDate: rename_func("TO_DATE"), 118 exp.UnixToStr: lambda self, e: self.func("FROM_UNIXTIME", e.this, self.format_time(e)), 119 exp.UnixToTime: rename_func("FROM_UNIXTIME"), 120 } 121 122 # https://docs.starrocks.io/docs/sql-reference/sql-statements/keywords/#reserved-keywords 123 RESERVED_KEYWORDS = { 124 "add", 125 "all", 126 "alter", 127 "analyze", 128 "and", 129 "array", 130 "as", 131 "asc", 132 "between", 133 "bigint", 134 "bitmap", 135 "both", 136 "by", 137 "case", 138 "char", 139 "character", 140 "check", 141 "collate", 142 "column", 143 "compaction", 144 "convert", 145 "create", 146 "cross", 147 "cube", 148 "current_date", 149 "current_role", 150 "current_time", 151 "current_timestamp", 152 "current_user", 153 "database", 154 "databases", 155 "decimal", 156 "decimalv2", 157 "decimal32", 158 "decimal64", 159 "decimal128", 160 "default", 161 "deferred", 162 "delete", 163 "dense_rank", 164 "desc", 165 "describe", 166 "distinct", 167 "double", 168 "drop", 169 "dual", 170 "else", 171 "except", 172 "exists", 173 "explain", 174 "false", 175 "first_value", 176 "float", 177 "for", 178 "force", 179 "from", 180 "full", 181 "function", 182 "grant", 183 "group", 184 "grouping", 185 "grouping_id", 186 "groups", 187 "having", 188 "hll", 189 "host", 190 "if", 191 "ignore", 192 "immediate", 193 "in", 194 "index", 195 "infile", 196 "inner", 197 "insert", 198 "int", 199 "integer", 200 "intersect", 201 "into", 202 "is", 203 "join", 204 "json", 205 "key", 206 "keys", 207 "kill", 208 "lag", 209 "largeint", 210 "last_value", 211 "lateral", 212 "lead", 213 "left", 214 "like", 215 "limit", 216 "load", 217 "localtime", 218 "localtimestamp", 219 "maxvalue", 220 "minus", 221 "mod", 222 "not", 223 "ntile", 224 "null", 225 "on", 226 "or", 227 "order", 228 "outer", 229 "outfile", 230 "over", 231 "partition", 232 "percentile", 233 "primary", 234 "procedure", 235 "qualify", 236 "range", 237 "rank", 238 "read", 239 "regexp", 240 "release", 241 "rename", 242 "replace", 243 "revoke", 244 "right", 245 "rlike", 246 "row", 247 "row_number", 248 "rows", 249 "schema", 250 "schemas", 251 "select", 252 "set", 253 "set_var", 254 "show", 255 "smallint", 256 "system", 257 "table", 258 "terminated", 259 "text", 260 "then", 261 "tinyint", 262 "to", 263 "true", 264 "union", 265 "unique", 266 "unsigned", 267 "update", 268 "use", 269 "using", 270 "values", 271 "varchar", 272 "when", 273 "where", 274 "with", 275 } 276 277 def create_sql(self, expression: exp.Create) -> str: 278 # Starrocks' primary key is defined outside of the schema, so we need to move it there 279 schema = expression.this 280 if isinstance(schema, exp.Schema): 281 primary_key = schema.find(exp.PrimaryKey) 282 283 if primary_key: 284 props = expression.args.get("properties") 285 286 if not props: 287 props = exp.Properties(expressions=[]) 288 expression.set("properties", props) 289 290 # Verify if the first one is an engine property. Is true then insert it after the engine, 291 # otherwise insert it at the beginning 292 engine = props.find(exp.EngineProperty) 293 engine_index = (engine.index or 0) if engine else -1 294 props.set("expressions", primary_key.pop(), engine_index + 1, overwrite=False) 295 296 return super().create_sql(expression) 297 298 def partitionedbyproperty_sql(self, expression: exp.PartitionedByProperty) -> str: 299 this = expression.this 300 if isinstance(this, exp.Schema): 301 # For MVs, StarRocks needs outer parentheses. 302 create = expression.find_ancestor(exp.Create) 303 304 sql = self.expressions(this, flat=True) 305 if (create and create.kind == "VIEW") or all( 306 isinstance(col, (exp.Column, exp.Identifier)) for col in this.expressions 307 ): 308 sql = f"({sql})" 309 310 return f"PARTITION BY {sql}" 311 312 return f"PARTITION BY {self.sql(this)}" 313 314 def cluster_sql(self, expression: exp.Cluster) -> str: 315 """Generate StarRocks ORDER BY clause for clustering.""" 316 expressions = self.expressions(expression, flat=True) 317 return f"ORDER BY ({expressions})" if expressions else "" 318 319 def refreshtriggerproperty_sql(self, expression: exp.RefreshTriggerProperty) -> str: 320 """Generate StarRocks REFRESH clause for materialized views. 321 There is a little difference of the syntax between StarRocks and Doris. 322 """ 323 method = self.sql(expression, "method") 324 method = f" {method}" if method else "" 325 kind = self.sql(expression, "kind") 326 kind = f" {kind}" if kind else "" 327 starts = self.sql(expression, "starts") 328 starts = f" START ({starts})" if starts else "" 329 every = self.sql(expression, "every") 330 unit = self.sql(expression, "unit") 331 every = f" EVERY (INTERVAL {every} {unit})" if every and unit else "" 332 333 return f"REFRESH{method}{kind}{starts}{every}"
Generator converts a given syntax tree to the corresponding SQL string.
Arguments:
- pretty: Whether to format the produced SQL string. Default: False.
- identify: Determines when an identifier should be quoted. Possible values are: False (default): Never quote, except in cases where it's mandatory by the dialect. True: Always quote except for specials cases. 'safe': Only quote identifiers that are case insensitive.
- normalize: Whether to normalize identifiers to lowercase. Default: False.
- pad: The pad size in a formatted string. For example, this affects the indentation of a projection in a query, relative to its nesting level. Default: 2.
- indent: The indentation size in a formatted string. For example, this affects the
indentation of subqueries and filters under a
WHEREclause. Default: 2. - normalize_functions: How to normalize function names. Possible values are: "upper" or True (default): Convert names to uppercase. "lower": Convert names to lowercase. False: Disables function name normalization.
- unsupported_level: Determines the generator's behavior when it encounters unsupported expressions. Default ErrorLevel.WARN.
- max_unsupported: Maximum number of unsupported messages to include in a raised UnsupportedError. This is only relevant if unsupported_level is ErrorLevel.RAISE. Default: 3
- leading_comma: Whether the comma is leading or trailing in select expressions. This is only relevant when generating in pretty mode. Default: False
- max_text_width: The max number of characters in a segment before creating new lines in pretty mode. The default is on the smaller end because the length only represents a segment and not the true line length. Default: 80
- comments: Whether to preserve comments in the output SQL code. Default: True
TYPE_MAPPING =
{<DType.NCHAR: 'NCHAR'>: 'CHAR', <DType.NVARCHAR: 'NVARCHAR'>: 'VARCHAR', <DType.INET: 'INET'>: 'INET', <DType.ROWVERSION: 'ROWVERSION'>: 'VARBINARY', <DType.UBIGINT: 'UBIGINT'>: 'BIGINT', <DType.UINT: 'UINT'>: 'INT', <DType.UMEDIUMINT: 'UMEDIUMINT'>: 'MEDIUMINT', <DType.USMALLINT: 'USMALLINT'>: 'SMALLINT', <DType.UTINYINT: 'UTINYINT'>: 'TINYINT', <DType.UDECIMAL: 'UDECIMAL'>: 'DECIMAL', <DType.UDOUBLE: 'UDOUBLE'>: 'DOUBLE', <DType.DATETIME2: 'DATETIME2'>: 'DATETIME', <DType.SMALLDATETIME: 'SMALLDATETIME'>: 'DATETIME', <DType.TIMESTAMP: 'TIMESTAMP'>: 'DATETIME', <DType.TIMESTAMPNTZ: 'TIMESTAMPNTZ'>: 'DATETIME', <DType.TIMESTAMPTZ: 'TIMESTAMPTZ'>: 'DATETIME', <DType.TIMESTAMPLTZ: 'TIMESTAMPLTZ'>: 'TIMESTAMP', <DType.INT128: 'INT128'>: 'LARGEINT', <DType.TEXT: 'TEXT'>: 'STRING'}
PROPERTIES_LOCATION =
{<class 'sqlglot.expressions.properties.AllowedValuesProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.AlgorithmProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.ApiProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.ApplicationProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.AutoIncrementProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.AutoRefreshProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.BackupProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.BlockCompressionProperty'>: <PropertiesLocation.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.properties.CatalogProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.CharacterSetProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.ChecksumProperty'>: <PropertiesLocation.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.properties.CollateProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.ComputeProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.CopyGrantsProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.query.Cluster'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.ClusteredByProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.DistributedByProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.DuplicateKeyProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.DataBlocksizeProperty'>: <PropertiesLocation.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.properties.DatabaseProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.DataDeletionProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.DefinerProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.DictRange'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.DictProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.DynamicProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.DistKeyProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.DistStyleProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.EmptyProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.EncodeProperty'>: <PropertiesLocation.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.properties.EngineProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.EnviromentProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.HandlerProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.ParameterStyleProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.ExecuteAsProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.ExternalProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.FallbackProperty'>: <PropertiesLocation.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.properties.FileFormatProperty'>: <PropertiesLocation.POST_WITH: 'POST_WITH'>, <class 'sqlglot.expressions.properties.FreespaceProperty'>: <PropertiesLocation.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.properties.GlobalProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.HeapProperty'>: <PropertiesLocation.POST_WITH: 'POST_WITH'>, <class 'sqlglot.expressions.properties.HybridProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.InheritsProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.IcebergProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.IncludeProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.InputModelProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.IsolatedLoadingProperty'>: <PropertiesLocation.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.properties.JournalProperty'>: <PropertiesLocation.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.properties.LanguageProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.LikeProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.LocationProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.LockProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.LockingProperty'>: <PropertiesLocation.POST_ALIAS: 'POST_ALIAS'>, <class 'sqlglot.expressions.properties.LogProperty'>: <PropertiesLocation.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.properties.MaskingProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.MaterializedProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.MergeBlockRatioProperty'>: <PropertiesLocation.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.properties.ModuleProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.NetworkProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.NoPrimaryIndexProperty'>: <PropertiesLocation.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.properties.OnProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.OnCommitProperty'>: <PropertiesLocation.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.query.Order'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.OutputModelProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.PartitionedByProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.PartitionedOfProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.constraints.PrimaryKey'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.Property'>: <PropertiesLocation.POST_WITH: 'POST_WITH'>, <class 'sqlglot.expressions.properties.RefreshTriggerProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.RemoteWithConnectionModelProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.ReturnsProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.RollupProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.RowAccessProperty'>: <PropertiesLocation.UNSUPPORTED: 'UNSUPPORTED'>, <class 'sqlglot.expressions.properties.RowFormatProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.RowFormatDelimitedProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.RowFormatSerdeProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.SampleProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.SchemaCommentProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.SecureProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.SecurityIntegrationProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.SerdeProperties'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.ddl.Set'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.SettingsProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.SetProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.SetConfigProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.SharingProperty'>: <PropertiesLocation.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.ddl.SequenceProperties'>: <PropertiesLocation.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.ddl.TriggerProperties'>: <PropertiesLocation.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.properties.SortKeyProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.SqlReadWriteProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.SqlSecurityProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.StabilityProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.StorageHandlerProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.StreamingTableProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.StrictProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.Tags'>: <PropertiesLocation.POST_WITH: 'POST_WITH'>, <class 'sqlglot.expressions.properties.TemporaryProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.ToTableProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.TransientProperty'>: <PropertiesLocation.UNSUPPORTED: 'UNSUPPORTED'>, <class 'sqlglot.expressions.properties.TransformModelProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.ddl.MergeTreeTTL'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.UnloggedProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.UsingProperty'>: <PropertiesLocation.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.properties.UsingTemplateProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.ViewAttributeProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.VirtualProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.VolatileProperty'>: <PropertiesLocation.UNSUPPORTED: 'UNSUPPORTED'>, <class 'sqlglot.expressions.properties.WithDataProperty'>: <PropertiesLocation.POST_EXPRESSION: 'POST_EXPRESSION'>, <class 'sqlglot.expressions.properties.WithJournalTableProperty'>: <PropertiesLocation.POST_NAME: 'POST_NAME'>, <class 'sqlglot.expressions.properties.WithProcedureOptions'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.WithSchemaBindingProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.WithSystemVersioningProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.ForceProperty'>: <PropertiesLocation.POST_CREATE: 'POST_CREATE'>, <class 'sqlglot.expressions.properties.PartitionByRangeProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.PartitionByListProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>, <class 'sqlglot.expressions.properties.UniqueKeyProperty'>: <PropertiesLocation.POST_SCHEMA: 'POST_SCHEMA'>}
TRANSFORMS =
{<class 'sqlglot.expressions.query.JSONPathFilter'>: <function <lambda>>, <class 'sqlglot.expressions.query.JSONPathKey'>: <function <lambda>>, <class 'sqlglot.expressions.query.JSONPathRecursive'>: <function <lambda>>, <class 'sqlglot.expressions.query.JSONPathRoot'>: <function <lambda>>, <class 'sqlglot.expressions.query.JSONPathScript'>: <function <lambda>>, <class 'sqlglot.expressions.query.JSONPathSelector'>: <function <lambda>>, <class 'sqlglot.expressions.query.JSONPathSlice'>: <function <lambda>>, <class 'sqlglot.expressions.query.JSONPathSubscript'>: <function <lambda>>, <class 'sqlglot.expressions.query.JSONPathUnion'>: <function <lambda>>, <class 'sqlglot.expressions.query.JSONPathWildcard'>: <function <lambda>>, <class 'sqlglot.expressions.core.Adjacent'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.AllowedValuesProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.query.AnalyzeColumns'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.query.AnalyzeWith'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.array.ArrayContainsAll'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.array.ArrayOverlaps'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.AssumeColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.AutoRefreshProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.BackupProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.CaseSpecificColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.math.Ceil'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.CharacterSetColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.CharacterSetProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.ClusteredColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.CollateColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.CommentColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.functions.ConnectByRoot'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.string.ConvertToCharset'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.CopyGrantsProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.CredentialsProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.functions.CurrentCatalog'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.functions.SessionUser'>: <function MySQLGenerator.<lambda>>, <class 'sqlglot.expressions.constraints.DateFormatColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.DefaultColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.ApiProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.ApplicationProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.CatalogProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.ComputeProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.DatabaseProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.DynamicProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.EmptyProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.EncodeColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.query.EndStatement'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.EnviromentProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.HandlerProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.ParameterStyleProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.EphemeralColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.ExcludeColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.ExecuteAsProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.query.Except'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.ExternalProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.math.Floor'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.query.Get'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.GlobalProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.HeapProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.HybridProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.IcebergProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.InheritsProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.InlineLengthColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.InputModelProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.query.Intersect'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.datatypes.IntervalSpan'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.functions.Int64'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.json.JSONBContainsAnyTopKeys'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.json.JSONBContainsAllTopKeys'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.json.JSONBDeleteAtPath'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.json.JSONObject'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.json.JSONObjectAgg'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.LanguageProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.LocationProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.LogProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.MaskingProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.MaterializedProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.functions.NetFunc'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.NetworkProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.NonClusteredColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.NoPrimaryIndexProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.NotForReplicationColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.OnCommitProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.OnProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.OnUpdateColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.core.Operator'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.OutputModelProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.core.ExtendsLeft'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.core.ExtendsRight'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.PathColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.PartitionedByBucket'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.PartitionByTruncate'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.core.PivotAny'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.array.PositionalColumn'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.ProjectionPolicyColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.InvisibleColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.ZeroFillColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.query.Put'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.RemoteWithConnectionModelProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.ReturnsProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.RowAccessProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.core.SafeFunc'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.SampleProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.SecureProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.SecurityIntegrationProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.SetConfigProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.SetProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.SettingsProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.SharingProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.SqlReadWriteProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.SqlSecurityProperty'>: <function StarRocksGenerator.<lambda>>, <class 'sqlglot.expressions.properties.StabilityProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.query.Stream'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.StreamingTableProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.StrictProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.ddl.SwapTable'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.query.TableColumn'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.Tags'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.TemporaryProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.TitleColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.array.ToMap'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.ToTableProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.TransformModelProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.TransientProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.VirtualProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.ddl.TriggerExecute'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.query.Union'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.UnloggedProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.UsingTemplateProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.query.UsingData'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.UppercaseColumnConstraint'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.temporal.UtcDate'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.temporal.UtcTime'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.temporal.UtcTimestamp'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.query.Variadic'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.array.VarMap'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.ViewAttributeProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.VolatileProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.WithJournalTableProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.WithProcedureOptions'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.WithSchemaBindingProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.constraints.WithOperator'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.properties.ForceProperty'>: <function Generator.<lambda>>, <class 'sqlglot.expressions.aggregate.ArrayAgg'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.math.BitwiseAndAgg'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.math.BitwiseOrAgg'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.math.BitwiseXorAgg'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.math.BitwiseCount'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.string.Chr'>: <function MySQLGenerator.<lambda>>, <class 'sqlglot.expressions.temporal.CurrentDate'>: <function no_paren_current_date_sql>, <class 'sqlglot.expressions.functions.CurrentVersion'>: <function StarRocksGenerator.<lambda>>, <class 'sqlglot.expressions.temporal.DateDiff'>: <function StarRocksGenerator.<lambda>>, <class 'sqlglot.expressions.temporal.DateAdd'>: <function _remove_ts_or_ds_to_date.<locals>.func>, <class 'sqlglot.expressions.temporal.DateStrToDate'>: <function datestrtodate_sql>, <class 'sqlglot.expressions.temporal.DateSub'>: <function _remove_ts_or_ds_to_date.<locals>.func>, <class 'sqlglot.expressions.temporal.Day'>: <function _remove_ts_or_ds_to_date.<locals>.func>, <class 'sqlglot.expressions.temporal.DayOfMonth'>: <function _remove_ts_or_ds_to_date.<locals>.func>, <class 'sqlglot.expressions.temporal.DayOfWeek'>: <function _remove_ts_or_ds_to_date.<locals>.func>, <class 'sqlglot.expressions.temporal.DayOfYear'>: <function _remove_ts_or_ds_to_date.<locals>.func>, <class 'sqlglot.expressions.aggregate.GroupConcat'>: <function MySQLGenerator.<lambda>>, <class 'sqlglot.expressions.core.ILike'>: <function no_ilike_sql>, <class 'sqlglot.expressions.json.JSONExtractScalar'>: <function arrow_json_extract_sql>, <class 'sqlglot.expressions.string.Length'>: <function length_or_char_length_sql>, <class 'sqlglot.expressions.aggregate.LogicalOr'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.aggregate.LogicalAnd'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.aggregate.Max'>: <function max_or_greatest>, <class 'sqlglot.expressions.aggregate.Min'>: <function min_or_least>, <class 'sqlglot.expressions.temporal.Month'>: <function _remove_ts_or_ds_to_date.<locals>.func>, <class 'sqlglot.expressions.core.NullSafeEQ'>: <function MySQLGenerator.<lambda>>, <class 'sqlglot.expressions.core.NullSafeNEQ'>: <function MySQLGenerator.<lambda>>, <class 'sqlglot.expressions.string.NumberToStr'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.query.Pivot'>: <function no_pivot_sql>, <class 'sqlglot.expressions.query.Select'>: <function preprocess.<locals>._to_sql>, <class 'sqlglot.expressions.string.StrPosition'>: <function MySQLGenerator.<lambda>>, <class 'sqlglot.expressions.temporal.StrToDate'>: <function _str_to_date_sql>, <class 'sqlglot.expressions.temporal.StrToTime'>: <function _str_to_date_sql>, <class 'sqlglot.expressions.string.Stuff'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.query.TableSample'>: <function no_tablesample_sql>, <class 'sqlglot.expressions.temporal.TimeFromParts'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.temporal.TimestampAdd'>: <function date_add_interval_sql.<locals>.func>, <class 'sqlglot.expressions.temporal.TimestampDiff'>: <function MySQLGenerator.<lambda>>, <class 'sqlglot.expressions.temporal.TimestampSub'>: <function date_add_interval_sql.<locals>.func>, <class 'sqlglot.expressions.temporal.TimeStrToUnix'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.temporal.TimeStrToTime'>: <function MySQLGenerator.<lambda>>, <class 'sqlglot.expressions.temporal.TimeToStr'>: <function _remove_ts_or_ds_to_date.<locals>.func>, <class 'sqlglot.expressions.string.Trim'>: <function trim_sql>, <class 'sqlglot.expressions.math.Trunc'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.functions.TryCast'>: <function no_trycast_sql>, <class 'sqlglot.expressions.temporal.TsOrDsAdd'>: <function date_add_sql.<locals>.func>, <class 'sqlglot.expressions.temporal.TsOrDsDiff'>: <function MySQLGenerator.<lambda>>, <class 'sqlglot.expressions.temporal.TsOrDsToDate'>: <function _ts_or_ds_to_date_sql>, <class 'sqlglot.expressions.string.Unicode'>: <function MySQLGenerator.<lambda>>, <class 'sqlglot.expressions.temporal.UnixToTime'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.temporal.Week'>: <function _remove_ts_or_ds_to_date.<locals>.func>, <class 'sqlglot.expressions.temporal.WeekOfYear'>: <function _remove_ts_or_ds_to_date.<locals>.func>, <class 'sqlglot.expressions.temporal.Year'>: <function _remove_ts_or_ds_to_date.<locals>.func>, <class 'sqlglot.expressions.array.Array'>: <function inline_array_sql>, <class 'sqlglot.expressions.array.ArrayFilter'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.array.ArrayToString'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.core.ApproxDistinct'>: <function approx_count_distinct_sql>, <class 'sqlglot.expressions.dml.Delete'>: <function preprocess.<locals>._to_sql>, <class 'sqlglot.expressions.array.Flatten'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.json.JSONExtract'>: <function arrow_json_extract_sql>, <class 'sqlglot.expressions.properties.Property'>: <function property_sql>, <class 'sqlglot.expressions.core.RegexpLike'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.properties.SchemaCommentProperty'>: <function StarRocksGenerator.<lambda>>, <class 'sqlglot.expressions.array.StDistance'>: <function st_distance_sphere>, <class 'sqlglot.expressions.temporal.StrToUnix'>: <function StarRocksGenerator.<lambda>>, <class 'sqlglot.expressions.temporal.TimestampTrunc'>: <function StarRocksGenerator.<lambda>>, <class 'sqlglot.expressions.temporal.TimeStrToDate'>: <function rename_func.<locals>.<lambda>>, <class 'sqlglot.expressions.temporal.UnixToStr'>: <function StarRocksGenerator.<lambda>>}
RESERVED_KEYWORDS =
{'insert', 'collate', 'current_date', 'host', 'bigint', 'release', 'revoke', 'maxvalue', 'decimal', 'ntile', 'first_value', 'as', 'force', 'not', 'largeint', 'grouping', 'database', 'table', 'primary', 'hll', 'last_value', 'union', 'decimal128', 'localtime', 'between', 'when', 'dense_rank', 'localtimestamp', 'desc', 'show', 'qualify', 'rows', 'system', 'index', 'databases', 'values', 'to', 'true', 'groups', 'compaction', 'decimalv2', 'varchar', 'create', 'drop', 'delete', 'current_timestamp', 'infile', 'asc', 'is', 'tinyint', 'regexp', 'function', 'grouping_id', 'array', 'order', 'mod', 'lead', 'for', 'percentile', 'current_role', 'case', 'describe', 'column', 'limit', 'replace', 'like', 'procedure', 'grant', 'then', 'outer', 'or', 'lag', 'distinct', 'rlike', 'schema', 'smallint', 'load', 'select', 'decimal64', 'rename', 'read', 'char', 'join', 'else', 'use', 'cube', 'integer', 'ignore', 'unsigned', 'current_time', 'where', 'set', 'rank', 'row_number', 'alter', 'left', 'all', 'deferred', 'check', 'convert', 'outfile', 'partition', 'analyze', 'update', 'null', 'false', 'character', 'from', 'bitmap', 'both', 'on', 'explain', 'kill', 'exists', 'inner', 'json', 'cross', 'int', 'row', 'with', 'right', 'default', 'into', 'range', 'over', 'terminated', 'full', 'having', 'immediate', 'current_user', 'intersect', 'key', 'double', 'text', 'lateral', 'and', 'group', 'by', 'using', 'keys', 'decimal32', 'unique', 'dual', 'add', 'float', 'minus', 'except', 'if', 'set_var', 'in', 'schemas'}
277 def create_sql(self, expression: exp.Create) -> str: 278 # Starrocks' primary key is defined outside of the schema, so we need to move it there 279 schema = expression.this 280 if isinstance(schema, exp.Schema): 281 primary_key = schema.find(exp.PrimaryKey) 282 283 if primary_key: 284 props = expression.args.get("properties") 285 286 if not props: 287 props = exp.Properties(expressions=[]) 288 expression.set("properties", props) 289 290 # Verify if the first one is an engine property. Is true then insert it after the engine, 291 # otherwise insert it at the beginning 292 engine = props.find(exp.EngineProperty) 293 engine_index = (engine.index or 0) if engine else -1 294 props.set("expressions", primary_key.pop(), engine_index + 1, overwrite=False) 295 296 return super().create_sql(expression)
def
partitionedbyproperty_sql( self, expression: sqlglot.expressions.properties.PartitionedByProperty) -> str:
298 def partitionedbyproperty_sql(self, expression: exp.PartitionedByProperty) -> str: 299 this = expression.this 300 if isinstance(this, exp.Schema): 301 # For MVs, StarRocks needs outer parentheses. 302 create = expression.find_ancestor(exp.Create) 303 304 sql = self.expressions(this, flat=True) 305 if (create and create.kind == "VIEW") or all( 306 isinstance(col, (exp.Column, exp.Identifier)) for col in this.expressions 307 ): 308 sql = f"({sql})" 309 310 return f"PARTITION BY {sql}" 311 312 return f"PARTITION BY {self.sql(this)}"
314 def cluster_sql(self, expression: exp.Cluster) -> str: 315 """Generate StarRocks ORDER BY clause for clustering.""" 316 expressions = self.expressions(expression, flat=True) 317 return f"ORDER BY ({expressions})" if expressions else ""
Generate StarRocks ORDER BY clause for clustering.
def
refreshtriggerproperty_sql( self, expression: sqlglot.expressions.properties.RefreshTriggerProperty) -> str:
319 def refreshtriggerproperty_sql(self, expression: exp.RefreshTriggerProperty) -> str: 320 """Generate StarRocks REFRESH clause for materialized views. 321 There is a little difference of the syntax between StarRocks and Doris. 322 """ 323 method = self.sql(expression, "method") 324 method = f" {method}" if method else "" 325 kind = self.sql(expression, "kind") 326 kind = f" {kind}" if kind else "" 327 starts = self.sql(expression, "starts") 328 starts = f" START ({starts})" if starts else "" 329 every = self.sql(expression, "every") 330 unit = self.sql(expression, "unit") 331 every = f" EVERY (INTERVAL {every} {unit})" if every and unit else "" 332 333 return f"REFRESH{method}{kind}{starts}{every}"
Generate StarRocks REFRESH clause for materialized views. There is a little difference of the syntax between StarRocks and Doris.
Inherited Members
- sqlglot.generator.Generator
- Generator
- WINDOW_FUNCS_WITH_NULL_ORDERING
- IGNORE_NULLS_IN_FUNC
- IGNORE_NULLS_BEFORE_ORDER
- CREATE_FUNCTION_RETURN_AS
- MATCHED_BY_SOURCE
- SUPPORTS_MERGE_WHERE
- SINGLE_STRING_INTERVAL
- GROUPINGS_SEP
- INDEX_ON
- INOUT_SEPARATOR
- DIRECTED_JOINS
- QUERY_HINTS
- LIMIT_IS_TOP
- RETURNING_END
- EXTRACT_ALLOWS_QUOTES
- TZ_TO_WITH_TIME_ZONE
- ALTER_TABLE_INCLUDE_COLUMN_KEYWORD
- UNNEST_WITH_ORDINALITY
- AGGREGATE_FILTER_SUPPORTED
- SEMI_ANTI_JOIN_WITH_SIDE
- COMPUTED_COLUMN_WITH_TYPE
- SUPPORTS_TABLE_COPY
- TABLESAMPLE_REQUIRES_PARENS
- TABLESAMPLE_SIZE_IS_ROWS
- TABLESAMPLE_KEYWORDS
- TABLESAMPLE_WITH_METHOD
- TABLESAMPLE_SEED_KEYWORD
- COLLATE_IS_FUNC
- DATA_TYPE_SPECIFIERS_ALLOWED
- ENSURE_BOOLS
- CTE_RECURSIVE_KEYWORD_REQUIRED
- SUPPORTS_SINGLE_ARG_CONCAT
- SUPPORTS_TABLE_ALIAS_COLUMNS
- UNPIVOT_ALIASES_ARE_IDENTIFIERS
- SUPPORTS_SELECT_INTO
- SUPPORTS_UNLOGGED_TABLES
- SUPPORTS_CREATE_TABLE_LIKE
- LIKE_PROPERTY_INSIDE_SCHEMA
- MULTI_ARG_DISTINCT
- JSON_PATH_SINGLE_QUOTE_ESCAPE
- SUPPORTED_JSON_PATH_PARTS
- CAN_IMPLEMENT_ARRAY_ANY
- SUPPORTS_WINDOW_EXCLUDE
- SET_OP_MODIFIERS
- COPY_PARAMS_ARE_WRAPPED
- COPY_PARAMS_EQ_REQUIRED
- COPY_HAS_INTO_KEYWORD
- UNICODE_SUBSTITUTE
- STAR_EXCEPT
- HEX_FUNC
- QUOTE_JSON_PATH
- SUPPORTS_EXPLODING_PROJECTIONS
- ARRAY_CONCAT_IS_VAR_LEN
- SUPPORTS_CONVERT_TIMEZONE
- SUPPORTS_UNIX_SECONDS
- ALTER_SET_WRAPPED
- NORMALIZE_EXTRACT_DATE_PARTS
- ARRAY_SIZE_NAME
- ALTER_SET_TYPE
- ARRAY_SIZE_DIM_REQUIRED
- SUPPORTS_BETWEEN_FLAGS
- SUPPORTS_LIKE_QUANTIFIERS
- MATCH_AGAINST_TABLE_PREFIX
- SET_ASSIGNMENT_REQUIRES_VARIABLE_KEYWORD
- DECLARE_DEFAULT_ASSIGNMENT
- STAR_EXCLUDE_REQUIRES_DERIVED_TABLE
- SUPPORTS_DROP_ALTER_ICEBERG_PROPERTY
- UNSUPPORTED_TYPES
- TIME_PART_SINGULARS
- TOKEN_MAPPING
- STRUCT_DELIMITER
- PARAMETER_TOKEN
- NAMED_PLACEHOLDER_TOKEN
- EXPRESSION_PRECEDES_PROPERTIES_CREATABLES
- WITH_SEPARATED_COMMENTS
- EXCLUDE_COMMENTS
- UNWRAPPED_INTERVAL_VALUES
- PARAMETERIZABLE_TEXT_TYPES
- EXPRESSIONS_WITHOUT_NESTED_CTES
- RESPECT_IGNORE_NULLS_UNSUPPORTED_EXPRESSIONS
- SAFE_JSON_PATH_KEY_RE
- SENTINEL_LINE_BREAK
- pretty
- identify
- normalize
- pad
- unsupported_level
- max_unsupported
- leading_comma
- max_text_width
- comments
- dialect
- normalize_functions
- unsupported_messages
- generate
- preprocess
- unsupported
- sep
- seg
- sanitize_comment
- maybe_comment
- wrap
- no_identify
- normalize_func
- indent
- sql
- uncache_sql
- cache_sql
- characterset_sql
- column_parts
- column_sql
- pseudocolumn_sql
- columnposition_sql
- columndef_sql
- columnconstraint_sql
- autoincrementcolumnconstraint_sql
- compresscolumnconstraint_sql
- generatedasidentitycolumnconstraint_sql
- generatedasrowcolumnconstraint_sql
- periodforsystemtimeconstraint_sql
- notnullcolumnconstraint_sql
- primarykeycolumnconstraint_sql
- uniquecolumnconstraint_sql
- inoutcolumnconstraint_sql
- createable_sql
- sequenceproperties_sql
- triggerproperties_sql
- triggerreferencing_sql
- triggerevent_sql
- clone_sql
- describe_sql
- heredoc_sql
- prepend_ctes
- with_sql
- cte_sql
- tablealias_sql
- bitstring_sql
- hexstring_sql
- bytestring_sql
- unicodestring_sql
- rawstring_sql
- datatypeparam_sql
- directory_sql
- delete_sql
- drop_sql
- set_operation
- set_operations
- fetch_sql
- limitoptions_sql
- filter_sql
- hint_sql
- indexparameters_sql
- index_sql
- identifier_sql
- hex_sql
- lowerhex_sql
- inputoutputformat_sql
- national_sql
- properties_sql
- root_properties
- properties
- with_properties
- property_name
- property_sql
- uuidproperty_sql
- likeproperty_sql
- fallbackproperty_sql
- journalproperty_sql
- freespaceproperty_sql
- checksumproperty_sql
- mergeblockratioproperty_sql
- moduleproperty_sql
- datablocksizeproperty_sql
- blockcompressionproperty_sql
- isolatedloadingproperty_sql
- partitionboundspec_sql
- partitionedofproperty_sql
- lockingproperty_sql
- withdataproperty_sql
- withsystemversioningproperty_sql
- insert_sql
- introducer_sql
- kill_sql
- pseudotype_sql
- objectidentifier_sql
- onconflict_sql
- returning_sql
- rowformatdelimitedproperty_sql
- withtablehint_sql
- indextablehint_sql
- historicaldata_sql
- table_parts
- table_sql
- tablefromrows_sql
- tablesample_sql
- pivot_sql
- version_sql
- tuple_sql
- update_sql
- values_sql
- var_sql
- into_sql
- from_sql
- groupingsets_sql
- rollup_sql
- rollupindex_sql
- rollupproperty_sql
- cube_sql
- group_sql
- having_sql
- connect_sql
- prior_sql
- join_sql
- lambda_sql
- lateral_op
- lateral_sql
- limit_sql
- offset_sql
- setitem_sql
- set_sql
- queryband_sql
- pragma_sql
- lock_sql
- literal_sql
- escape_str
- loaddata_sql
- null_sql
- boolean_sql
- booland_sql
- boolor_sql
- order_sql
- withfill_sql
- distribute_sql
- sort_sql
- ordered_sql
- matchrecognizemeasure_sql
- matchrecognize_sql
- query_modifiers
- options_modifier
- for_modifiers
- queryoption_sql
- offset_limit_modifiers
- after_limit_modifiers
- select_sql
- schema_sql
- schema_columns_sql
- star_sql
- parameter_sql
- sessionparameter_sql
- placeholder_sql
- subquery_sql
- qualify_sql
- unnest_sql
- prewhere_sql
- where_sql
- window_sql
- partition_by_sql
- windowspec_sql
- withingroup_sql
- between_sql
- bracket_offset_expressions
- bracket_sql
- all_sql
- any_sql
- exists_sql
- case_sql
- constraint_sql
- nextvaluefor_sql
- trim_sql
- convert_concat_args
- concat_sql
- concatws_sql
- check_sql
- foreignkey_sql
- primarykey_sql
- if_sql
- matchagainst_sql
- jsonkeyvalue_sql
- jsonpath_sql
- json_path_part
- formatjson_sql
- formatphrase_sql
- jsonarray_sql
- jsonarrayagg_sql
- jsoncolumndef_sql
- jsonschema_sql
- jsontable_sql
- openjsoncolumndef_sql
- openjson_sql
- in_sql
- in_unnest_op
- interval_sql
- return_sql
- reference_sql
- anonymous_sql
- paren_sql
- neg_sql
- not_sql
- alias_sql
- pivotalias_sql
- aliases_sql
- atindex_sql
- fromtimezone_sql
- add_sql
- and_sql
- or_sql
- xor_sql
- connector_sql
- bitwiseand_sql
- bitwiseleftshift_sql
- bitwisenot_sql
- bitwiseor_sql
- bitwiserightshift_sql
- bitwisexor_sql
- strtotime_sql
- currentdate_sql
- collate_sql
- command_sql
- comment_sql
- mergetreettlaction_sql
- mergetreettl_sql
- transaction_sql
- commit_sql
- rollback_sql
- alterindex_sql
- alterdiststyle_sql
- altersortkey_sql
- renamecolumn_sql
- alterset_sql
- alter_sql
- altersession_sql
- add_column_sql
- droppartition_sql
- addconstraint_sql
- addpartition_sql
- distinct_sql
- respectnulls_sql
- havingmax_sql
- intdiv_sql
- div_sql
- safedivide_sql
- overlaps_sql
- distance_sql
- dot_sql
- eq_sql
- propertyeq_sql
- escape_sql
- glob_sql
- gt_sql
- gte_sql
- is_sql
- like_sql
- ilike_sql
- match_sql
- similarto_sql
- lt_sql
- lte_sql
- mod_sql
- mul_sql
- neq_sql
- nullsafeeq_sql
- nullsafeneq_sql
- sub_sql
- trycast_sql
- jsoncast_sql
- try_sql
- log_sql
- use_sql
- binary
- ceil_floor
- function_fallback_sql
- func
- format_args
- too_wide
- format_time
- expressions
- op_expressions
- naked_property
- tag_sql
- token_sql
- userdefinedfunction_sql
- joinhint_sql
- kwarg_sql
- when_sql
- whens_sql
- merge_sql
- tochar_sql
- tonumber_sql
- dictproperty_sql
- dictrange_sql
- dictsubproperty_sql
- duplicatekeyproperty_sql
- uniquekeyproperty_sql
- distributedbyproperty_sql
- oncluster_sql
- clusteredbyproperty_sql
- anyvalue_sql
- querytransform_sql
- indexconstraintoption_sql
- checkcolumnconstraint_sql
- indexcolumnconstraint_sql
- nvl2_sql
- comprehension_sql
- columnprefix_sql
- opclass_sql
- predict_sql
- generateembedding_sql
- generatetext_sql
- generatetable_sql
- generatebool_sql
- generateint_sql
- generatedouble_sql
- mltranslate_sql
- mlforecast_sql
- aiforecast_sql
- featuresattime_sql
- vectorsearch_sql
- forin_sql
- refresh_sql
- toarray_sql
- tsordstotime_sql
- tsordstotimestamp_sql
- tsordstodatetime_sql
- tsordstodate_sql
- unixdate_sql
- lastday_sql
- dateadd_sql
- arrayany_sql
- struct_sql
- truncatetable_sql
- convert_sql
- copyparameter_sql
- credentials_sql
- copy_sql
- semicolon_sql
- datadeletionproperty_sql
- maskingpolicycolumnconstraint_sql
- gapfill_sql
- scope_resolution
- scoperesolution_sql
- parsejson_sql
- rand_sql
- changes_sql
- pad_sql
- summarize_sql
- explodinggenerateseries_sql
- json_sql
- jsonvalue_sql
- skipjsoncolumn_sql
- conditionalinsert_sql
- multitableinserts_sql
- oncondition_sql
- jsonextractquote_sql
- jsonexists_sql
- arrayagg_sql
- slice_sql
- apply_sql
- grant_sql
- revoke_sql
- grantprivilege_sql
- grantprincipal_sql
- columns_sql
- overlay_sql
- todouble_sql
- string_sql
- median_sql
- overflowtruncatebehavior_sql
- unixseconds_sql
- arraysize_sql
- attach_sql
- detach_sql
- attachoption_sql
- watermarkcolumnconstraint_sql
- encodeproperty_sql
- includeproperty_sql
- xmlelement_sql
- xmlkeyvalueoption_sql
- partitionbyrangepropertydynamic_sql
- unpivotcolumns_sql
- analyzesample_sql
- analyzestatistics_sql
- analyzehistogram_sql
- analyzedelete_sql
- analyzelistchainedrows_sql
- analyzevalidate_sql
- analyze_sql
- xmltable_sql
- xmlnamespace_sql
- export_sql
- declare_sql
- declareitem_sql
- recursivewithsearch_sql
- parameterizedagg_sql
- anonymousaggfunc_sql
- combinedaggfunc_sql
- combinedparameterizedagg_sql
- install_sql
- get_put_sql
- translatecharacters_sql
- decodecase_sql
- semanticview_sql
- getextract_sql
- datefromunixdate_sql
- space_sql
- buildproperty_sql
- modelattribute_sql
- directorystage_sql
- uuid_sql
- initcap_sql
- localtime_sql
- localtimestamp_sql
- weekstart_sql
- chr_sql
- block_sql
- storedprocedure_sql
- ifblock_sql
- whileblock_sql
- execute_sql
- executesql_sql
- altermodifysqlsecurity_sql
- usingproperty_sql
- renameindex_sql
- sqlglot.generators.mysql.MySQLGenerator
- SELECT_KINDS
- TRY_SUPPORTED
- SUPPORTS_UESCAPE
- SUPPORTS_DECODE_CASE
- AFTER_HAVING_MODIFIER_TRANSFORMS
- INTERVAL_ALLOWS_PLURAL_FORM
- LOCKING_READS_SUPPORTED
- NULL_ORDERING_SUPPORTED
- JOIN_HINTS
- TABLE_HINTS
- DUPLICATE_KEY_UPDATE_WITH_SET
- QUERY_HINT_SEP
- VALUES_AS_TABLE
- NVL2_SUPPORTED
- LAST_DAY_SUPPORTS_DATE_PART
- JSON_PATH_BRACKETED_KEY_SUPPORTED
- JSON_KEY_VALUE_PAIR_SEP
- SUPPORTS_TO_NUMBER
- PAD_FILL_PATTERN_IS_REQUIRED
- WRAP_DERIVED_VALUES
- SUPPORTS_MEDIAN
- UNSIGNED_TYPE_MAPPING
- TIMESTAMP_TYPE_MAPPING
- LIMIT_FETCH
- LIMIT_ONLY_LITERALS
- CHAR_CAST_MAPPING
- SIGNED_CAST_MAPPING
- TIMESTAMP_FUNC_TYPES
- locate_properties
- computedcolumnconstraint_sql
- array_sql
- arraycontainsall_sql
- dpipe_sql
- extract_sql
- datatype_sql
- jsonarraycontains_sql
- cast_sql
- show_sql
- alterrename_sql
- altercolumn_sql
- timestamptrunc_sql
- converttimezone_sql
- attimezone_sql
- isascii_sql
- ignorenulls_sql
- currentschema_sql
- partition_sql
- partitionbyrangeproperty_sql
- partitionbylistproperty_sql
- partitionlist_sql
- partitionrange_sql