Skip to content

Commit 5b9564e

Browse files
committed
Merge remote-tracking branch 'origin/main' into SNOW-1800374
2 parents 66feaf7 + 30e5f9e commit 5b9564e

File tree

699 files changed

+2129
-1201
lines changed

Some content is hidden

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

699 files changed

+2129
-1201
lines changed

.github/workflows/daily_precommit.yml

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -546,75 +546,6 @@ jobs:
546546
.tox/.coverage
547547
.tox/coverage.xml
548548
549-
test-snowpark-disable-multithreading-mode:
550-
name: Test Snowpark Multithreading Disabled py-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
551-
needs: build
552-
runs-on: ${{ matrix.os }}
553-
strategy:
554-
fail-fast: false
555-
matrix:
556-
os: [ubuntu-latest-64-cores]
557-
python-version: ["3.9"]
558-
cloud-provider: [aws]
559-
steps:
560-
- name: Checkout Code
561-
uses: actions/checkout@v4
562-
- name: Set up Python
563-
uses: actions/setup-python@v4
564-
with:
565-
python-version: ${{ matrix.python-version }}
566-
- name: Display Python version
567-
run: python -c "import sys; print(sys.version)"
568-
- name: Decrypt parameters.py
569-
shell: bash
570-
run: .github/scripts/decrypt_parameters.sh
571-
env:
572-
PARAMETER_PASSWORD: ${{ secrets.PARAMETER_PASSWORD }}
573-
CLOUD_PROVIDER: ${{ matrix.cloud-provider }}
574-
- name: Install protoc
575-
shell: bash
576-
run: .github/scripts/install_protoc.sh
577-
- name: Download wheel(s)
578-
uses: actions/download-artifact@v4
579-
with:
580-
name: wheel
581-
path: dist
582-
- name: Show wheels downloaded
583-
run: ls -lh dist
584-
shell: bash
585-
- name: Upgrade setuptools, pip and wheel
586-
run: python -m pip install -U setuptools pip wheel
587-
- name: Install tox
588-
run: python -m pip install tox
589-
- name: Run tests (excluding doctests)
590-
run: python -m tox -e "py${PYTHON_VERSION/\./}-notmultithreaded-ci"
591-
env:
592-
PYTHON_VERSION: ${{ matrix.python-version }}
593-
cloud_provider: ${{ matrix.cloud-provider }}
594-
PYTEST_ADDOPTS: --color=yes --tb=short
595-
TOX_PARALLEL_NO_SPINNER: 1
596-
shell: bash
597-
- name: Run local tests
598-
run: python -m tox -e "py${PYTHON_VERSION/\./}-localnotmultithreaded-ci"
599-
env:
600-
PYTHON_VERSION: ${{ matrix.python-version }}
601-
cloud_provider: ${{ matrix.cloud-provider }}
602-
PYTEST_ADDOPTS: --color=yes --tb=short
603-
TOX_PARALLEL_NO_SPINNER: 1
604-
shell: bash
605-
- name: Combine coverages
606-
run: python -m tox -e coverage --skip-missing-interpreters false
607-
shell: bash
608-
env:
609-
SNOWFLAKE_IS_PYTHON_RUNTIME_TEST: 1
610-
- uses: actions/upload-artifact@v4
611-
with:
612-
include-hidden-files: true
613-
name: coverage_${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}-snowpark-multithreading
614-
path: |
615-
.tox/.coverage
616-
.tox/coverage.xml
617-
618549
combine-coverage:
619550
if: ${{ success() || failure() }}
620551
name: Combine coverage

