1.21.0 (2024-08-19)
Snowpark Python API Updates
New Features
- Added support for
snowflake.snowpark.testing.assert_dataframe_equal
that is a utility function to check the equality of two Snowpark DataFrames.
Improvements
- Added support server side string size limitations.
- Added support to create and invoke stored procedures, UDFs and UDTFs with optional arguments.
- Added support for column lineage in the DataFrame.lineage.trace API.
- Added support for passing
INFER_SCHEMA
options toDataFrameReader
viaINFER_SCHEMA_OPTIONS
. - Added support for passing
parameters
parameter toColumn.rlike
andColumn.regexp
. - Added support for automatically cleaning up temporary tables created by
df.cache_result()
in the current session, when the DataFrame is no longer referenced (i.e., gets garbage collected). It is still an experimental feature not enabled by default, and can be enabled by settingsession.auto_clean_up_temp_table_enabled
toTrue
. - Added support for string literals to the
fmt
parameter ofsnowflake.snowpark.functions.to_date
.
Bug Fixes
- Fixed a bug where SQL generated for selecting
*
column has an incorrect subquery. - Fixed a bug in
DataFrame.to_pandas_batches
where the iterator could throw an error if certain transformation is made to the pandas dataframe due to wrong isolation level. - Fixed a bug in
DataFrame.lineage.trace
to split the quoted feature view's name and version correctly. - Fixed a bug in
Column.isin
that caused invalid sql generation when passed an empty list. - Fixed a bug that fails to raise NotImplementedError while setting cell with list like item.
Snowpark Local Testing Updates
New Features
- Added support for the following APIs:
- snowflake.snowpark.functions
rank
dense_rank
percent_rank
cume_dist
ntile
datediff
array_agg
- snowflake.snowpark.column.Column.within_group
- snowflake.snowpark.functions
- Added support for parsing flags in regex statements for mocked plans. This maintains parity with the
rlike
andregexp
changes above.
Bug Fixes
- Fixed a bug where Window Functions LEAD and LAG do not handle option
ignore_nulls
properly. - Fixed a bug where values were not populated into the result DataFrame during the insertion of table merge operation.
Improvements
- Fix pandas FutureWarning about integer indexing.
Snowpark pandas API Updates
New Features
- Added support for
DataFrame.backfill
,DataFrame.bfill
,Series.backfill
, andSeries.bfill
. - Added support for
DataFrame.compare
andSeries.compare
with default parameters. - Added support for
Series.dt.microsecond
andSeries.dt.nanosecond
. - Added support for
Index.is_unique
andIndex.has_duplicates
. - Added support for
Index.equals
. - Added support for
Index.value_counts
. - Added support for
Series.dt.day_name
andSeries.dt.month_name
. - Added support for indexing on Index, e.g.,
df.index[:10]
. - Added support for
DataFrame.unstack
andSeries.unstack
. - Added support for
DataFrame.asfreq
andSeries.asfreq
. - Added support for
Series.dt.is_month_start
andSeries.dt.is_month_end
. - Added support for
Index.all
andIndex.any
. - Added support for
Series.dt.is_year_start
andSeries.dt.is_year_end
. - Added support for
Series.dt.is_quarter_start
andSeries.dt.is_quarter_end
. - Added support for lazy
DatetimeIndex
. - Added support for
Series.argmax
andSeries.argmin
. - Added support for
Series.dt.is_leap_year
. - Added support for
DataFrame.items
. - Added support for
Series.dt.floor
andSeries.dt.ceil
. - Added support for
Index.reindex
. - Added support for
DatetimeIndex
properties:year
,month
,day
,hour
,minute
,second
,microsecond
,
nanosecond
,date
,dayofyear
,day_of_year
,dayofweek
,day_of_week
,weekday
,quarter
,
is_month_start
,is_month_end
,is_quarter_start
,is_quarter_end
,is_year_start
,is_year_end
andis_leap_year
. - Added support for
Resampler.fillna
andResampler.bfill
. - Added limited support for the
Timedelta
type, including creatingTimedelta
columns andto_pandas
. - Added support for
Index.argmax
andIndex.argmin
.
Improvements
- Removed the public preview warning message when importing Snowpark pandas.
- Removed unnecessary count query from
SnowflakeQueryCompiler.is_series_like
method. Dataframe.columns
now returns native pandas Index object instead of Snowpark Index object.- Refactor and introduce
query_compiler
argument inIndex
constructor to createIndex
from query compiler. pd.to_datetime
now returns a DatetimeIndex object instead of a Series object.pd.date_range
now returns a DatetimeIndex object instead of a Series object.
Bug Fixes
- Made passing an unsupported aggregation function to
pivot_table
raiseNotImplementedError
instead ofKeyError
. - Removed axis labels and callable names from error messages and telemetry about unsupported aggregations.
- Fixed AssertionError in
Series.drop_duplicates
andDataFrame.drop_duplicates
when called aftersort_values
. - Fixed a bug in
Index.to_frame
where the result frame's column name may be wrong where name is unspecified. - Fixed a bug where some Index docstrings are ignored.
- Fixed a bug in
Series.reset_index(drop=True)
where the result name may be wrong. - Fixed a bug in
Groupby.first/last
ordering by the correct columns in the underlying window expression.