diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aadec22105..77d57fe3439 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,7 +50,7 @@ - When parsing data types during a `to_pandas` operation, we rely on GS precision value to fix precision issues for large integer values. This may affect users where a column that was earlier returned as `int8` gets returned as `int64`. Users can fix this by explicitly specifying precision values for their return column. - Aligned behavior for `Session.call` in case of table stored procedures where running `Session.call` would not trigger stored procedure unless a `collect()` operation was performed. - `StoredProcedureRegistration` will now automatically add `snowflake-snowpark-python` as a package dependency. The added dependency will be on the client's local version of the library and an error is thrown if the server cannot support that version. -- Support for optional `date_part` argument in Snowpark function `last_day` +- Added support for an optional `date_part` argument in function `last_day` ## 1.11.1 (2023-12-07) diff --git a/src/snowflake/snowpark/functions.py b/src/snowflake/snowpark/functions.py index 90c69a8351e..dc3bd1c4f1c 100644 --- a/src/snowflake/snowpark/functions.py +++ b/src/snowflake/snowpark/functions.py @@ -3249,6 +3249,11 @@ def last_day(expr: ColumnOrName, part: Optional[ColumnOrName] = "MONTH") -> Colu Returns the last day of the specified date part for a date or timestamp. Commonly used to return the last day of the month for a date or timestamp. + Args: + expr: The array column + part: The date part used to compute the last day of the given array column, default is "MONTH". + Valid values are "YEAR", "MONTH", "QUARTER", "WEEK" or any of their supported variations. + Example:: >>> import datetime