-
Notifications
You must be signed in to change notification settings - Fork 47
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
fix: Ensure no double execution for to_pandas #1032
Conversation
pd.testing.assert_frame_equal( | ||
df.explode(col_names, ignore_index=ignore_index).to_pandas(), | ||
pd_df.explode(col_names, ignore_index=ignore_index), | ||
check_index_type=False, | ||
check_dtype=False, | ||
) | ||
execs_post = metrics.execution_count | ||
# we test this property on this method in particular as compilation | ||
# is non-deterministic and won't use the query cache as implemented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would also document that this is to check that the execution was performed only once
Sorry, something went wrong.
All reactions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reorganized a bit to make clear that only care about executions from the to_pandas()
invocation.
Sorry, something went wrong.
All reactions
pd_df = df.to_pandas() | ||
execs_pre = metrics.execution_count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: put this line right below line 4831 or move line 4831 above this line, just to keep together statements that are related
Sorry, something went wrong.
All reactions
sycai
Genesis929
Successfully merging this pull request may close these issues.
None yet
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