Skip to content

Commit 136c259

Browse files
Merge branch 'main' into SNOW-1877449
2 parents 827e093 + e633e96 commit 136c259

File tree

20 files changed

+1295
-213
lines changed

20 files changed

+1295
-213
lines changed

.github/workflows/daily_precommit.yml

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
download_name: macos
9999
- image_name: windows-latest-64-cores
100100
download_name: windows
101-
python-version: ["3.8", "3.9", "3.10", "3.11"]
101+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
102102
cloud-provider: [aws, azure, gcp]
103103
steps:
104104
- name: Checkout Code
@@ -145,14 +145,25 @@ jobs:
145145
# Specify SNOWFLAKE_IS_PYTHON_RUNTIME_TEST: 1 when adding >= python3.12 with no server-side support
146146
# For example, see https://github.com/snowflakedb/snowpark-python/pull/681
147147
shell: bash
148-
- name: Run tests (excluding doctests)
148+
- if: ${{ matrix.python-version != '3.12' }}
149+
name: Run tests (excluding doctests)
149150
run: python -m tox -e "py${PYTHON_VERSION/\./}-dailynotdoctest-ci"
150151
env:
151152
PYTHON_VERSION: ${{ matrix.python-version }}
152153
cloud_provider: ${{ matrix.cloud-provider }}
153154
PYTEST_ADDOPTS: --color=yes --tb=short
154155
TOX_PARALLEL_NO_SPINNER: 1
155156
shell: bash
157+
- if: ${{ matrix.python-version == '3.12' }}
158+
name: Run tests (excluding doctests and udf tests)
159+
run: python -m tox -e "py${PYTHON_VERSION/\./}-dailynotdoctestnotudf-ci"
160+
env:
161+
PYTHON_VERSION: ${{ matrix.python-version }}
162+
cloud_provider: ${{ matrix.cloud-provider }}
163+
PYTEST_ADDOPTS: --color=yes --tb=short
164+
TOX_PARALLEL_NO_SPINNER: 1
165+
SNOWFLAKE_IS_PYTHON_RUNTIME_TEST: 1
166+
shell: bash
156167
- name: Combine coverages
157168
run: python -m tox -e coverage --skip-missing-interpreters false
158169
shell: bash
@@ -217,7 +228,7 @@ jobs:
217228
os:
218229
- image_name: macos-latest
219230
download_name: macos # it includes doctest
220-
python-version: ["3.8", "3.9", "3.10", "3.11"]
231+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
221232
cloud-provider: [aws]
222233
steps:
223234
- name: Checkout Code
@@ -258,14 +269,25 @@ jobs:
258269
PYTEST_ADDOPTS: --color=yes --tb=short --disable_sql_simplifier
259270
TOX_PARALLEL_NO_SPINNER: 1
260271
shell: bash
261-
- name: Run tests (excluding doctests)
272+
- if: ${{ matrix.python-version != '3.12' }}
273+
name: Run tests (excluding doctests)
262274
run: python -m tox -e "py${PYTHON_VERSION/\./}-dailynotdoctest-ci"
263275
env:
264276
PYTHON_VERSION: ${{ matrix.python-version }}
265277
cloud_provider: ${{ matrix.cloud-provider }}
266278
PYTEST_ADDOPTS: --color=yes --tb=short --disable_sql_simplifier
267279
TOX_PARALLEL_NO_SPINNER: 1
268280
shell: bash
281+
- if: ${{ matrix.python-version == '3.12' }}
282+
name: Run tests (excluding doctests and udf tests)
283+
run: python -m tox -e "py${PYTHON_VERSION/\./}-dailynotdoctestnotudf-ci"
284+
env:
285+
PYTHON_VERSION: ${{ matrix.python-version }}
286+
cloud_provider: ${{ matrix.cloud-provider }}
287+
PYTEST_ADDOPTS: --color=yes --tb=short --disable_sql_simplifier
288+
TOX_PARALLEL_NO_SPINNER: 1
289+
SNOWFLAKE_IS_PYTHON_RUNTIME_TEST: 1
290+
shell: bash
269291
- name: Combine coverages
270292
run: python -m tox -e coverage --skip-missing-interpreters false
271293
shell: bash
@@ -354,7 +376,7 @@ jobs:
354376
os:
355377
- image_name: macos-latest
356378
download_name: macos # it includes doctest
357-
python-version: ["3.8", "3.9", "3.10", "3.11"]
379+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
358380
cloud-provider: [aws]
359381
steps:
360382
- name: Checkout Code
@@ -484,7 +506,7 @@ jobs:
484506
os:
485507
- image_name: macos-latest
486508
download_name: macos # it includes doctest
487-
python-version: ["3.8", "3.9", "3.10", "3.11"]
509+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
488510
cloud-provider: [aws]
489511
steps:
490512
- name: Checkout Code
@@ -525,14 +547,23 @@ jobs:
525547
PYTEST_ADDOPTS: --color=yes --tb=short --disable_cte_optimization
526548
TOX_PARALLEL_NO_SPINNER: 1
527549
shell: bash
528-
- name: Run tests (excluding doctests)
550+
- if: ${{ matrix.python-version != '3.12' }}
551+
name: Run tests (excluding doctests)
529552
run: python -m tox -e "py${PYTHON_VERSION/\./}-dailynotdoctest-ci"
530553
env:
531554
PYTHON_VERSION: ${{ matrix.python-version }}
532555
cloud_provider: ${{ matrix.cloud-provider }}
533556
PYTEST_ADDOPTS: --color=yes --tb=short --disable_cte_optimization
534557
TOX_PARALLEL_NO_SPINNER: 1
535558
shell: bash
559+
- if: ${{ matrix.python-version == '3.12' }}
560+
name: Run tests (excluding doctests and udf tests)
561+
env:
562+
PYTHON_VERSION: ${{ matrix.python-version }}
563+
cloud_provider: ${{ matrix.cloud-provider }}
564+
PYTEST_ADDOPTS: --color=yes --tb=short --disable_cte_optimization
565+
TOX_PARALLEL_NO_SPINNER: 1
566+
shell: bash
536567
- name: Combine coverages
537568
run: python -m tox -e coverage --skip-missing-interpreters false
538569
shell: bash

