You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## ensure symmetric join for inner|full join, apply mult on both tables, bmerge do only 'x' table
176
-
cp.i=FALSE## copy marker of out.i
177
-
if ((innerfull)&&!is.null(mult) && (mult=="first"||mult=="last")) {
178
-
jnfm= fdistinct(jnfm, on=on, mult=mult, cols=fm.cols, copy=FALSE) ## might not copy when already unique by 'on'
179
-
cp.i= nrow(jnfm)!=nrow(lhs) ## nrow(lhs) bc how='inner|full' so jnfm=lhs
180
-
} elseif (how=="inner"&& (is.null(mult) ||mult=="error")) { ## we do this branch only to raise error from bmerge, we cannot use forder to just find duplicates because those duplicates might not have matching rows in another table, full join checks mult='error' during two non-void bmerges
if (inner_or_full&&!is.null(mult) && (mult=="first"||mult=="last")) {
177
+
join_from= fdistinct(join_from, on=on, mult=mult, cols=from_cols, copy=FALSE) ## might not copy when already unique by 'on'
178
+
copy_i= nrow(join_from) !=nrow(lhs) ## nrow(lhs) bc how='inner|full' so join_from=lhs
179
+
} elseif (how=="inner"&& (is.null(mult) ||mult=="error")) { ## we do this branch only to raise error from bmerge, we cannot use forder to just find duplicates because those duplicates might not have matching rows in another table, full join checks mult='error' during two non-void bmerges
out.x=if (is.null(ans$xrows)) ## as of now xrows cannot be NULL #4409 thus nocov below
199
-
internal_error("dtmerge()$xrows returned NULL, #4409 been resolved but related code has not been updated?") #.shallow(jnto, cols=someCols(jnto, to.cols, drop=on), retain.key=TRUE) # nocov ## as of now nocov does not make difference r-lib/covr#279
198
+
internal_error("dtmerge()$xrows returned NULL, #4409 been resolved but related code has not been updated?") #.shallow(join_to, cols=someCols(join_to, to_cols, drop=on), retain.key=TRUE) # nocov ## as of now nocov does not make difference r-lib/covr#279
## ensure no duplicated column names in merge results
204
-
if (any(dup.i<-names(out.i) %chin% names(out.x)))
203
+
if (any(dup.i<-names(out.i) %chin% names(out.x)))
205
204
stopf("merge result has duplicated column names, use 'cols' argument or rename columns in 'l' tables, duplicated column(s): %s", brackify(names(out.i)[dup.i]))
0 commit comments