Repository: tobymao/sqlglot

Issue:
Incorrect DAYOFWEEK translation from Trino to Snowflake
**Fully reproducible code snippet**
```
>>> import sqlglot
>>> sqlglot.parse_one('DAY_OF_WEEK("orders.date")',dialect="trino").sql(dialect="snowflake")
'DAYOFWEEK_ISO("orders.date")'
```

**Official Documentation**
https://docs.snowflake.com/en/sql-reference/functions/year
Snowflake does not have `DAYOFWEEK_ISO` function
It has either `DAYOFWEEK` or `DAYOFWEEKISO`

All other similar Trino functions (`DAY_OF_YEAR`, `DAY_OF_MONTH`, `WEEK_OF_YEAR`) are correctly translated to Snowflake (`DAYOFYEAR`, `DAYOFMONTH`, `WEEKOFYEAR`).

Hints from issue comments:

Solution patch:
diff --git a/sqlglot/dialects/snowflake.py b/sqlglot/dialects/snowflake.py
index 823fae4151..fbafd2e1a4 100644
--- a/sqlglot/dialects/snowflake.py
+++ b/sqlglot/dialects/snowflake.py
@@ -1032,6 +1032,7 @@ class Generator(generator.Generator):
             exp.DateStrToDate: datestrtodate_sql,
             exp.DayOfMonth: rename_func("DAYOFMONTH"),
             exp.DayOfWeek: rename_func("DAYOFWEEK"),
+            exp.DayOfWeekIso: rename_func("DAYOFWEEKISO"),
             exp.DayOfYear: rename_func("DAYOFYEAR"),
             exp.Explode: rename_func("FLATTEN"),
             exp.Extract: rename_func("DATE_PART"),


Test patch:
diff --git a/tests/dialects/test_snowflake.py b/tests/dialects/test_snowflake.py
index 5f93f85345..05ac13417f 100644
--- a/tests/dialects/test_snowflake.py
+++ b/tests/dialects/test_snowflake.py
@@ -1022,6 +1022,16 @@ def test_snowflake(self):
             },
         )
 
+        self.validate_all(
+            "DAYOFWEEKISO(foo)",
+            read={
+                "trino": "DAY_OF_WEEK(foo)",
+            },
+            write={
+                "snowflake": "DAYOFWEEKISO(foo)",
+            },
+        )
+
     def test_null_treatment(self):
         self.validate_all(
             r"SELECT FIRST_VALUE(TABLE1.COLUMN1) OVER (PARTITION BY RANDOM_COLUMN1, RANDOM_COLUMN2 ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS MY_ALIAS FROM TABLE1",