Skip to content

SNOW-3485471: fix aliased dataframe referencing wrong column#4246

Merged
sfc-gh-aling merged 2 commits into
mainfrom
aling-select-statement-copy-alias-shared-reference
Jun 1, 2026
Merged

SNOW-3485471: fix aliased dataframe referencing wrong column#4246
sfc-gh-aling merged 2 commits into
mainfrom
aling-select-statement-copy-alias-shared-reference

Conversation

@sfc-gh-aling

@sfc-gh-aling sfc-gh-aling commented May 29, 2026

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

Fixed a bug where calling DataFrame.alias() twice on the same DataFrame (e.g. for a self-join) caused both aliases to share the same internal column-mapping dictionary. This made col("R", "col") resolve to the same column as col("L", "col"), producing incorrect join conditions and filter expressions.

  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.

@sfc-gh-aling sfc-gh-aling changed the title fix df alias SNOW-3485471: fix aliased dataframe referencing wrong column May 29, 2026
@sfc-gh-aling sfc-gh-aling marked this pull request as ready for review May 29, 2026 23:14
@sfc-gh-aling sfc-gh-aling requested review from a team as code owners May 29, 2026 23:14
@codecov-commenter

codecov-commenter commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.39%. Comparing base (cf1407f) to head (2e22850).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4246   +/-   ##
=======================================
  Coverage   95.39%   95.39%           
=======================================
  Files         171      171           
  Lines       44241    44241           
  Branches     7556     7556           
=======================================
  Hits        42204    42204           
  Misses       1250     1250           
  Partials      787      787           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sfc-gh-aling sfc-gh-aling merged commit 2ec6d7b into main Jun 1, 2026
28 of 29 checks passed
@sfc-gh-aling sfc-gh-aling deleted the aling-select-statement-copy-alias-shared-reference branch June 1, 2026 18:39
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 1, 2026
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.

4 participants