.github/workflows/precommit.yml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
fail-fast: false
9595
matrix:
9696
os: [macos-latest, windows-latest-64-cores, ubuntu-latest-64-cores]
97-
python-version: ["3.9", "3.10", "3.11"]
97+
python-version: ["3.9", "3.10", "3.11", "3.12"]
9898
cloud-provider: [aws, gcp, azure]
9999
exclude:
100100
# only run macos with aws py3.9 for doctest
@@ -169,19 +169,19 @@ jobs:
169169
- name: Install tox
170170
run: python -m pip install tox
171171
# we only run doctest on macos
172-
- if: ${{ matrix.os == 'macos-latest' }}
172+
- if: ${{ matrix.os == 'macos-latest' && matrix.python-version != '3.12'}}
173173
name: Run doctests
174174
run: python -m tox -e "py${PYTHON_VERSION}-doctest-notudf-ci"
175175
env:
176176
PYTHON_VERSION: ${{ matrix.python-version }}
177177
cloud_provider: ${{ matrix.cloud-provider }}
178178
PYTEST_ADDOPTS: --color=yes --tb=short
179179
TOX_PARALLEL_NO_SPINNER: 1
180-
# Specify SNOWFLAKE_IS_PYTHON_RUNTIME_TEST: 1 when adding >= python3.12 with no server-side support
180+
# Specify SNOWFLAKE_IS_PYTHON_RUNTIME_TEST: 1 when adding >= python3.13 with no server-side support
181181
# For example, see https://github.com/snowflakedb/snowpark-python/pull/681
182182
shell: bash
183183
# do not run other tests for macos
184-
- if: ${{ matrix.os != 'macos-latest' }}
184+
- if: ${{ matrix.os != 'macos-latest' && matrix.python-version != '3.12' }}
185185
name: Run tests (excluding doctests)
186186
run: python -m tox -e "py${PYTHON_VERSION/\./}-notdoctest-ci"
187187
env:
@@ -190,6 +190,16 @@ jobs:
190190
PYTEST_ADDOPTS: --color=yes --tb=short
191191
TOX_PARALLEL_NO_SPINNER: 1
192192
shell: bash
193+
- if: ${{ matrix.python-version == '3.12' }}
194+
name: Run tests (excluding doctests and udf tests)
195+
run: python -m tox -e "py${PYTHON_VERSION/\./}-notudfdoctest-ci"
196+
env:
197+
PYTHON_VERSION: ${{ matrix.python-version }}
198+
cloud_provider: ${{ matrix.cloud-provider }}
199+
PYTEST_ADDOPTS: --color=yes --tb=short
200+
TOX_PARALLEL_NO_SPINNER: 1
201+
SNOWFLAKE_IS_PYTHON_RUNTIME_TEST: 1
202+
shell: bash
193203
- name: Combine coverages
194204
run: python -m tox -e coverage --skip-missing-interpreters false
195205
shell: bash
@@ -211,7 +221,7 @@ jobs:
211221
fail-fast: false
212222
matrix:
213223
os: [macos-latest, windows-latest, ubuntu-latest]
214-
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
224+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
215225
cloud-provider: [aws]
216226
steps:
217227
- name: Checkout Code
@@ -402,7 +412,7 @@ jobs:
402412
fail-fast: false
403413
matrix:
404414
os: [ ubuntu-latest ]
405-
python-version: [ "3.9", "3.11" ]
415+
python-version: [ "3.9", "3.11", "3.12" ]
406416
cloud-provider: [ aws ]
407417
steps:
408418
- name: Checkout Code
@@ -434,14 +444,25 @@ jobs:
434444
run: python -m pip install -U setuptools pip wheel
435445
- name: Install tox
436446
run: python -m pip install tox
437-
- name: Run tests for AST (II/II)
447+
- if: ${{ matrix.python-version != '3.12' }}
448+
name: Run tests for AST (II/II)
438449
run: python -m tox -e "py${PYTHON_VERSION/\./}-notdoctest-ci"
439450
env:
440451
PYTHON_VERSION: ${{ matrix.python-version }}
441452
cloud_provider: ${{ matrix.cloud-provider }}
442453
PYTEST_ADDOPTS: --color=yes --tb=short --enable_ast
443454
TOX_PARALLEL_NO_SPINNER: 1
444455
shell: bash
456+
- if: ${{ matrix.python-version == '3.12' }}
457+
name: Run tests for AST (II/II) (excluding udf tests)
458+
run: python -m tox -e "py${PYTHON_VERSION/\./}-notudfdoctest-ci"
459+
env:
460+
PYTHON_VERSION: ${{ matrix.python-version }}
461+
cloud_provider: ${{ matrix.cloud-provider }}
462+
PYTEST_ADDOPTS: --color=yes --tb=short --enable_ast
463+
TOX_PARALLEL_NO_SPINNER: 1
464+
SNOWFLAKE_IS_PYTHON_RUNTIME_TEST: 1
465+
shell: bash
445466
- name: Combine coverages
446467
run: python -m tox -e coverage --skip-missing-interpreters false
447468
shell: bash

