Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add allow_nan_equality option to assert_approx_df_equality #29
base: main
Are you sure you want to change the base?
Add allow_nan_equality option to assert_approx_df_equality #29
Changes from all commits
945443e
b94d4d5
e74368e
5fe032a
958b19c
34fd432
c3b907c
147bb57
3ff1f18
47f900a
461c978
0533904
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I don't think we need to do this cause we know the types from the schema.
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.
Hi @MrPowers , can you have a look at my draft pull request here to see if I'm going along the right lines with your 3rd objective?
To summarise, rather than the following line in
check_equal
:I'm doing this:
Where dtype gets passed into the function, and is created with the following line:
Because we've already compared the schemas, we know that they're equal so we just use
df1.schema
.Will using
isinstance
really have a noticeable effect on the speed of the tests? I feel like it might be the safer option.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.
I just did some further testing too, and my current solution would not work for pyspark columns with
DecimalType
, as the python type isdecimal.Decimal
notfloat
. I'd need to change that if the original implementation is selected.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.
Any time to give me a steer this week @MrPowers ? As in point me in the right direction for the solution (sorry realised giving a steer might be a localised phrase) - where are you from anyway?