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
{{ message }}
Repository navigation
[R] String columns read lazily from readr error when transferred to an arrow table #43349
Describe the bug, including details regarding any error messages, version, and platform.
On dev, here is a reprex:
arrow::as_arrow_table(
readr::read_csv(readr::readr_example("chickens.csv"), lazy = TRUE),
sink = tempfile(fileext=".parquet")
)
#> Rows: 5 Columns: 4
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (3): chicken, sex, motto
#> dbl (1): eggs_laid
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#> Error in Table__from_dots(dots, schema, option_use_threads()): No Set_elt found for ALTSTRING class [class: vroom_chr, pkg: vroom]
This wasn't a problem in our last release:
arrow::as_arrow_table(
readr::read_csv(readr::readr_example("chickens.csv"), lazy = TRUE),
sink = tempfile(fileext=".parquet")
)
#> Rows: 5 Columns: 4
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (3): chicken, sex, motto
#> dbl (1): eggs_laid
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#> Table
#> 5 rows x 4 columns
#> $chicken <string>
#> $sex <string>
#> $eggs_laid <double>
#> $motto <string>
#>
#> See $metadata for additional Schema metadata
Hey, I think y'all already know this from reading the PR but I didn't understand it fully myself so wanted to add this reprex and clarify for my own understanding: this is not related to readr and is just altrep stuff, right? @jonkeane
arrow_table(mtarrow)
#> Error in Table__from_dots(dots, schema, option_use_threads()): ALTSTRING objects of type <arrow::array_string_vector> are immutable
Activity
thisisnic commentedon Jul 27, 2024
Hey, I think y'all already know this from reading the PR but I didn't understand it fully myself so wanted to add this reprex and clarify for my own understanding: this is not related to readr and is just altrep stuff, right? @jonkeane
library(arrow)Created on 2024-07-27 with reprex v2.1.1
jonkeane commentedon Jul 27, 2024
Aaah that's a nice even more minimal reprex. I might pull that over so we don't need to add
readrto our dependencies.I had actually assumed our altrep vectors would be ok because they already had the ELT stuff, but clearly not!
GH-43349: [R] Fix altrep string columns from readr (#43351)
jonkeane commentedon Jul 27, 2024
Issue resolved by pull request 43351
#43351
GH-43349: [R] Fix altrep string columns from readr (#43351)