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-1478684: Remove index.equals workaround from compare #1972

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

sfc-gh-nkumar
Copy link
Contributor

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

    Fixes SNOW-1478684

  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.
  3. Please describe how your code solves the related issue.

    This bug is no longer reproducible. Possibly due to recent changes in Index.equals (https://snowflakecomputing.atlassian.net/browse/SNOW-1458148). This PR adds the new test as validation before closing the issue.

@sfc-gh-nkumar sfc-gh-nkumar requested a review from a team as a code owner July 24, 2024 17:00
@sfc-gh-nkumar sfc-gh-nkumar added 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 labels Jul 24, 2024
Copy link
Contributor

@sfc-gh-mvashishtha sfc-gh-mvashishtha left a comment

Choose a reason for hiding this comment

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

Thanks! Should we also remove this workaround for the bug:

# TODO(SNOW-1478684): Stop calling to_pandas() to work around Index.equals() bug.
def pandas_index(index: Union[native_pd.Index, pd.Index]) -> native_pd.Index:
if isinstance(index, native_pd.Index):
return index
return index.to_pandas()

@sfc-gh-nkumar sfc-gh-nkumar force-pushed the nkumar-SNOW-1478684-equals-bug branch from ce87759 to 49338df Compare July 24, 2024 18:15
@sfc-gh-nkumar
Copy link
Contributor Author

Thanks! Should we also remove this workaround for the bug:

# TODO(SNOW-1478684): Stop calling to_pandas() to work around Index.equals() bug.
def pandas_index(index: Union[native_pd.Index, pd.Index]) -> native_pd.Index:
if isinstance(index, native_pd.Index):
return index
return index.to_pandas()

Done!

@sfc-gh-nkumar sfc-gh-nkumar changed the title SNOW-1478684: Add equals test for lazy index comparing columns to self SNOW-1478684: Remove index.equals workaround from compare Jul 24, 2024
@sfc-gh-nkumar sfc-gh-nkumar merged commit c1f5d80 into main Jul 24, 2024
35 checks passed
@sfc-gh-nkumar sfc-gh-nkumar deleted the nkumar-SNOW-1478684-equals-bug branch July 24, 2024 21:38
@github-actions github-actions bot locked and limited conversation to collaborators Jul 24, 2024
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 snowpark-pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants