Skip to content

SNOW-2370108: snowpark fails when group by agg called twice on the same df#3819

Merged
sfc-gh-aling merged 7 commits intomainfrom
SNOW-2370108-snowpark-fails-when-group-by-agg-called-twice-on-the-same-df
Sep 30, 2025
Merged

SNOW-2370108: snowpark fails when group by agg called twice on the same df#3819
sfc-gh-aling merged 7 commits intomainfrom
SNOW-2370108-snowpark-fails-when-group-by-agg-called-twice-on-the-same-df

Conversation

@sfc-gh-aling
Copy link
Contributor

@sfc-gh-aling sfc-gh-aling commented Sep 29, 2025

  1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

The _join_alias_fix previously mutates the original expr_to_alias map of a plan, the fix is to create a new object and update the new object to avoid mutating existing ones.

also fix test failure in daily precommit as well as some cleanup work

daily precommit test passing: https://github.com/snowflakedb/snowpark-python/actions/runs/18113970923/job/51546036912

  1. 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
    • If adding any arguments to public Snowpark APIs or creating new public Snowpark APIs, I acknowledge that I have ensured my changes include AST support. Follow the link for more information: AST Support Guidelines
  2. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

Comment on lines -733 to -744
- if: ${{ matrix.python-version == '3.12' }}
name: Run tests (excluding doctests and udf tests)
run: python -m tox -e "py${PYTHON_VERSION/\./}-notudfdoctest-ci"
env:
PYTHON_VERSION: ${{ matrix.python-version }}
cloud_provider: ${{ matrix.cloud-provider }}
PYTEST_ADDOPTS: --color=yes --tb=short --join_alias_fix
TOX_PARALLEL_NO_SPINNER: 1
SNOWFLAKE_IS_PYTHON_RUNTIME_TEST: 1
SNOWPARK_PYTHON_API_TEST_BUCKET_PATH: ${{ secrets.SNOWPARK_PYTHON_API_TEST_BUCKET_PATH }}
SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION: ${{ vars.SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION }}
shell: bash
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean up work, this part is already covered in Run tests (excluding doctests)

@sfc-gh-aling sfc-gh-aling merged commit 6037cd7 into main Sep 30, 2025
89 of 115 checks passed
@sfc-gh-aling sfc-gh-aling deleted the SNOW-2370108-snowpark-fails-when-group-by-agg-called-twice-on-the-same-df branch September 30, 2025 17:29
@github-actions github-actions bot locked and limited conversation to collaborators Sep 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants