Conversation
…east one of them is 0)
1. non atomic like list() is going to be recycled and not the "zero-length" we are referring to (we can regard list() is length 1 here) 2. NULL element is going to be discarded in later loop
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## master #4262 +/- ##
=======================================
Coverage 99.42% 99.42%
=======================================
Files 73 73
Lines 14446 14447 +1
=======================================
+ Hits 14363 14364 +1
Misses 83 83
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
|
@mattdowle It would be great if this patch can get your approval first, as I'm developping an internal package where DT[J('a', x), ...] is used a lot while Thanks a lot. |
This comment has been minimized.
This comment has been minimized.
… element is length zero
|
1967.35 and 2139.1 are currently failing in this PR, it is quite likely that some revdeps might be failing as well, blocking release process. IF the change is going to be incorporated, it needs to be made in a less breaking manner. Maybe hold on with farther changes till we all agree on behavior. I am having the very same problem in #4370. I need to recycle there as well, but my preference is to recycle 0 and 1 rows data.table to bigger one, quite opposite what you are trying to push here. d1 = 1L
d2 = 1:2
data.frame(d2, d1)
# d2 d1
#1 1 1
#2 2 1
cbind(d2, d1)
# d2 d1
#[1,] 1 1
#[2,] 2 1 |
|
The problem is: Is recyling the zero-length element meaningful, since there's no value at all? Reclying it with That's why data.frame, cbind throws error while tibble() gives the zero-row table. In addition, as I've mentioned in #3727, recycling the zero-length element will trigger a warning of data.table. Someone may accidentally depend this behavior, but I doubt anyone would do it intentionally... Anyway, I will take an investigation on the failed tests. |
|
Agree, you have my vote for recycling to 0 rows. It is easy to escape that by |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
LGTM |
|
This email seems slightly related: https://stat.ethz.ch/pipermail/r-devel/2020-May/079572.html |
… see the difference between x and y being tested
mattdowle
left a comment
There was a problem hiding this comment.
Your examples really helped, thanks.
|
I reran all revdeps to check the impact. After resolving unrelated issues, only one possible impact ( |
Closes #3727