Skip to content

Commit 5399459

Browse files
Merge branch 'main' of https://github.com/snowflakedb/snowpark-python into not-implemented-args2
2 parents 6c78eea + 4a13bfe commit 5399459

File tree

219 files changed

+3939
-1215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+3939
-1215
lines changed

CHANGELOG.md

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,42 @@
11
# Release History
22

3-
## 1.41.0 (YYYY-MM-DD)
3+
## 1.42.0 (YYYY-MM-DD)
4+
5+
### Snowpark Python API Updates
6+
7+
#### New Features
8+
9+
- Added support for `Session.udf_profiler`.
10+
11+
#### Improvements
12+
13+
- Catalog API now uses SQL commands instead of SnowAPI calls. This new implementation is more reliable now.
14+
15+
### Snowpark pandas API Updates
16+
17+
#### New Features
18+
19+
- Added support for `Dataframe.groupby.rolling()`.
20+
- Added support for mapping `np.percentile` with DataFrame and Series inputs to `Series.quantile`.
21+
22+
#### Bug Fixes
23+
24+
- Fixed a bug in `DataFrameGroupBy.agg` where func is a list of tuples used to set the names of the output columns.
25+
26+
#### Improvements
27+
28+
- Add support for the following in faster pandas:
29+
- `groupby.nunique`
30+
- `groupby.size`
31+
- `concat`
32+
33+
## 1.41.0 (2025-10-23)
434

535
### Snowpark Python API Updates
636

737
#### New Features
838

939
- Added a new function `service` in `snowflake.snowpark.functions` that allows users to create a callable representing a Snowpark Container Services (SPCS) service.
10-
- Added a new function `group_by_all()` to the `DataFrame` class.
1140
- Added `connection_parameters` parameter to `DataFrameReader.dbapi()` (PuPr) method to allow passing keyword arguments to the `create_connection` callable.
1241
- Added support for `Session.begin_transaction`, `Session.commit` and `Session.rollback`.
1342
- Added support for the following functions in `functions.py`:
@@ -58,14 +87,20 @@
5887
- `st_geometryfromwkt`
5988
- `try_to_geography`
6089
- `try_to_geometry`
61-
90+
- Added a parameter to enable and disable automatic column name aliasing for `interval_day_time_from_parts` and `interval_year_month_from_parts` functions.
6291

6392
#### Bug Fixes
6493

6594
- Fixed a bug that `DataFrameReader.xml` fails to parse XML files with undeclared namespaces when `ignoreNamespace` is `True`.
6695
- Added a fix for floating point precision discrepancies in `interval_day_time_from_parts`.
6796
- Fixed a bug where writing Snowpark pandas dataframes on the pandas backend with a column multiindex to Snowflake with `to_snowflake` would raise `KeyError`.
6897
- Fixed a bug that `DataFrameReader.dbapi` (PuPr) is not compatible with oracledb 3.4.0.
98+
- Fixed a bug where `modin` would unintentionally be imported during session initialization in some scenarios.
99+
- Fixed a bug where `session.udf|udtf|udaf|sproc.register` failed when an extra session argument was passed. These methods do not expect a session argument; please remove it if provided.
100+
101+
#### Improvements
102+
103+
- The default maximum length for inferred StringType columns during schema inference in `DataFrameReader.dbapi` is now increased from 16MB to 128MB in parquet file based ingestion.
69104

70105
#### Dependency Updates
71106

@@ -74,7 +109,10 @@
74109
### Snowpark pandas API Updates
75110

76111
#### New Features
112+
77113
- Added support for the `dtypes` parameter of `pd.get_dummies`
114+
- Added support for `nunique` in `df.pivot_table`, `df.agg` and other places where aggregate functions can be used.
115+
- Added support for `DataFrame.interpolate` and `Series.interpolate` with the "linear", "ffill"/"pad", and "backfill"/bfill" methods. These use the SQL `INTERPOLATE_LINEAR`, `INTERPOLATE_FFILL`, and `INTERPOLATE_BFILL` functions (PuPr).
78116

79117
#### Improvements
80118

@@ -119,6 +157,7 @@
119157
- `sort_values`
120158
- `loc` (setting columns)
121159
- `to_datetime`
160+
- `rename`
122161
- `drop`
123162
- `invert`
124163
- `duplicated`
@@ -134,6 +173,16 @@
134173
- `median`
135174
- `std`
136175
- `var`
176+
- `groupby.agg`
177+
- `groupby.min`
178+
- `groupby.max`
179+
- `groupby.count`
180+
- `groupby.sum`
181+
- `groupby.mean`
182+
- `groupby.median`
183+
- `groupby.std`
184+
- `groupby.var`
185+
- `drop_duplicates`
137186
- Reuse row count from the relaxed query compiler in `get_axis_len`.
138187

139188
#### Bug Fixes

docs/source/modin/numpy.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ NumPy ufuncs called with Snowpark pandas arguments will ignore kwargs.
3737
| ``np.full_like`` | Mapped to pd.DataFrame(value, index=range(height), |
3838
| | columns=range(width)) |
3939
+-----------------------------+----------------------------------------------------+
40+
| ``np.percentile`` | Mapped to Series.quantile, will stack a DataFrame |
41+
| | to convert to Series. Always returns an ndarray or |
42+
| | scalar like np.percentile. Does not implement any |
43+
| | arguments other than the input array and |
44+
| | percentage(s). |
45+
+-----------------------------+----------------------------------------------------+
4046
| ``np.may_share_memory`` | Returns False |
4147
+-----------------------------+----------------------------------------------------+
4248
| ``np.abs`` | Mapped to df.abs() |

