From 77ed9a3a2ef35c6e5ab6a6cb2c83916f27360bf5 Mon Sep 17 00:00:00 2001 From: Ovidiu Platon Date: Tue, 3 Dec 2024 11:56:47 -0800 Subject: [PATCH 1/3] SNOW-1842464 Fix the stored procedure build break (#2703) 1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR. Fixes SNOW-1842464 2. Fill out the following pre-review checklist: - [ ] I am adding a new automated test(s) to verify correctness of my new code - [ ] If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing - [ ] I am adding new logging messages - [ ] I am adding a new telemetry message - [ ] I am adding new credentials - [x] I am adding a new dependency - [ ] If this is a new feature/behavior, I'm adding the Local Testing parity changes. - [x] I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: [Thread-safe Developer Guidelines](https://github.com/snowflakedb/snowpark-python/blob/main/CONTRIBUTING.md#thread-safe-development) 3. Please describe how your code solves the related issue. Add explicit dependencies on `python-dateutil` to `setup.py` and `recipe/meta.yaml`. --- CHANGELOG.md | 1 + recipe/meta.yaml | 1 + setup.py | 1 + 3 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e93b7fb04c..dd9d3f92cee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ #### Dependency Updates +- Added a runtime dependency on `python-dateutil`. ### Snowpark pandas API Updates diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 1b4c6d8338a..221c6b8e5d4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -42,6 +42,7 @@ requirements: - pyyaml # Snowpark IR - protobuf >=3.20,<6 + - python-dateutil - tzlocal test: diff --git a/setup.py b/setup.py index 03d6b588ae2..2099b733a53 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ "cloudpickle==2.2.1;python_version~='3.11'", # backend only supports cloudpickle 2.2.1 + python 3.11 at the moment # `protoc` < 3.20 is not able to generate protobuf code compatible with protobuf >= 3.20. "protobuf>=3.20, <6", # Snowpark IR + "python-dateutil", # Snowpark IR "tzlocal", # Snowpark IR ] REQUIRED_PYTHON_VERSION = ">=3.8, <3.12" From 8ad96ca04759efb4abe1eb9553552ccd90c318bc Mon Sep 17 00:00:00 2001 From: Andong Zhan Date: Tue, 3 Dec 2024 13:55:08 -0800 Subject: [PATCH 2/3] =?UTF-8?q?SNOW-1843830=20Increase=20reruns-delay=20fo?= =?UTF-8?q?r=20Insufficient=20resource=20during=20i=E2=80=A6=20(#2705)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …nterleaved execution 1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR. Fixes SNOW-1843830 2. Fill out the following pre-review checklist: - [ ] I am adding a new automated test(s) to verify correctness of my new code - [ ] If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing - [ ] I am adding new logging messages - [ ] I am adding a new telemetry message - [ ] I am adding new credentials - [ ] I am adding a new dependency - [ ] If this is a new feature/behavior, I'm adding the Local Testing parity changes. - [ ] I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: [Thread-safe Developer Guidelines](https://github.com/snowflakedb/snowpark-python/blob/main/CONTRIBUTING.md#thread-safe-development) 3. Please describe how your code solves the related issue. Please write a short description of how your code change solves the related issue. Increase reruns-delay to mitigate flaky tests --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index d1830f5f362..462138104a0 100644 --- a/tox.ini +++ b/tox.ini @@ -70,7 +70,7 @@ setenv = # This configures the extra dependency required by modin test modin: SNOWFLAKE_PYTEST_MODIN_DEPS = [modin-development] modin_pandas_version: SNOWFLAKE_PYTEST_PANDAS_DEPS = pandas=={env:MODIN_PANDAS_PATCH_VERSION} - SNOW_1314507_WORKAROUND_RERUN_FLAGS = --reruns 5 --reruns-delay 1 --only-rerun "Insufficient resource during interleaved execution." + SNOW_1314507_WORKAROUND_RERUN_FLAGS = --reruns 5 --reruns-delay 5 --only-rerun "Insufficient resource during interleaved execution." MODIN_PYTEST_CMD = pytest {env:SNOWFLAKE_PYTEST_VERBOSITY:} {env:SNOWFLAKE_PYTEST_PARALLELISM:} {env:SNOWFLAKE_PYTEST_COV_CMD} --ignore=tests/resources MODIN_PYTEST_DAILY_CMD = pytest {env:SNOWFLAKE_PYTEST_VERBOSITY:} {env:SNOWFLAKE_PYTEST_DAILY_PARALLELISM:} {env:SNOWFLAKE_PYTEST_COV_CMD} --ignore=tests/resources MODIN_PYTEST_NO_COV_CMD = pytest {env:SNOWFLAKE_PYTEST_VERBOSITY:} {env:SNOWFLAKE_PYTEST_PARALLELISM:} --ignore=tests/resources From dc83b577b8194e1ab58082ca2c3145402df16098 Mon Sep 17 00:00:00 2001 From: Leonhard Spiegelberg Date: Tue, 3 Dec 2024 15:16:10 -0800 Subject: [PATCH 3/3] [SNOW-1843885] Fix error caused by snowpark_round (#2708) 1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR. Fixes SNOW-1843885. 2. Fill out the following pre-review checklist: - [ ] I am adding a new automated test(s) to verify correctness of my new code - [ ] If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing - [ ] I am adding new logging messages - [ ] I am adding a new telemetry message - [ ] I am adding new credentials - [ ] I am adding a new dependency - [ ] If this is a new feature/behavior, I'm adding the Local Testing parity changes. - [x] I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: [Thread-safe Developer Guidelines](https://github.com/snowflakedb/snowpark-python/blob/main/CONTRIBUTING.md#thread-safe-development) 3. Please describe how your code solves the related issue. Fixes AST error caused by `snowpark_round` where due to aliasing `session.ast_enabled` was not properly propagated. --- .../snowpark/modin/plugin/compiler/snowflake_query_compiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/snowflake/snowpark/modin/plugin/compiler/snowflake_query_compiler.py b/src/snowflake/snowpark/modin/plugin/compiler/snowflake_query_compiler.py index 967f0f7186d..b454ae1c3a7 100644 --- a/src/snowflake/snowpark/modin/plugin/compiler/snowflake_query_compiler.py +++ b/src/snowflake/snowpark/modin/plugin/compiler/snowflake_query_compiler.py @@ -7955,7 +7955,8 @@ def _apply_with_udtf_and_dynamic_pivot_along_axis_1( partition_expression = ( snowpark_round( col(row_position_snowflake_quoted_identifier) - / pandas_lit(partition_size) + / pandas_lit(partition_size), + _emit_ast=self._modin_frame.ordered_dataframe.session.ast_enabled, ) ).as_(partition_identifier) udtf_dataframe = new_internal_df.ordered_dataframe.select(