CHANGELOG.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,46 @@
1414
- `map_keys`
1515
- `nullifzero`
1616
- `snowflake_cortex_sentiment`
17+
- `acosh`
18+
- `asinh`
19+
- `atanh`
20+
- `bit_length`
21+
- `bitmap_bit_position`
22+
- `bitmap_bucket_number`
23+
- `bitmap_construct_agg`
24+
- `cbrt`
25+
- `equal_null`
26+
- `ifnull`
27+
- `localtimestamp`
28+
- `max_by`
29+
- `min_by`
30+
- `nvl`
31+
- `octet_length`
32+
- `position`
33+
- `regr_avgx`
34+
- `regr_avgy`
35+
- `regr_count`
36+
- `regr_intercept`
37+
- `regr_r2`
38+
- `regr_slope`
39+
- `regr_sxx`
40+
- `regr_sxy`
41+
- `regr_syy`
42+
- `try_to_binary`
43+
1744
- Added `Catalog` class to manage snowflake objects. It can be accessed via `Session.catalog`.
1845

1946
#### Improvements
2047

2148
- Updated README.md to include instructions on how to verify package signatures using `cosign`.
49+
- Added an option `keep_column_order` for keeping original column order in `DataFrame.with_column` and `DataFrame.with_columns`.
2250

2351
#### Bug Fixes
2452

2553
- Fixed a bug in local testing mode that caused a column to contain None when it should contain 0
26-
- Fixed a bug in StructField.from_json that prevented TimestampTypes with tzinfo from being parsed correctly.
54+
- Fixed a bug in `StructField.from_json` that prevented TimestampTypes with `tzinfo` from being parsed correctly.
55+
- Fixed a bug in function `date_format` that caused an error when the input column was date type or timestamp type.
56+
- Fixed a bug in `replace` when passing `Column` expression objects.
2757

2858
### Snowpark pandas API Updates
2959

@@ -49,6 +79,7 @@
4979
- %X: Locale’s appropriate time representation.
5080
- %%: A literal '%' character.
5181
- Added support for `Series.between`.
82+
- Added support for `include_groups=False` in `DataFrameGroupBy.apply`.
5283

5384
#### Bug Fixes
5485

@@ -59,8 +90,9 @@
5990
- Updated integration testing for `session.lineage.trace` to exclude deleted objects
6091
- Added documentation for `DataFrame.map`.
6192
- Improve performance of `DataFrame.apply` by mapping numpy functions to snowpark functions if possible.
62-
- Added documentation on the extent of Snowpark pandas interoperability with scikit-learn
93+
- Added documentation on the extent of Snowpark pandas interoperability with scikit-learn.
6394
- Infer return type of functions in `Series.map`, `Series.apply` and `DataFrame.map` if type-hint is not provided.
95+
- Added `call_count` to telemetry that counts method calls including interchange protocol calls.
6496

6597
## 1.26.0 (2024-12-05)
6698

docs/source/modin/supported/groupby_supported.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Function application
3939
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
4040
| ``apply`` | P | ``axis`` other than 0 is not | ``Y`` if the following are true, otherwise ``N``: |
4141
| | | implemented. | - ``func`` is a callable that always returns |
42-
| | | ``include_groups = False`` is | either a pandas DataFrame, a pandas Series, or |
43-
| | | not implemented. | objects that are neither DataFrame nor Series. |
42+
| | | | either a pandas DataFrame, a pandas Series, or |
43+
| | | | objects that are neither DataFrame nor Series. |
4444
| | | | - grouping on axis=0 |
4545
| | | | - Not applying transform to a dataframe with a |
4646
| | | | non-unique index |

docs/source/snowpark/functions.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Functions
2020

