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
# TODO add: if (max(len__)==nrow) stopf("There is no need to deep copy x in this case")
1593
1593
# TODO move down to dogroup.c, too.
1594
-
SDenv$.SDall= .Call(CsubsetDT, x, if (length(len__)) seq_len(max(len__)) else0L, xcols) # must be deep copy when largest group is a subset
1594
+
SDenv$.SDall= .Call(CcopyAsGrowable, .Call(CsubsetDT, x, if (length(len__)) seq_len(max(len__)) else0L, xcols), FALSE) # must be deep copy when largest group is a subset
1595
1595
if (!is.data.table(SDenv$.SDall)) setattr(SDenv$.SDall, "class", c("data.table","data.frame")) # DF |> DT(,.SD[...],by=grp) needs .SD to be data.table, test 2022.012
1596
1596
if (xdotcols) setattr(SDenv$.SDall, 'names', ansvars[xcolsAns]) # now that we allow 'x.' prefix in 'j', #2313 bug fix - [xcolsAns]
if (TRUELENGTH(dt) <colj+1) internal_error(__func__, "Trying to add new column by reference but tl is full; setalloccol should have run first at R level before getting to this point"); // # nocov
322
+
if (R_maxLength(dt) <colj+1) internal_error(__func__, "Trying to add new column by reference but tl is full; setalloccol should have run first at R level before getting to this point"); // # nocov
323
323
target=PROTECT(allocNAVectorLike(RHS, n));
324
324
// Even if we could know reliably to switch from allocNAVectorLike to allocVector for slight speedup, user code could still
325
325
// contain a switched halt, and in that case we'd want the groups not yet done to have NA rather than 0 or uninitialized.
0 commit comments