Skip to content

Commit 39e0823

Browse files
committed
Merge remote-tracking branch 'origin/main' into SNOW-3309660-fix-xml-tests-for-snowfort
2 parents 4e0ef2f + e7c3d2e commit 39e0823

139 files changed

Lines changed: 384 additions & 137 deletions

File tree

Some content is hidden

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

.github/workflows/daily_precommit.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ jobs:
198198
cloud_provider: ${{ matrix.cloud-provider }}
199199
PYTEST_ADDOPTS: --color=yes --tb=short
200200
TOX_PARALLEL_NO_SPINNER: 1
201+
SNOWPARK_PYTHON_API_TEST_BUCKET_PATH: ${{ secrets.SNOWPARK_PYTHON_API_TEST_BUCKET_PATH }}
202+
SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION: ${{ vars.SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION }}
201203
shell: bash
202204
- name: Install MS ODBC Driver (Ubuntu only)
203205
if: ${{ matrix.os.download_name == 'linux' }}
@@ -611,7 +613,8 @@ jobs:
611613
run: uv pip install -U setuptools pip wheel --system
612614
- name: Install tox
613615
run: uv pip install tox --system
614-
- if: ${{ contains('macos', matrix.os.download_name) }}
616+
# TODO: enable doctest for 3.14
617+
- if: ${{ contains('macos', matrix.os.download_name) && matrix.python-version != '3.14' }}
615618
name: Run doctests
616619
run: python -m tox -e "py${PYTHON_VERSION}-doctest-notudf-ci"
617620
env:
@@ -620,7 +623,9 @@ jobs:
620623
PYTEST_ADDOPTS: --color=yes --tb=short --disable_cte_optimization
621624
TOX_PARALLEL_NO_SPINNER: 1
622625
shell: bash
623-
- name: Run tests (excluding doctests)
626+
# TODO: enable for 3.14
627+
- if: ${{ matrix.python-version != '3.14' }}
628+
name: Run tests (excluding doctests)
624629
run: python -m tox -e "py${PYTHON_VERSION/\./}-dailynotdoctest-ci"
625630
env:
626631
PYTHON_VERSION: ${{ matrix.python-version }}
@@ -630,6 +635,18 @@ jobs:
630635
SNOWPARK_PYTHON_API_TEST_BUCKET_PATH: ${{ secrets.SNOWPARK_PYTHON_API_TEST_BUCKET_PATH }}
631636
SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION: ${{ vars.SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION }}
632637
shell: bash
638+
# TODO: remove the test below and run udf tests for 3.14
639+
- if: ${{ matrix.python-version == '3.14' }}
640+
name: Run tests (excluding udf, doctests)
641+
run: python -m tox -e "py${PYTHON_VERSION/\./}-dailynotdoctestnotudf-ci"
642+
env:
643+
PYTHON_VERSION: ${{ matrix.python-version }}
644+
cloud_provider: ${{ matrix.cloud-provider }}
645+
PYTEST_ADDOPTS: --color=yes --tb=short --disable_cte_optimization
646+
TOX_PARALLEL_NO_SPINNER: 1
647+
SNOWPARK_PYTHON_API_TEST_BUCKET_PATH: ${{ secrets.SNOWPARK_PYTHON_API_TEST_BUCKET_PATH }}
648+
SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION: ${{ vars.SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION }}
649+
shell: bash
633650
- name: Combine coverages
634651
run: python -m tox -e coverage --skip-missing-interpreters false
635652
shell: bash

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 1.50.0 (TBD)
3+
## 1.50.0 (2026-04-23)
44

55
### Snowpark Python API Updates
66

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.49.0" %}
2+
{% set version = "1.50.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

src/snowflake/snowpark/_internal/analyzer/select_statement.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,17 @@ def filter(self, col: Expression) -> "SelectStatement":
16041604
can_be_flattened = (
16051605
(not self.flatten_disabled)
16061606
and can_clause_dependent_columns_flatten(
1607-
derive_dependent_columns(col), self.column_states, "filter"
1607+
derive_dependent_columns(col),
1608+
self.column_states,
1609+
"filter",
1610+
# In Snowpark Connect compatible mode, the NEW-column branch
1611+
# below allows flattening through any subquery. Pass
1612+
# subquery_has_limit so that branch can still reject
1613+
# flattening across LIMIT/OFFSET, since WHERE cannot cross
1614+
# LIMIT/OFFSET without changing semantics.
1615+
subquery_has_limit_or_offset=(
1616+
self.limit_ is not None or self.offset is not None
1617+
),
16081618
)
16091619
and not has_data_generator_or_window_function_exp(self.projection)
16101620
and not (
@@ -2175,6 +2185,7 @@ def can_clause_dependent_columns_flatten(
21752185
dependent_columns: Optional[AbstractSet[str]],
21762186
subquery_column_states: ColumnStateDict,
21772187
clause: Literal["filter", "sort"],
2188+
subquery_has_limit_or_offset: bool = False,
21782189
) -> bool:
21792190
assert clause in (
21802191
"filter",
@@ -2218,6 +2229,14 @@ def can_clause_dependent_columns_flatten(
22182229
and context._snowpark_connect_flatten_select_after_sort
22192230
):
22202231
return False
2232+
# Compatible-mode safety: even though we loosened the
2233+
# NEW-column flatten rule above, we must not flatten a
2234+
# WHERE across LIMIT/OFFSET on a NEW column — that
2235+
# would push the filter in front of the limit and
2236+
# change the result set. (Sort has its own
2237+
# `not self.limit_` guard at the call site.)
2238+
if clause == "filter" and subquery_has_limit_or_offset:
2239+
return False
22212240

22222241
return True
22232242

src/snowflake/snowpark/_internal/type_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ def convert_sf_to_sp_type(
280280
if internal_size > 0:
281281
return StringType(
282282
internal_size,
283-
internal_size == max_string_size or internal_size == _MAX_ICEBERG_STRING_SIZE,
283+
internal_size == max_string_size
284+
or internal_size == _MAX_ICEBERG_STRING_SIZE,
284285
)
285286
elif internal_size == 0:
286287
return StringType()

src/snowflake/snowpark/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33

44
# Update this for the versions
5-
VERSION = (1, 49, 0)
5+
VERSION = (1, 50, 0)

tests/ast/data/DataFrame.agg.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,6 @@ client_language {
508508
}
509509
client_version {
510510
major: 1
511-
minor: 49
511+
minor: 50
512512
}
513513
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"

tests/ast/data/DataFrame.ai.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2146,6 +2146,6 @@ client_language {
21462146
}
21472147
client_version {
21482148
major: 1
2149-
minor: 49
2149+
minor: 50
21502150
}
21512151
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"

tests/ast/data/DataFrame.col_ilike.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,6 @@ client_language {
239239
}
240240
client_version {
241241
major: 1
242-
minor: 49
242+
minor: 50
243243
}
244244
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"

tests/ast/data/DataFrame.collect.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,6 @@ client_language {
511511
}
512512
client_version {
513513
major: 1
514-
minor: 49
514+
minor: 50
515515
}
516516
id: "\003U\"\366q\366P\346\260\261?\234\303\254\316\353"

0 commit comments

Comments
 (0)