@@ -331,7 +331,7 @@ def _build_capitalization_sql(
331331) -> str :
332332 # empty string delimiter --> treat value as one word, no need to split
333333 if raw_delimiters_sql == "''" :
334- return f"UPPER(LEFT({ value_to_split } , 1)) || LOWER(SUBSTR ({ value_to_split } , 2))"
334+ return f"UPPER(LEFT({ value_to_split } , 1)) || LOWER(SUBSTRING ({ value_to_split } , 2))"
335335
336336 regex_ready_sql = escaped_delimiters_sql or raw_delimiters_sql
337337 delim_regex_sql = regex_ready_sql
@@ -351,14 +351,14 @@ def _build_capitalization_sql(
351351 self .func (
352352 "LIST_TRANSFORM" ,
353353 self .func ("REGEXP_EXTRACT_ALL" , value_to_split , split_regex_sql ),
354- "(seg, idx) -> CASE WHEN idx % 2 = 0 THEN UPPER(LEFT(seg, 1)) || LOWER(SUBSTR (seg, 2)) ELSE seg END" ,
354+ "(seg, idx) -> CASE WHEN idx % 2 = 0 THEN UPPER(LEFT(seg, 1)) || LOWER(SUBSTRING (seg, 2)) ELSE seg END" ,
355355 ),
356356 )
357357 .else_ (
358358 self .func (
359359 "LIST_TRANSFORM" ,
360360 self .func ("REGEXP_EXTRACT_ALL" , value_to_split , split_regex_sql ),
361- "(seg, idx) -> CASE WHEN idx % 2 = 1 THEN UPPER(LEFT(seg, 1)) || LOWER(SUBSTR (seg, 2)) ELSE seg END" ,
361+ "(seg, idx) -> CASE WHEN idx % 2 = 1 THEN UPPER(LEFT(seg, 1)) || LOWER(SUBSTRING (seg, 2)) ELSE seg END" ,
362362 ),
363363 ),
364364 "''" ,
0 commit comments