You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Check for ALTREP
* Fix and add tests
* NEWS Item
* add a new forward-compatibility test
* pass for stlye
* comment
* clarify we think this is rare given the lack of related issues
---------
Co-authored-by: Michael Chirico <[email protected]>
Co-authored-by: Michael Chirico <[email protected]>
Copy file name to clipboardExpand all lines: NEWS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,8 @@
44
44
45
45
12. Internal functions used to signal errors are now marked as non-returning, silencing a compiler warning about potentially unchecked allocation failure. Thanks to Prof. Brian D. Ripley for the report and @aitap for the fix, [#7070](https://github.com/Rdatatable/data.table/pull/7070).
46
46
47
+
13. In rare cases, `data.table` failed to expand ALTREP columns when assigning a full column by reference. This could result in the target column getting modified unintentionally if the next call to the data.table was a modification by reference of the source column. E.g. in `DT[, b := as.character(a)]` the string conversion gets deferred and subsequent modification of column `a` would also modify column `b`, [#5400](https://github.com/Rdatatable/data.table/issues/5400). Thanks to @aquasync for the report and Václav Tlapák for the PR.
48
+
47
49
### NOTES
48
50
49
51
1. Continued work to remove non-API C functions, [#6180](https://github.com/Rdatatable/data.table/issues/6180). Thanks Ivan Krylov for the PRs and for writing a clear and concise guide about the R API: https://aitap.codeberg.page/R-api/.
if (length(rows)==0&&targetlen==vlen&& (vlen>0||nrow==0)) {
551
551
if ( MAYBE_SHARED(thisvalue) ||// set() protects the NAMED of atomic vectors from .Call setting arguments to 2 by wrapping with list
552
552
(TYPEOF(values)==VECSXP&&i>LENGTH(values)-1) ||// recycled RHS would have columns pointing to others, #185.
553
-
(TYPEOF(values)!=VECSXP&&i>0) // assigning the same values to a second column. Have to ensure a copy #2540
553
+
(TYPEOF(values)!=VECSXP&&i>0) ||// assigning the same values to a second column. Have to ensure a copy #2540
554
+
ALTREP(thisvalue) // Some ALTREP wrappers have survived to here, e.g. #5400
554
555
) {
555
556
if (verbose) {
556
-
Rprintf(_("RHS for item %d has been duplicated because MAYBE_REFERENCED==%d MAYBE_SHARED==%d, but then is being plonked. length(values)==%d; length(cols)==%d\n"),
Rprintf(_("RHS for item %d has been duplicated because MAYBE_REFERENCED==%d MAYBE_SHARED==%d ALTREP==%d, but then is being plonked. length(values)==%d; length(cols)==%d\n"),
0 commit comments