Repository: tobymao/sqlglot

Issue:
The three functions WEEKOFYEAR, DAYOFMONTH, and DAYOFWEEK were incorrectly converted in Hive.
### Code to reproduce an issue

```py
import sqlglot
sqlglot.parse_one("SELECT WEEKOFYEAR('2024-05-22'), DAYOFMONTH('2024-05-22'), DAYOFWEEK('2024-05-22')", read='hive').sql(dialect='hive')
```

### as-is: The return value in the current issue situation
```
"SELECT WEEK_OF_YEAR('2024-05-22'), DAY_OF_MONTH('2024-05-22'), DAY_OF_WEEK('2024-05-22')"
```

### to-be: The correct return value
```
"SELECT WEEKOFYEAR('2024-05-22'), DAYOFMONTH('2024-05-22'), DAYOFWEEK('2024-05-22')"
```

Discussion:

Patch:
diff --git a/sqlglot/dialects/hive.py b/sqlglot/dialects/hive.py
index be733b18..48e032d5 100644
--- a/sqlglot/dialects/hive.py
+++ b/sqlglot/dialects/hive.py
@@ -573,6 +573,9 @@ class Hive(Dialect):
             exp.OnProperty: lambda *_: "",
             exp.PrimaryKeyColumnConstraint: lambda *_: "PRIMARY KEY",
             exp.ParseJSON: lambda self, e: self.sql(e.this),
+            exp.WeekOfYear: rename_func("WEEKOFYEAR"),
+            exp.DayOfMonth: rename_func("DAYOFMONTH"),
+            exp.DayOfWeek: rename_func("DAYOFWEEK"),
         }
 
         PROPERTIES_LOCATION = {


Test patch:
diff --git a/tests/dialects/test_hive.py b/tests/dialects/test_hive.py
index dfce446d..3ebaded0 100644
--- a/tests/dialects/test_hive.py
+++ b/tests/dialects/test_hive.py
@@ -406,7 +406,9 @@ class TestHive(Validator):
         self.validate_identity("(VALUES (1 AS a, 2 AS b, 3))")
         self.validate_identity("SELECT * FROM my_table TIMESTAMP AS OF DATE_ADD(CURRENT_DATE, -1)")
         self.validate_identity("SELECT * FROM my_table VERSION AS OF DATE_ADD(CURRENT_DATE, -1)")
-
+        self.validate_identity(
+            "SELECT WEEKOFYEAR('2024-05-22'), DAYOFMONTH('2024-05-22'), DAYOFWEEK('2024-05-22')"
+        )
         self.validate_identity(
             "SELECT ROW() OVER (DISTRIBUTE BY x SORT BY y)",
             "SELECT ROW() OVER (PARTITION BY x ORDER BY y)",