You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "xinrong-meng (via GitHub)" <gi...@apache.org> on 2025/09/16 18:23:09 UTC
Re: [PR] [SPARK-53547] [PYTHON] Add make_timestamp_ntz overload with date/time parameters [spark]
xinrong-meng commented on code in PR #52329:
URL: https://github.com/apache/spark/pull/52329#discussion_r2353307488
##########
python/pyspark/sql/functions/builtin.py:
##########
@@ -25126,17 +25126,37 @@ def try_make_timestamp_ltz(
)
-@_try_remote_functions
+@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:
+ ...
+
+
+@_try_remote_functions
+def make_timestamp_ntz(
+ years: Optional["ColumnOrName"] = None,
+ months: Optional["ColumnOrName"] = None,
+ days: Optional["ColumnOrName"] = None,
+ hours: Optional["ColumnOrName"] = None,
+ mins: Optional["ColumnOrName"] = None,
+ secs: Optional["ColumnOrName"] = None,
+ *,
+ date: Optional["ColumnOrName"] = None,
+ time: Optional["ColumnOrName"] = None,
) -> Column:
"""
- Create local date-time from years, months, days, hours, mins, secs fields.
+ Create local date-time from years, months, days, hours, mins, secs fields, or from date and time fields.
If the configuration `spark.sql.ansi.enabled` is false, the function returns NULL
on invalid inputs. Otherwise, it will throw an error instead.
Review Comment:
4.1.0
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org