bind_rows should give an error for databases #2373
mtcars2 <- copy_to(src_postgres(), mtcars) bind_rows(mtcars2, mtcars2) # expected to get an error here #> A tibble: 6 × 2 #> src ops #> <list> <list> #> 1 <S4: PostgreSQLConnection> <S3: src_postgres> #> 2 <list > <S3: ident> #> 3 <env> <chr > #> 4 <S4: PostgreSQLConnection> <S3: src_postgres> #> 5 <list > <S3: ident> #> 6 <env> <chr > mtcars3 <- copy_to(src_sqlite(path=tempfile(), create = TRUE), mtcars) bind_rows(mtcars3, mtcars3) # expected a more informative error here #> Error in bind_rows_(x, .id) : incompatible sizes (2 != 1)
Of course, it would be possible to write SQL translations for these, but I'm not sure they would be widely used. For
SELECT * FROM some_table UNION ALL SELECT * FROM some_other_table
Binding columns in SQL tables is probably a mistake but could be done by joining row numbers.
The text was updated successfully, but these errors were encountered: