Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@

23. Incorrect sorting/grouping results due to a bug in Intel's `icc` compiler 2019 (Version 19.0.4.243 Build 20190416) has been worked around thanks to a report and fix by Sebastian Freundt, [#3647](https://github.com/Rdatatable/data.table/issues/3647). Please run `data.table::test.data.table()`. If that passes, your installation does not have the problem.

24. `column not found` could incorrectly occur in rare non-equi-join cases, [#3635](https://github.com/Rdatatable/data.table/issues/3635). Thanks to @UweBlock for the report.

#### NOTES

1. `rbindlist`'s `use.names="check"` now emits its message for automatic column names (`"V[0-9]+"`) too, [#3484](https://github.com/Rdatatable/data.table/pull/3484). See news item 5 of v1.12.2 below.
Expand Down
8 changes: 4 additions & 4 deletions R/data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -1122,11 +1122,11 @@ replace_order = function(isub, verbose, env) {
if (!length(leftcols)) stop("column(s) not found: ", paste(ansvars[wna],collapse=", "))
xcols = w[!wna]
xcolsAns = which(!wna)
ivars = names(i)
ivars[leftcols] = names(x)[rightcols]
w2 = chmatch(ansvars[wna], ivars)
map = c(seq_along(i), leftcols) # this map is to handle dups in leftcols, #3635
names(map) = c(names(i), names(x)[rightcols])
w2 = map[ansvars[wna]]
if (any(w2na <- is.na(w2))) {
ivars = paste0("i.",ivars)
ivars = paste0("i.",names(i)) # ivars is only used in this branch
ivars[leftcols] = names(i)[leftcols]
w2[w2na] = chmatch(ansvars[wna][w2na], ivars)
if (any(w2na <- is.na(w2))) {
Expand Down
7 changes: 7 additions & 0 deletions inst/tests/tests.Rraw
Original file line number Diff line number Diff line change
Expand Up @@ -15194,6 +15194,13 @@ l = replicate(ceiling(log10(.Machine$integer.max)), rep(1L, 10L), simplify = FAL
l$unique = TRUE
test(2061, do.call(CJ, l), setkey(unique(as.data.table(head(l, -1L)))))

# #3635, not specific to non-equi joins, but only occurs in non-equi cases.
d1 = data.table(a = c(1L, 6L), b = c(11L, 16L))
d2 = data.table(r = 1:5, s = seq(0L, 20L, 5L))
test(2062.1, d1[d2, on = .(a <= s, b >= s), j = .SD], ans<-data.table(a=INT(0,5,10,10,15,20), b=INT(0,5,10,10,15,20)))
test(2062.2, d1[d2, on = .(a <= s, b >= s)][, .(a, b)], ans)


###################################
# Add new tests above this line #
###################################
Expand Down