Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1348886: Bugfix: AssertError in sort_values after indexing #1452

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

sfc-gh-nkumar
Copy link
Contributor

@sfc-gh-nkumar sfc-gh-nkumar commented Apr 29, 2024

Please answer these questions before submitting your pull requests. Thanks!

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

    Fixes SNOW-1348886

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.
    Following steps result in AssertionError: row count column "row_count" not found in ['"row_position"', '"PRICE"']
    df = pd.read_snowflake("LINEITEM")
    print(df)
    df["PRICE"].sort_values(ascending=True)

Root cause: in ordered_dataframe.sort method we are passing row_count column to new ordered dataframe but didn't include row_count column in projection.

@sfc-gh-nkumar sfc-gh-nkumar requested a review from a team as a code owner April 29, 2024 19:49
@sfc-gh-nkumar sfc-gh-nkumar added NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md NO-PANDAS-CHANGELOG-UPDATES NO-PANDAS-CHANGEDOC-UPDATES This PR does not update Snowpark pandas docs labels Apr 29, 2024
Copy link
Contributor

@sfc-gh-vbudati sfc-gh-vbudati left a comment

Choose a reason for hiding this comment

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

Looks good, thanks Naresh!

@sfc-gh-nkumar sfc-gh-nkumar force-pushed the nkumar-SNOW-1348886-bugfix-sort-values branch from b7b88ee to 9785b46 Compare April 29, 2024 21:33
@sfc-gh-nkumar sfc-gh-nkumar force-pushed the nkumar-SNOW-1348886-bugfix-sort-values branch from 9785b46 to a2537ed Compare April 30, 2024 05:16
@sfc-gh-nkumar sfc-gh-nkumar merged commit 591ba87 into main Apr 30, 2024
26 checks passed
@sfc-gh-nkumar sfc-gh-nkumar deleted the nkumar-SNOW-1348886-bugfix-sort-values branch April 30, 2024 17:48
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2024
@sfc-gh-azhan
Copy link
Collaborator

nice work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md NO-PANDAS-CHANGEDOC-UPDATES This PR does not update Snowpark pandas docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants