zhengruifeng commented on code in PR #51831:
URL: https://github.com/apache/spark/pull/51831#discussion_r2373919684


##########
python/pyspark/sql/connect/functions/builtin.py:
##########
@@ -4027,25 +4028,210 @@ def make_timestamp_ntz(
     mins: "ColumnOrName",
     secs: "ColumnOrName",
 ) -> Column:
-    return _invoke_function_over_columns(
-        "make_timestamp_ntz", years, months, days, hours, mins, secs
+    ...
+
+
+@overload
+def make_timestamp_ntz(
+    *,
+    years: "ColumnOrName",
+    months: "ColumnOrName",
+    days: "ColumnOrName",
+    hours: "ColumnOrName",
+    mins: "ColumnOrName",
+    secs: "ColumnOrName",
+) -> Column:
+    ...
+
+
+@overload
+def make_timestamp_ntz(
+    *,
+    date: "ColumnOrName",
+    time: "ColumnOrName",
+) -> Column:
+    ...
+
+
+def make_timestamp_ntz(  # type: ignore[misc]
+    *args: "ColumnOrName",

Review Comment:
   shall we remove the `*args: "ColumnOrName"` and only support following 
patterns? @HyukjinKwon 
   
   ```
   make_timestamp_ntz(years=y, months=mo, days=d, hours=h, mins=mi, secs=s)
   make_timestamp_ntz(y, mo, d, h, mins=mi, secs=s)
   make_timestamp_ntz(y, mo, d, h, mi, s)
   
   make_timestamp_ntz(date=d, time=t) <- for the new code path
   ```
   
   



##########
python/pyspark/sql/connect/functions/builtin.py:
##########
@@ -4027,25 +4028,210 @@ def make_timestamp_ntz(
     mins: "ColumnOrName",
     secs: "ColumnOrName",
 ) -> Column:
-    return _invoke_function_over_columns(
-        "make_timestamp_ntz", years, months, days, hours, mins, secs
+    ...
+
+
+@overload
+def make_timestamp_ntz(
+    *,
+    years: "ColumnOrName",
+    months: "ColumnOrName",
+    days: "ColumnOrName",
+    hours: "ColumnOrName",
+    mins: "ColumnOrName",
+    secs: "ColumnOrName",
+) -> Column:
+    ...
+
+
+@overload
+def make_timestamp_ntz(
+    *,
+    date: "ColumnOrName",
+    time: "ColumnOrName",
+) -> Column:
+    ...
+
+
+def make_timestamp_ntz(  # type: ignore[misc]
+    *args: "ColumnOrName",

Review Comment:
   I think it won't break positional cases like following?
   ```
   make_timestamp_ntz(y, mo, d, h, mi, s)
   make_timestamp_ntz(y, mo, d, h, mins=mi, secs=s)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to