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

Issue with int64 columns tolerance is not taken into account #81

Closed
hannes101 opened this issue Feb 23, 2023 · 1 comment · Fixed by #91
Closed

Issue with int64 columns tolerance is not taken into account #81

hannes101 opened this issue Feb 23, 2023 · 1 comment · Fixed by #91
Assignees
Labels
bug Something isn't working
Milestone

Comments

@hannes101
Copy link

Dear all,

first of all thanks a lot for this package, it really makes it easy to detect differences in data.frames.
I would like to report an issue with int64 columns, which are part of the bit64 package.

library(bit64)
library(data.table)
df1.int64 <- structure(list(date = 20220908, val = structure(2.76818691336063e-313, class = "integer64")), row.names = c(NA, 
-1L), class = c("data.table", "data.frame"))
df2.int64 <- structure(list(date = 20220908, val = structure(2.76818691341003e-313, class = "integer64")), row.names = c(NA, 
-1L), class = c("data.table", "data.frame"))

df1.num <- structure(list(date = 20220908, val = 56028726884), row.names = c(NA, 
-1L), class = c("data.table", "data.frame"))
df2.num <- structure(list(date = 20220908, val = 56028726885), row.names = c(NA, 
-1L), class = c("data.table", "data.frame"))

diffdf(df1.num, df2.num, tolerance = 1, scale = 1)
No issues were found!
diffdf(df1.int64, df2.int64, tolerance = 1, scale = 1)
Differences found between the objects!

A summary is given below.

Not all Values Compared Equal
All rows are shown in table below

  =============================
   Variable  No of Differences 
  -----------------------------
     val             1         
  -----------------------------


All rows are shown in table below

  ===================================================
   VARIABLE  ..ROWNUMBER..     BASE        COMPARE   
  ---------------------------------------------------
     val           1        56028726884  56028726885 
  ---------------------------------------------------

Warning message:
In diffdf(df1.int64, df2.int64, tolerance = 1, scale = 1) : 
Not all Values Compared Equal

It was not really obvious to me, that it doesn't work at the beginning.

@gowerc
Copy link
Owner

gowerc commented Jul 17, 2023

We are planning a minor overhaul of the package in Q4 so will look to include this change in then. Thank you for raising.

@kieranjmartin kieranjmartin added bug Something isn't working Effort: Low labels Oct 4, 2023
@kieranjmartin kieranjmartin added this to the Release 1.1 milestone Dec 7, 2023
@kieranjmartin kieranjmartin self-assigned this Apr 5, 2024
kieranjmartin added a commit that referenced this issue Apr 5, 2024
@gowerc gowerc mentioned this issue May 3, 2024
@gowerc gowerc closed this as completed in #91 May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants