From 8b23c30b9fc36c95a74f8ed871b1d2478fda3f75 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Tue, 10 Sep 2024 15:36:45 -0700 Subject: [PATCH 1/3] release 1.22.0 --- CHANGELOG.md | 10 +++------- recipe/meta.yaml | 2 +- src/snowflake/snowpark/version.py | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d4e56f50ab..d127f3155b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.22.0 (TBD) +## 1.22.0 (2024-09-10) ### Snowpark Python API Updates @@ -46,7 +46,7 @@ - Fixed a bug in `session.read.csv` that caused an error when setting `PARSE_HEADER = True` in an externally defined file format. - Fixed a bug in query generation from set operations that allowed generation of duplicate queries when children have common subqueries. - Fixed a bug in `session.get_session_stage` that referenced a non-existing stage after switching database or schema. -- Fixed a bug where calling `DataFrame.to_snowpark_pandas_dataframe` without explicitly initializing the Snowpark pandas plugin caused an error. +- Fixed a bug where calling `DataFrame.to_snowpark_pandas` without explicitly initializing the Snowpark pandas plugin caused an error. - Fixed a bug where using the `explode` function in dynamic table creation caused a SQL compilation error due to improper boolean type casting on the `outer` parameter. - Fixed a bug where using `to_pandas_batches` with async jobs caused an error due to improper handling of waiting for asynchronous query completion. @@ -117,6 +117,7 @@ - Display a clearer error message when `Index.names` is set to a non-like-like object. - Raise a warning whenever MultiIndex values are pulled in locally. - Improve warning message for `pd.read_snowflake` include the creation reason when temp table creation is triggered. +- When calling `DataFrame.set_index`, or setting `DataFrame.index` or `Series.index`, with a new index that does not match the current length of the `Series`/`DataFrame` object, a `ValueError` is no longer raised. When the `Series`/`DataFrame` object is longer than the new index, the `Series`/`DataFrame`'s new index is filled with `NaN` values for the "extra" elements. When the `Series`/`DataFrame` object is shorter than the new index, the extra values in the new index are ignored—`Series` and `DataFrame` stay the same length `n`, and use only the first `n` values of the new index. #### Bug Fixes @@ -127,11 +128,6 @@ - Fixed a bug where `Series.reindex` and `DataFrame.reindex` did not update the result index's name correctly. - Fixed a bug where `Series.take` did not error when `axis=1` was specified. -#### Behavior Change - -- When calling `DataFrame.set_index`, or setting `DataFrame.index` or `Series.index`, with a new index that does not match the current length of the `Series`/`DataFrame` object, a `ValueError` is no longer raised. When the `Series`/`DataFrame` object is longer than the new index, the `Series`/`DataFrame`'s new index is filled with `NaN` values for the "extra" elements. When the `Series`/`DataFrame` object is shorter than the new index, the extra values in the new index are ignored—`Series` and `DataFrame` stay the same length `n`, and use only the first `n` values of the new index. - - ## 1.21.0 (2024-08-19) ### Snowpark Python API Updates diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 275c6602aeb..9aed0375d0c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "snowflake-snowpark-python" %} -{% set version = "1.21.0" %} +{% set version = "1.22.0" %} package: name: {{ name|lower }} diff --git a/src/snowflake/snowpark/version.py b/src/snowflake/snowpark/version.py index adb2095ce5a..4b7ad25b189 100644 --- a/src/snowflake/snowpark/version.py +++ b/src/snowflake/snowpark/version.py @@ -4,4 +4,4 @@ # # Update this for the versions -VERSION = (1, 21, 0) +VERSION = (1, 22, 0) From 7c79037b274568da8ca69f889825a78cfa34abd5 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Wed, 11 Sep 2024 09:39:49 -0700 Subject: [PATCH 2/3] address feedback --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d127f3155b4..f9ffcdd5c8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ ### New Features -- Added following new functions in `snowflake.snowpark.functions`: +- Added the following new functions in `snowflake.snowpark.functions`: - `array_remove` - `ln` @@ -54,7 +54,7 @@ #### New Features -- Added support for type coercion when passing columns as input to udf calls +- Added support for type coercion when passing columns as input to UDF calls. - Added support for `Index.identical`. #### Bug Fixes @@ -114,10 +114,10 @@ - Improved `pd.to_datetime` to handle all local input cases. - Create a lazy index from another lazy index without pulling data to client. - Raised `NotImplementedError` for Index bitwise operators. -- Display a clearer error message when `Index.names` is set to a non-like-like object. +- Display a more clear error message when `Index.names` is set to a non-like-like object. - Raise a warning whenever MultiIndex values are pulled in locally. - Improve warning message for `pd.read_snowflake` include the creation reason when temp table creation is triggered. -- When calling `DataFrame.set_index`, or setting `DataFrame.index` or `Series.index`, with a new index that does not match the current length of the `Series`/`DataFrame` object, a `ValueError` is no longer raised. When the `Series`/`DataFrame` object is longer than the new index, the `Series`/`DataFrame`'s new index is filled with `NaN` values for the "extra" elements. When the `Series`/`DataFrame` object is shorter than the new index, the extra values in the new index are ignored—`Series` and `DataFrame` stay the same length `n`, and use only the first `n` values of the new index. +- Improve performance for `DataFrame.set_index`, or setting `DataFrame.index` or `Series.index` by avoiding checks require eager evaluation. As a consequence, when the new index that does not match the current `Series`/`DataFrame` object length, a `ValueError` is no longer raised. Instead, when the `Series`/`DataFrame` object is longer than the provided index, the `Series`/`DataFrame`'s new index is filled with `NaN` values for the "extra" elements. Otherwise, the extra values in the provided index are ignored. #### Bug Fixes From c4b673e94fd31d906c0a7a21b1790b8dde1828ed Mon Sep 17 00:00:00 2001 From: Jianzhun Du <68252326+sfc-gh-jdu@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:07:19 -0700 Subject: [PATCH 3/3] Cherrypick 1.21.1 changelog to release-v1.22.0 (#2271) --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9ffcdd5c8c..6b4d5a20110 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,7 +48,6 @@ - Fixed a bug in `session.get_session_stage` that referenced a non-existing stage after switching database or schema. - Fixed a bug where calling `DataFrame.to_snowpark_pandas` without explicitly initializing the Snowpark pandas plugin caused an error. - Fixed a bug where using the `explode` function in dynamic table creation caused a SQL compilation error due to improper boolean type casting on the `outer` parameter. -- Fixed a bug where using `to_pandas_batches` with async jobs caused an error due to improper handling of waiting for asynchronous query completion. ### Snowpark Local Testing Updates @@ -128,6 +127,14 @@ - Fixed a bug where `Series.reindex` and `DataFrame.reindex` did not update the result index's name correctly. - Fixed a bug where `Series.take` did not error when `axis=1` was specified. +## 1.21.1 (2024-09-05) + +### Snowpark Python API Updates + +#### Bug Fixes + +- Fixed a bug where using `to_pandas_batches` with async jobs caused an error due to improper handling of waiting for asynchronous query completion. + ## 1.21.0 (2024-08-19) ### Snowpark Python API Updates