File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1876,8 +1876,17 @@ def array_sql(self, expression: exp.Array) -> str:
1876
1876
def map_sql (self , expression : exp .Map | exp .VarMap ) -> str :
1877
1877
keys = expression .args .get ("keys" )
1878
1878
values = expression .args .get ("values" )
1879
-
1880
- return f"MAP[{ self .sql (keys )} ,{ self .sql (values )} ]"
1879
+ final_keys = keys
1880
+ final_values = values
1881
+ if isinstance (keys , exp .Split ):
1882
+ key_str = keys .this .this if isinstance (keys .this , exp .Literal ) else None
1883
+ final_keys = f"'{ key_str } '"
1884
+
1885
+ if (isinstance (values ,exp .Split )):
1886
+ values_str = values .this .this if isinstance (values .this , exp .Literal ) else None
1887
+ final_values = f"'{ values_str } '"
1888
+
1889
+ return f"MAP[{ self .sql (final_keys )} ,{ self .sql (final_values )} ]"
1881
1890
1882
1891
def length_sql (self , expression : exp .Length ) -> str :
1883
1892
"""
You can’t perform that action at this time.
0 commit comments