Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,16 @@ jobs:
run: uv pip install -U setuptools pip wheel --system
- name: Install tox
run: uv pip install tox --system
- if: ${{ matrix.os == 'macos-latest' && matrix.cloud-provider == 'aws' }}
name: Check AutoSwitchBackend default value
# SNOW-2389912: Ensure hybrid is correctly enabled by default. We can't use pytest because
# our test suite sets the AutoSwitchBackend variable explicitly.
run: |
python -m tox -e "py${PYTHON_VERSION}-snowparkpandashybridcheck_sessionfirst-modin-ci" \
&& python -m tox -e "py${PYTHON_VERSION}-snowparkpandashybridcheck_pluginfirst-modin-ci"
env:
PYTHON_VERSION: ${{ matrix.python-version }}
cloud_provider: ${{ matrix.cloud-provider }}
# only run doctest for macos on aws
- if: ${{ matrix.os == 'macos-latest' && matrix.cloud-provider == 'aws' }}
name: Run Snowpark pandas API doctests
Expand Down
20 changes: 13 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# Release History

## 1.40.0 (YYYY-MM-DD)
## 1.40.0 (2025-10-06)

### Snowpark Python API Updates

#### Bug Fixes

- Fixed a bug that `DataFrame.limit()` fail if there is parameter binding in the executed SQL when used in non-stored-procedure/udxf environment.
- Added an experimental fix for a bug in schema query generation that could cause invalid sql to be genrated when using nested structured types.

#### New Features

- Added a new module `snowflake.snowpark.secrets` that provides Python wrappers for accessing Snowflake Secrets within Python UDFs and stored procedures that execute inside Snowflake.
Expand Down Expand Up @@ -106,6 +101,8 @@

#### Bug Fixes

- Fixed a bug that `DataFrame.limit()` fail if there is parameter binding in the executed SQL when used in non-stored-procedure/udxf environment.
- Added an experimental fix for a bug in schema query generation that could cause invalid sql to be generated when using nested structured types.
- Fixed multiple bugs in `DataFrameReader.dbapi` (PuPr):
- Fixed UDTF ingestion failure with `pyodbc` driver caused by unprocessed row data.
- Fixed SQL Server query input failure due to incorrect select query generation.
Expand All @@ -127,7 +124,6 @@

- Updated the supported `modin` versions to >=0.36.0 and <0.38.0 (was previously >= 0.35.0 and <0.37.0).


#### New Features
- Added support for `DataFrame.query` for dataframes with single-level indexes.
- Added support for `DataFrameGroupby.__len__` and `SeriesGroupBy.__len__`.
Expand All @@ -140,6 +136,16 @@
- When hybrid execution is enabled, `pd.merge`, `pd.concat`, `DataFrame.merge`, and `DataFrame.join` may now move arguments to backends other than those among the function arguments.
- Improved performance of `DataFrame.to_snowflake` and `pd.to_snowflake(dataframe)` for large data by uploading data via a parquet file. You can control the dataset size at which Snowpark pandas switches to parquet with the variable `modin.config.PandasToSnowflakeParquetThresholdBytes`.

## 1.39.1 (2025-09-25)

### Snowpark Python API Updates

#### Bug Fixes


- Added an experimental fix for a bug in schema query generation that could cause invalid sql to be generated when using nested structured types.


## 1.39.0 (2025-09-17)

### Snowpark Python API Updates
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "snowflake-snowpark-python" %}
{% set version = "1.39.0" %}
{% set version = "1.40.0" %}
{% set noarch_build = (os.environ.get('SNOWFLAKE_SNOWPARK_PYTHON_NOARCH_BUILD', 'false')) == 'true' %}
{% set build_number = os.environ.get('SNOWFLAKE_SNOWPARK_PYTHON_BUILD_NUMBER', 0) %}

Expand Down
15 changes: 9 additions & 6 deletions src/snowflake/snowpark/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,13 +759,16 @@ def __init__(
try:
from modin.config import AutoSwitchBackend

pandas_hybrid_execution_enabled: bool = (
self._conn._get_client_side_session_parameter(
_SNOWPARK_PANDAS_HYBRID_EXECUTION_ENABLED,
AutoSwitchBackend().get(),
)
pandas_hybrid_execution_enabled: Union[
bool, None
] = self._conn._get_client_side_session_parameter(
_SNOWPARK_PANDAS_HYBRID_EXECUTION_ENABLED, None
)
AutoSwitchBackend.put(pandas_hybrid_execution_enabled)
# Only set AutoSwitchBackend if the session parameter was already set.
# snowflake.snowpark.modin.plugin sets AutoSwitchBackend to True if it was
# not already set, so we should not change the variable if it's in its default state.
if pandas_hybrid_execution_enabled is not None:
AutoSwitchBackend.put(pandas_hybrid_execution_enabled)
except Exception:
# Continue session initialization even if Modin configuration fails
pass
Expand Down
2 changes: 1 addition & 1 deletion src/snowflake/snowpark/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


# Update this for the versions
VERSION = (1, 39, 0)
VERSION = (1, 40, 0)
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.agg.test
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.ai.test
Original file line number Diff line number Diff line change
Expand Up @@ -2146,6 +2146,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.col_ilike.test
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.collect.test
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.count.test
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.count2.test
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.create_or_replace.test
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.cross_join.lsuffix.test
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.cross_join.rsuffix.test
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.cross_join.suffix.test
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.describe.test
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.flatten.test
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.indexers.test
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.join.inner.column.test
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.join.inner.column_list.test
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.join.inner.predicate.test
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.join.left_outer.column.test
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.join.right_outer.predicate.test
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.join_table_function.test
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.natural_join.test
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.pivot.test
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.select_expr.test
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.stat.test
Original file line number Diff line number Diff line change
Expand Up @@ -1647,6 +1647,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.to_df.test
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.to_local_iterator.test
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.to_pandas.test
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.to_pandas_batch.test
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.unpivot.test
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/DataFrame.write.test
Original file line number Diff line number Diff line change
Expand Up @@ -4727,6 +4727,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/Dataframe.cube.test
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/Dataframe.distinct.test
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/Dataframe.drop_duplicates.test
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/Dataframe.filter.test
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
2 changes: 1 addition & 1 deletion tests/ast/data/Dataframe.getitem.test
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,6 @@ client_language {
}
client_version {
major: 1
minor: 39
minor: 40
}
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"
Loading
Loading