Skip to content

Commit 608599c

Browse files
committed
use .shallow
1 parent b7bbb5a commit 608599c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

R/data.table.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,6 @@ replace_dot_alias = function(e) {
13371337
## check key on i as well!
13381338
ichk = is.data.table(i) && haskey(i) &&
13391339
identical(head(key(i), length(leftcols)), names_i[leftcols]) # i has the correct key, #3061
1340-
dt_types = function(x, cols = seq_along(x)) vapply_1c(cols, function(j) typeof(x[[j]]))
13411340
if (
13421341
keylen
13431342
&& (
@@ -1347,7 +1346,7 @@ replace_dot_alias = function(e) {
13471346
.Call(CisOrderedSubset, irows, nrow(x))
13481347
&& (!roll || length(irows) == 1L) # see #1010. don't set key when i has no key, but irows is ordered and roll != FALSE
13491348
&& ( #5361 merging on keyed factor with character, check if resulting character is really sorted
1350-
identical(dt_types(i, leftcols), dt_types(x, rightcols)) # can only be not identical
1349+
identical(vapply_1c(.shallow(i, leftcols), typeof), vapply_1c(.shallow(x, rightcols), typeof)) # can only be not identical
13511350
|| is.sorted(ans, by=head(key(x), keylen))
13521351
)
13531352
)

0 commit comments

Comments
 (0)