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

all.equal dispatches to column methods #4546

Merged
merged 12 commits into from
Jul 13, 2024
Merged

all.equal dispatches to column methods #4546

merged 12 commits into from
Jul 13, 2024

Conversation

MichaelChirico
Copy link
Member

@MichaelChirico MichaelChirico commented Jun 14, 2020

Closes #4543

A bit clunky, open to suggestions for other ways to solve #4543 and also keep test 1710.5.

The improvement here has flushed out some really long-time broken tests in our suite of two flavors:

  • Comparisons on integer64 columns were really broken. Actually we were comparing the underlying double representations, which are typically size 1e-300 floats, which of course "look the same" from all.equal.numeric() PoV. Really obvious mismatches were not caught.
  • Comparisons on POSIXct columns that differ in milliseconds. We might prefer to ignore such tiny differences, but I found in our cases it is a meaningful difference useful for testing when fwrite() retains sub-second representations vs. not.

Overall I think this is a really nice catch by this PR & glad the suite is improved.

R/setops.R Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 14, 2020

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.61%. Comparing base (fad5b17) to head (9efeeac).

❗ Current head 9efeeac differs from pull request most recent head 4dae909. Consider uploading reports for the commit 4dae909 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4546      +/-   ##
==========================================
+ Coverage   97.53%   99.61%   +2.07%     
==========================================
  Files          80       73       -7     
  Lines       14916    14105     -811     
==========================================
- Hits        14548    14050     -498     
+ Misses        368       55     -313     

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

@jangorecki
Copy link
Member

any idea if this can be a breaking change for any proper use of all.equal?

@MichaelChirico
Copy link
Member Author

I tried to guard against that but I can't say for 100% certain... perhaps best to slip this release

@jangorecki
Copy link
Member

how is this related to rbindlist? I think you wanted to link #4543 @MichaelChirico

@MichaelChirico
Copy link
Member Author

Yes thanks @jangorecki

@MichaelChirico MichaelChirico added this to the 1.16.0 milestone Feb 19, 2024
@MichaelChirico
Copy link
Member Author

I think this can be included in 1.16.0 👍

Copy link

github-actions bot commented Jul 10, 2024

Comparison Plot

Generated via commit e324926

Download link for the artifact containing the test results: ↓ atime-results.zip

Time taken to finish the standard R installation steps: 12 minutes and 6 seconds

Time taken to run atime::atime_pkg on the tests: 3 minutes and 44 seconds

@jangorecki jangorecki removed their request for review July 10, 2024 20:56
R/setops.R Outdated Show resolved Hide resolved
Co-authored-by: Benjamin Schwendinger <52290390+ben-schwen@users.noreply.github.com>
R/setops.R Outdated Show resolved Hide resolved
@MichaelChirico
Copy link
Member Author

It might be preferable to split off the test fixes that are not specifically related to this PR (but were identified as bugs by the code changes here); let me know.

@ben-schwen
Copy link
Member

It might be preferable to split off the test fixes that are not specifically related to this PR (but were identified as bugs by the code changes here); let me know.

Nice! Change looks good, but I think the broken tests warrant a NEWS item now (also since there is a slight change of behavior).

@MichaelChirico
Copy link
Member Author

Oh, good catch. It needed a NEWS item anyway.

@MichaelChirico MichaelChirico merged commit 1c18dac into master Jul 13, 2024
3 of 4 checks passed
@MichaelChirico MichaelChirico deleted the all-equal-POSIX branch July 13, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

all.equal.data.table uses relative difference on POSIXct column (should be absolute)
3 participants