docs/source/modin/supported/agg_supp.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ methods ``pd.pivot_table``, ``DataFrame.pivot_table``, and ``pd.crosstab``.
3838
| ``median`` | ``Y`` for ``axis=0``. | ``Y`` | ``Y`` | ``Y`` | ``Y`` |
3939
| | ``N`` for ``axis=1``. | | | | |
4040
+-----------------------------+-------------------------------------+----------------------------------+--------------------------------------------+-----------------------------------------+-----------------------------------------+
41+
| ``nunique`` | ``Y`` for ``axis=0``. | ``Y`` | ``Y`` | ``Y`` | ``Y`` |
42+
| | ``N`` for ``axis=1``. | | | | |
43+
+-----------------------------+-------------------------------------+----------------------------------+--------------------------------------------+-----------------------------------------+-----------------------------------------+
4144
| ``size`` | ``Y`` for ``axis=0``. | ``Y`` | ``Y`` | ``Y`` | ``N`` |
4245
| | ``N`` for ``axis=1``. | | | | |
4346
+-----------------------------+-------------------------------------+----------------------------------+--------------------------------------------+-----------------------------------------+-----------------------------------------+

docs/source/modin/supported/dataframe_supported.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,11 @@ Methods
227227
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
228228
| ``insert`` | Y | | |
229229
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
230-
| ``interpolate`` | N | | |
230+
| ``interpolate`` | P | | ``N`` if ``axis == 1``, ``limit`` is set, |
231+
| | | | ``limit_area`` is "outside", or ``method`` is not |
232+
| | | | "linear", "bfill", "backfill", "ffill", or "pad". |
233+
| | | | ``limit_area="inside"`` is supported only when |
234+
| | | | ``method`` is ``linear``. |
231235
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
232236
| ``isetitem`` | N | | |
233237
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+

docs/source/modin/supported/groupby_supported.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,10 @@ Computations/descriptive stats
153153
| | | will be lost. ``rule`` frequencies 's', 'min', |
154154
| | | 'h', and 'D' are supported. |
155155
+-----------------------------+---------------------------------+----------------------------------------------------+
156-
| ``rolling`` | N | |
156+
| ``rolling`` | P | Implemented for DataframeGroupby objects. ``N`` for|
157+
| | | ``on``, non-integer ``window``, ``axis = 1``, |
158+
| | | ``method`` != ``single``, ``min_periods = 0``, or |
159+
| | | ``closed`` != ``None``. |
157160
+-----------------------------+---------------------------------+----------------------------------------------------+
158161
| ``sample`` | N | |
159162
+-----------------------------+---------------------------------+----------------------------------------------------+

docs/source/modin/supported/series_supported.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,11 @@ Methods
243243
| ``info`` | D | | Different Index types are used in pandas but not |
244244
| | | | in Snowpark pandas |
245245
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
246-
| ``interpolate`` | N | | |
246+
| ``interpolate`` | P | | ``N`` if ``limit`` is set, |
247+
| | | | ``limit_area`` is "outside", or ``method`` is not |
248+
| | | | "linear", "bfill", "backfill", "ffill", or "pad". |
249+
| | | | ``limit_area="inside"`` is supported only when |
250+
| | | | ``method`` is ``linear``. |
247251
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
248252
| ``isin`` | Y | | Snowpark pandas deviates with respect to handling |
249253
| | | | NA values |

docs/source/snowpark/dataframe.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ DataFrame
5757
DataFrame.flatten
5858
DataFrame.groupBy
5959
DataFrame.group_by
60-
DataFrame.group_by_all
6160
DataFrame.group_by_grouping_sets
6261
DataFrame.intersect
6362
DataFrame.join

recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = "snowflake-snowpark-python" %}
2-
{% set version = "1.40.0" %}
2+
{% set version = "1.41.0" %}
33
{% set noarch_build = (os.environ.get('SNOWFLAKE_SNOWPARK_PYTHON_NOARCH_BUILD', 'false')) == 'true' %}
44
{% set build_number = os.environ.get('SNOWFLAKE_SNOWPARK_PYTHON_BUILD_NUMBER', 0) %}
55

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@
6868
"lxml", # used in XML reader unit tests
6969
]
7070
MODIN_DEVELOPMENT_REQUIREMENTS = [
71-
"scipy", # Snowpark pandas 3rd party library testing
71+
# Snowpark pandas 3rd party library testing. Cap the scipy version because
72+
# Snowflake cannot find newer versions of scipy for python 3.11+. See
73+
# SNOW-2452791.
74+
"scipy<=1.16.0",
7275
"statsmodels", # Snowpark pandas 3rd party library testing
7376
"scikit-learn", # Snowpark pandas 3rd party library testing
7477
# plotly version restricted due to foreseen change in query counts in version 6.0.0+

src/snowflake/snowpark/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"QueryListener",
4141
"AsyncJob",
4242
"StoredProcedureProfiler",
43+
"UDFProfiler",
4344
]
4445

4546

@@ -54,6 +55,7 @@
5455
from snowflake.snowpark.async_job import AsyncJob
5556
from snowflake.snowpark.column import CaseExpr, Column
5657
from snowflake.snowpark.stored_procedure_profiler import StoredProcedureProfiler
58+
from snowflake.snowpark.udf_profiler import UDFProfiler
5759
from snowflake.snowpark.dataframe import DataFrame
5860
from snowflake.snowpark.dataframe_ai_functions import DataFrameAIFunctions
5961
from snowflake.snowpark.dataframe_analytics_functions import DataFrameAnalyticsFunctions

0 commit comments

Comments
 (0)