File tree Expand file tree Collapse file tree 5 files changed +8
-7
lines changed
Expand file tree Collapse file tree 5 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 4444 "requests" ,
4545 "rich" ,
4646 "ruamel.yaml" ,
47- "sqlglot~=14.0 .0" ,
47+ "sqlglot~=14.1 .0" ,
4848 "fsspec" ,
4949 ],
5050 extras_require = {
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ def parse(self: Parser) -> t.Optional[exp.Expression]:
236236 value : t .Optional [exp .Expression | str ]
237237
238238 if key in table_keys :
239- value = exp .table_name (self ._parse_table ())
239+ value = exp .table_name (self ._parse_table_parts ())
240240 elif key == "columns" :
241241 value = self ._parse_schema ()
242242 elif key == "kind" :
Original file line number Diff line number Diff line change @@ -168,13 +168,12 @@ def create_index(
168168 """
169169 if not self .SUPPORTS_INDEXES :
170170 return
171+
171172 expression = exp .Create (
172173 this = exp .Index (
173174 this = exp .to_identifier (index_name ),
174175 table = exp .to_table (table_name ),
175- columns = exp .Tuple (
176- expressions = [exp .to_column (c ) for c in columns ],
177- ),
176+ columns = [exp .to_column (c ) for c in columns ],
178177 ),
179178 kind = "INDEX" ,
180179 exists = exists ,
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ def _expand(node: exp.Expression) -> exp.Expression:
250250 query .set ("with" , with_ )
251251
252252 if mapping :
253- return exp .replace_tables (query , mapping )
253+ return exp .replace_tables (t . cast ( exp . Subqueryable , query ) , mapping )
254254
255255 if not isinstance (query , exp .Subqueryable ):
256256 raise_config_error (f"Query needs to be a SELECT or a UNION { query } ." , self ._path )
Original file line number Diff line number Diff line change 1+ import typing as t
2+
13import pytest
24from sqlglot import exp , parse_one
35
911def filter_country (
1012 evaluator : MacroEvaluator , expression : exp .Condition , country : str
1113) -> exp .Condition :
12- return exp .and_ (expression , exp .column ("country" ).eq (country ))
14+ return t . cast ( exp .Condition , exp . and_ (expression , exp .column ("country" ).eq (country ) ))
1315
1416
1517@macro ("UPPER" )
You can’t perform that action at this time.
0 commit comments