#' @export
union <- function(x, y, ...) UseMethod("union_all")
#' @export
union_all.tbl_sql <- function(x, y, copy = FALSE, ...) {
y <- auto_copy(x, y, copy)
sql <- sql_set_op(x$src$con, x, y, "UNION ALL")
update(tbl(x$src, sql), group_by = groups(x))
}
union allkeeps rows even they are equal. Adding it would be pretty easy:sets.r
tbl-sql.r