File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1085,7 +1085,8 @@ def strposition_sql(
10851085 if supports_occurrence and occurrence and supports_position and not position :
10861086 position = one
10871087
1088- if position and not supports_position :
1088+ transpile_position = position and not supports_position
1089+ if transpile_position :
10891090 string = exp .Substring (this = string , start = position )
10901091
10911092 if func_name == "POSITION" and use_ansi_position :
@@ -1101,7 +1102,7 @@ def strposition_sql(
11011102 self .unsupported (f"{ func_name } does not support the occurrence parameter." )
11021103 func = exp .Anonymous (this = func_name , expressions = args )
11031104
1104- if position and not supports_position :
1105+ if transpile_position :
11051106 func_with_offset = exp .Sub (this = func + position , expression = one )
11061107 func_wrapped = exp .If (this = func .eq (zero ), true = zero , false = func_with_offset )
11071108 return self .sql (func_wrapped )
You can’t perform that action at this time.
0 commit comments