2121
abs
2222
acos
23+
acosh
2324
add_months
2425
any_value
2526
approx_count_distinct
@@ -75,9 +76,15 @@ Functions
7576
asc_nulls_last
7677
ascii
7778
asin
79+
asinh
7880
atan
81+
atanh
7982
atan2
8083
avg
84+
bit_length
85+
bitmap_bit_position
86+
bitmap_bucket_number
87+
bitmap_construct_agg
8188
bitnot
8289
bitshiftleft
8390
bitshiftright
@@ -88,6 +95,7 @@ Functions
8895
call_table_function
8996
call_udf
9097
cast
98+
cbrt
9199
ceil
92100
char
93101
charindex
@@ -151,6 +159,7 @@ Functions
151159
divnull
152160
endswith
153161
equal_nan
162+
equal_null
154163
exp
155164
explode
156165
explode_outer
@@ -171,6 +180,7 @@ Functions
171180
hash
172181
hour
173182
iff
183+
ifnull
174184
in_
175185
initcap
176186
insert
@@ -205,6 +215,7 @@ Functions
205215
lit
206216
ln
207217
locate
218+
localtimestamp
208219
log
209220
lower
210221
lpad
@@ -215,10 +226,12 @@ Functions
215226
map_contains_key
216227
map_keys
217228
max
229+
max_by
218230
md5
219231
mean
220232
median
221233
min
234+
min_by
222235
minute
223236
mode
224237
monotonically_increasing_id
@@ -230,19 +243,22 @@ Functions
230243
not_
231244
ntile
232245
nullifzero
246+
nvl
233247
object_agg
234248
object_construct
235249
object_construct_keep_null
236250
object_delete
237251
object_insert
238252
object_keys
239253
object_pick
254+
octet_length
240255
pandas_udf
241256
pandas_udtf
242257
parse_json
243258
parse_xml
244259
percent_rank
245260
percentile_cont
261+
position
246262
pow
247263
previous_day
248264
quarter
@@ -252,6 +268,15 @@ Functions
252268
regexp_count
253269
regexp_extract
254270
regexp_replace
271+
regr_avgx
272+
regr_avgy
273+
regr_count
274+
regr_intercept
275+
regr_r2
276+
regr_slope
277+
regr_sxx
278+
regr_sxy
279+
regr_syy
255280
repeat
256281
replace
257282
right
@@ -320,6 +345,7 @@ Functions
320345
trim
321346
trunc
322347
try_cast
348+
try_to_binary
323349
typeof
324350
udaf
325351
udf

license_header.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved.
2+
Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
33

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[build-system]
2+
requires = [
3+
"setuptools",
4+
"protoc-wheel-0==21.1", # Protocol buffer compiler for Snowpark IR
5+
"mypy-protobuf", # used in generating typed Python code from protobuf for Snowpark IR
6+
]
7+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@
5858
"graphviz", # used in plot tests
5959
"pytest-assume", # sql counter check
6060
"decorator", # sql counter check
61-
"protoc-wheel-0==21.1", # Protocol buffer compiler, for Snowpark IR
62-
"mypy-protobuf", # used in generating typed Python code from protobuf for Snowpark IR
6361
"lxml", # used in read_xml tests
62+
"tox", # used for setting up testing environments
6463
]
6564

6665
# read the version

src/conftest.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,27 @@ def pytest_runtest_makereport(item, call):
4141
return tr
4242

4343

44+
# These tests require python packages that are no longer built for python 3.8
45+
PYTHON_38_SKIPS = {
46+
"snowpark.session.Session.replicate_local_environment",
47+
"snowpark.session.Session.table_function",
48+
}
49+
50+
DocTestFinder = doctest.DocTestFinder
51+
52+
53+
class CustomDocTestFinder(DocTestFinder):
54+
def _find(self, tests, obj, name, module, source_lines, globs, seen):
55+
if name in PYTHON_38_SKIPS and sys.version_info < (3, 9):
56+
return
57+
return DocTestFinder._find(
58+
self, tests, obj, name, module, source_lines, globs, seen
59+
)
60+
61+
62+
doctest.DocTestFinder = CustomDocTestFinder
63+
64+
4465
# scope is module so that we ensure we delete the session before
4566
# moving onto running the tests in the tests dir. Having only one
4667
# session is important to certain UDF tests to pass , since they

src/snowflake/snowpark/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
#
3-
# Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved.
3+
# Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
44
#
55

66
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#
2-
# Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved.
2+
# Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
33
#

0 commit comments

Comments
 (0)