@@ -951,7 +951,7 @@ def test_time(self):
951951 write = {
952952 "duckdb" : "SUBSTRING(CAST(x AS TEXT), 1, 10)" ,
953953 "hive" : "SUBSTRING(CAST(x AS STRING), 1, 10)" ,
954- "presto" : "SUBSTRING (CAST(x AS VARCHAR), 1, 10)" ,
954+ "presto" : "SUBSTR (CAST(x AS VARCHAR), 1, 10)" ,
955955 "doris" : "SUBSTRING(CAST(x AS STRING), 1, 10)" ,
956956 },
957957 )
@@ -2403,7 +2403,7 @@ def test_operators(self):
24032403 self .validate_all (
24042404 "STR_POSITION(haystack, needle, position)" ,
24052405 write = {
2406- "athena" : "IF(STRPOS(SUBSTRING (haystack, position), needle) = 0, 0, STRPOS(SUBSTRING (haystack, position), needle) + position - 1)" ,
2406+ "athena" : "IF(STRPOS(SUBSTR (haystack, position), needle) = 0, 0, STRPOS(SUBSTR (haystack, position), needle) + position - 1)" ,
24072407 "bigquery" : "INSTR(haystack, needle, position)" ,
24082408 "clickhouse" : "POSITION(haystack, needle, position)" ,
24092409 "databricks" : "LOCATE(needle, haystack, position)" ,
@@ -2415,7 +2415,7 @@ def test_operators(self):
24152415 "mysql" : "LOCATE(needle, haystack, position)" ,
24162416 "oracle" : "INSTR(haystack, needle, position)" ,
24172417 "postgres" : "CASE WHEN POSITION(needle IN SUBSTRING(haystack FROM position)) = 0 THEN 0 ELSE POSITION(needle IN SUBSTRING(haystack FROM position)) + position - 1 END" ,
2418- "presto" : "IF(STRPOS(SUBSTRING (haystack, position), needle) = 0, 0, STRPOS(SUBSTRING (haystack, position), needle) + position - 1)" ,
2418+ "presto" : "IF(STRPOS(SUBSTR (haystack, position), needle) = 0, 0, STRPOS(SUBSTR (haystack, position), needle) + position - 1)" ,
24192419 "redshift" : "CASE WHEN POSITION(needle IN SUBSTRING(haystack FROM position)) = 0 THEN 0 ELSE POSITION(needle IN SUBSTRING(haystack FROM position)) + position - 1 END" ,
24202420 "risingwave" : "CASE WHEN POSITION(needle IN SUBSTRING(haystack FROM position)) = 0 THEN 0 ELSE POSITION(needle IN SUBSTRING(haystack FROM position)) + position - 1 END" ,
24212421 "snowflake" : "CHARINDEX(needle, haystack, position)" ,
@@ -2424,7 +2424,7 @@ def test_operators(self):
24242424 "sqlite" : "IIF(INSTR(SUBSTRING(haystack, position), needle) = 0, 0, INSTR(SUBSTRING(haystack, position), needle) + position - 1)" ,
24252425 "tableau" : "IF FIND(SUBSTRING(haystack, position), needle) = 0 THEN 0 ELSE FIND(SUBSTRING(haystack, position), needle) + position - 1 END" ,
24262426 "teradata" : "INSTR(haystack, needle, position)" ,
2427- "trino" : "IF(STRPOS(SUBSTRING (haystack, position), needle) = 0, 0, STRPOS(SUBSTRING (haystack, position), needle) + position - 1)" ,
2427+ "trino" : "IF(STRPOS(SUBSTR (haystack, position), needle) = 0, 0, STRPOS(SUBSTR (haystack, position), needle) + position - 1)" ,
24282428 "tsql" : "CHARINDEX(needle, haystack, position)" ,
24292429 },
24302430 )
@@ -2438,10 +2438,10 @@ def test_operators(self):
24382438 write = {
24392439 "bigquery" : "INSTR(haystack, needle, position, occurrence)" ,
24402440 "oracle" : "INSTR(haystack, needle, position, occurrence)" ,
2441- "presto" : "IF(STRPOS(SUBSTRING (haystack, position), needle, occurrence) = 0, 0, STRPOS(SUBSTRING (haystack, position), needle, occurrence) + position - 1)" ,
2441+ "presto" : "IF(STRPOS(SUBSTR (haystack, position), needle, occurrence) = 0, 0, STRPOS(SUBSTR (haystack, position), needle, occurrence) + position - 1)" ,
24422442 "tableau" : "IF FINDNTH(SUBSTRING(haystack, position), needle, occurrence) = 0 THEN 0 ELSE FINDNTH(SUBSTRING(haystack, position), needle, occurrence) + position - 1 END" ,
24432443 "teradata" : "INSTR(haystack, needle, position, occurrence)" ,
2444- "trino" : "IF(STRPOS(SUBSTRING (haystack, position), needle, occurrence) = 0, 0, STRPOS(SUBSTRING (haystack, position), needle, occurrence) + position - 1)" ,
2444+ "trino" : "IF(STRPOS(SUBSTR (haystack, position), needle, occurrence) = 0, 0, STRPOS(SUBSTR (haystack, position), needle, occurrence) + position - 1)" ,
24452445 },
24462446 )
24472447 self .validate_all (
0 commit comments