From 0bf0e3385210900d02b4a3304a8659b7eeffa79d Mon Sep 17 00:00:00 2001 From: Matt Dowle Date: Mon, 4 Mar 2019 23:01:16 -0800 Subject: [PATCH] foverlaps type="equal" fix from Arun (#3442) --- inst/tests/test1372-1.Rdata | Bin 0 -> 697 bytes inst/tests/tests.Rraw | 6 +++++- src/ijoin.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 inst/tests/test1372-1.Rdata diff --git a/inst/tests/test1372-1.Rdata b/inst/tests/test1372-1.Rdata new file mode 100644 index 0000000000000000000000000000000000000000..54be425352911ea57106b1906919d4e1a071a935 GIT binary patch literal 697 zcmV;q0!IBGiwFP!000001MSvZh>T$z$MOI3&dj#E5=$v^C`%+wYZV)t(uy3GLQGlZ z-Pw2T*6gg_dCOin-?&f?r4SL;DW%AzQVy}vIujSxp`6MEF35%Pedc-I?9APe+N_Ju zKF>Vwyw72J-`{_i&Pi04C(1>{kx0xDCqg&s@JC5h%5>W*5*bQIUm1*Qdm&oa;!o*k z{p$byzt|TUn0vlNVwj97Oh-MIV>NglWgX7q3U1;xKH@9SEAuHHXjOwYJZ8KUdYvH{ zg^70F8P)EiQIcu*1Fxy53G{mT8QW2iv9*05>;Bb#-^jZD);F(sEe3$h zl#v)GCg-Q3##$&Q?{(JemnCCu5|hQ9IERa3^8YFC51Fn;qYBe(79T)oE-^&NL8-(9 zF*Rio7GoQBVUL)s*AC$@uA>Wg@W3Jqa~ZAcOQp^IP(y(;IN$5sllZ&_bL~93#;m}8 z#+Hcr&#T_v^9JnSp$@7MU=9_SES4U-hZooiYM#Sys`yRR1)Rc39N~M%Xm>+r%Uar5 zcD;>u|Kr8f1gLp7^Qk*>m-aaAXR|l;7AtK%NSpc)()aY1s~49|z&TkdHdrHB$*%_2 f%y=}Ms)zy*)A#&Y&X*Q<0<+3b#f-GURSN(B@y}o& literal 0 HcmV?d00001 diff --git a/inst/tests/tests.Rraw b/inst/tests/tests.Rraw index 585493614..52701f0ed 100644 --- a/inst/tests/tests.Rraw +++ b/inst/tests/tests.Rraw @@ -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 @@ -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 diff --git a/src/ijoin.c b/src/ijoin.c index 666660636..97fbd0510 100644 --- a/src/ijoin.c +++ b/src/ijoin.c @@ -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; } }