Skip to content

Commit

Permalink
foverlaps type="equal" fix from Arun (#3442)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdowle authored Mar 5, 2019
1 parent 91390e2 commit 0bf0e33
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Binary file added inst/tests/test1372-1.Rdata
Binary file not shown.
6 changes: 5 additions & 1 deletion inst/tests/tests.Rraw
Original file line number Diff line number Diff line change
Expand Up @@ -5540,6 +5540,10 @@ for (run in seq_len(times)) {
}
}
}
test(1372.91, load(testDir("test1372-1.Rdata")), c("i","x")) # 3432
test(1372.92, foverlaps(i, x, mult="all", type="equal", nomatch=NULL, which=TRUE),
data.table(xid=INT(11,35,35,45,45,45,46,46,46,46),
yid=INT(20,39,40,52,53,54,55,56,57,58)))

# fix for bug in address - #824
# was temporarily disabled in issue #2619
Expand Down Expand Up @@ -10654,7 +10658,7 @@ test(1759, fread(testDir("alluniquechar.csv"))[c(1,2,499,500)],
# fread should use multiple threads on single column input.
# tests 2 threads; the very reasonable limit on CRAN
# file needs to be reasonably large for threads to kick in (minimum chunkSize is 1MB currently)
if (getDTthreads() != 2) {
if (getDTthreads() == 1L) {
cat("Test 1760 not run because this session either has no OpenMP or has been limited to one thread (e.g. under UBSAN and ASAN)\n")
} else {
N = if (TRUE) 2e6 else 1e9 # offline speed check
Expand Down
2 changes: 1 addition & 1 deletion src/ijoin.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ SEXP overlaps(SEXP ux, SEXP imatches, SEXP multArg, SEXP typeArg, SEXP nomatchAr
if ( INTEGER(tmp1)[j] == INTEGER(tmp2)[m] ) {
++wlen; ++j; ++m;
} else if ( INTEGER(tmp1)[j] > INTEGER(tmp2)[m] ) {
break;
++m;
} else ++j;
}
}
Expand Down

0 comments on commit 0bf0e33

Please sign in to comment.