-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-3818: [R] Table$from_batches #3562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-3818: [R] Table$from_batches #3562
Conversation
library(arrow)
#>
#> Attaching package: 'arrow'
#> The following object is masked from 'package:utils':
#>
#> timestamp
#> The following objects are masked from 'package:base':
#>
#> array, table
b <- record_batch(tibble::tibble(int = 1:2, dbl = rnorm(2)))
tab <- table_from_batches(b,b,b)
tab
#> arrow::Table
as_tibble(tab)
#> # A tibble: 6 x 2
#> int dbl
#> <int> <dbl>
#> 1 1 -0.267
#> 2 2 -0.0270
#> 3 1 -0.267
#> 4 2 -0.0270
#> 5 1 -0.267
#> 6 2 -0.0270
# this supports !!! splicing so
batches <- rep(list(b), 20L)
tab <- table_from_batches(!!!batches)
tab
#> arrow::Table
as_tibble(tab)
#> # A tibble: 40 x 2
#> int dbl
#> <int> <dbl>
#> 1 1 -0.267
#> 2 2 -0.0270
#> 3 1 -0.267
#> 4 2 -0.0270
#> 5 1 -0.267
#> 6 2 -0.0270
#> 7 1 -0.267
#> 8 2 -0.0270
#> 9 1 -0.267
#> 10 2 -0.0270
#> # … with 30 more rowsCreated on 2019-02-05 by the reprex package (v0.2.1.9000) |
|
I'm just not sure about the naming. In python the We could expose certain classes a first class citizens of the package if we really want the syntax |
|
Actually #3565 is better because it does not need a separate |
123947e to
760accd
Compare
|
Rebased. |
760accd to
da51b90
Compare
72ea93a to
53dbf5e
Compare
53dbf5e to
c7c5d0f
Compare
|
Obsolete now, as #3635 was merged. |
https://issues.apache.org/jira/browse/ARROW-3818?filter=12344983