CHANGELOG.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,33 @@
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
@@ -24,9 +51,10 @@
2451
#### Bug Fixes
2552

2653
- Fixed a bug in local testing mode that caused a column to contain None when it should contain 0
27-
- 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.
2855
- Fixed a bug in function `date_format` that caused an error when the input column was date type or timestamp type.
2956
- Fixed a bug in dataframe that null value can be inserted in a non-nullable column.
57+
- Fixed a bug in `replace` when passing `Column` expression objects.
3058

3159
### Snowpark pandas API Updates
3260

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

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"tzlocal", # Snowpark IR
3232
"snowflake.core>=1.0.0, <2", # Catalog
3333
]
34-
REQUIRED_PYTHON_VERSION = ">=3.8, <3.12"
34+
REQUIRED_PYTHON_VERSION = ">=3.8, <3.13"
3535

3636
if os.getenv("SNOWFLAKE_IS_PYTHON_RUNTIME_TEST", False):
3737
REQUIRED_PYTHON_VERSION = ">=3.8"
@@ -228,6 +228,7 @@ def run(self):
228228
"Programming Language :: Python :: 3.9",
229229
"Programming Language :: Python :: 3.10",
230230
"Programming Language :: Python :: 3.11",
231+
"Programming Language :: Python :: 3.12",
231232
"Topic :: Database",
232233
"Topic :: Software Development",
233234
"Topic :: Software Development :: Libraries",

0 commit comments

Comments
 (0)