File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -645,7 +645,7 @@ def substitute(
645645 ) -> exp .Expression | t .List [exp .Expression ] | None :
646646 if isinstance (node , (exp .Identifier , exp .Var )):
647647 if not isinstance (node .parent , exp .Column ):
648- name = node .name
648+ name = node .name . lower ()
649649 if name in args :
650650 return args [name ].copy ()
651651 if name in evaluator .locals :
@@ -678,7 +678,7 @@ def substitute(
678678 return expressions , lambda args : func .this .transform (
679679 substitute ,
680680 {
681- expression .name : arg
681+ expression .name . lower () : arg
682682 for expression , arg in zip (
683683 func .expressions , args .expressions if isinstance (args , exp .Tuple ) else [args ]
684684 )
Original file line number Diff line number Diff line change @@ -292,6 +292,16 @@ def test_ast_correctness(macro_evaluator):
292292 "SELECT 'a' + a_z + 'c' + c_a, 'b' + b_z + 'c' + c_b" ,
293293 {"y" : "c" },
294294 ),
295+ (
296+ """select @each(['a'], x -> @X)""" ,
297+ "SELECT 'a'" ,
298+ {},
299+ ),
300+ (
301+ """select @each(['a'], X -> @x)""" ,
302+ "SELECT 'a'" ,
303+ {},
304+ ),
295305 (
296306 '"is_@{x}"' ,
297307 '"is_b"' ,
You can’t perform that action at this time.
0 commit comments