Skip to content

Commit 3119135

Browse files
committed
copyAsGrowable: use the correct number of arguments
1 parent 04e2fd7 commit 3119135

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/data.table.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@ replace_dot_alias = function(e) {
16111611
if (length(xcols)) {
16121612
# TODO add: if (max(len__)==nrow) stopf("There is no need to deep copy x in this case")
16131613
# TODO move down to dogroup.c, too.
1614-
SDenv$.SDall = .Call(CcopyAsGrowable, .Call(CsubsetDT, x, if (length(len__)) seq_len(max(len__)) else 0L, xcols), FALSE) # must be deep copy when largest group is a subset
1614+
SDenv$.SDall = .Call(CcopyAsGrowable, .Call(CsubsetDT, x, if (length(len__)) seq_len(max(len__)) else 0L, xcols)) # must be deep copy when largest group is a subset
16151615
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
16161616
if (xdotcols) setattr(SDenv$.SDall, 'names', ansvars[xcolsAns]) # now that we allow 'x.' prefix in 'j', #2313 bug fix - [xcolsAns]
16171617
SDenv$.SD = if (length(non_sdvars)) shallow(SDenv$.SDall, sdvars) else SDenv$.SDall
@@ -1884,7 +1884,7 @@ replace_dot_alias = function(e) {
18841884
grpcols = leftcols # 'leftcols' are the columns in i involved in the join (either head of key(i) or head along i)
18851885
jiscols = chmatch(jisvars, names_i) # integer() if there are no jisvars (usually there aren't, advanced feature)
18861886
xjiscols = chmatch(xjisvars, names_x)
1887-
SDenv$.xSD = .Call(CcopyAsGrowable, x[min(nrow(i), 1L), xjisvars, with=FALSE], FALSE)
1887+
SDenv$.xSD = .Call(CcopyAsGrowable, x[min(nrow(i), 1L), xjisvars, with=FALSE])
18881888
if (!missing(on)) o__ = xo else o__ = integer(0L)
18891889
} else {
18901890
groups = byval

0 commit comments

Comments
 (0)