vranes commented on code in PR #55535:
URL: https://github.com/apache/spark/pull/55535#discussion_r3161736167
##########
python/pyspark/sql/functions/builtin.py:
##########
@@ -13125,6 +13125,74 @@ def timestamp_add(unit: str, quantity: "ColumnOrName",
ts: "ColumnOrName") -> Co
)
+@_try_remote_functions
+def time_bucket(
+ bucket_size: "ColumnOrName",
+ ts: "ColumnOrName",
+ origin: Optional["ColumnOrName"] = None,
+) -> Column:
+ """
+ Aligns a timestamp to the start of a fixed-size interval bucket.
+
+ Returns the start of the bucket that ``ts`` falls into, where buckets are
defined by
+ the given ``bucket_size`` interval aligned to ``origin``. All bucketing is
performed on
+ UTC micros, the session time zone does not affect bucket alignment. For
local wall-clock
Review Comment:
Changed the doctoring, resolving
##########
python/pyspark/sql/functions/builtin.py:
##########
@@ -13125,6 +13125,74 @@ def timestamp_add(unit: str, quantity: "ColumnOrName",
ts: "ColumnOrName") -> Co
)
+@_try_remote_functions
+def time_bucket(
+ bucket_size: "ColumnOrName",
+ ts: "ColumnOrName",
+ origin: Optional["ColumnOrName"] = None,
+) -> Column:
+ """
+ Aligns a timestamp to the start of a fixed-size interval bucket.
+
+ Returns the start of the bucket that ``ts`` falls into, where buckets are
defined by
+ the given ``bucket_size`` interval aligned to ``origin``. All bucketing is
performed on
+ UTC micros, the session time zone does not affect bucket alignment. For
local wall-clock
Review Comment:
Changed the docstring, resolving
--
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]