-
Notifications
You must be signed in to change notification settings - Fork 60
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
Recursive gc error #389
Comments
Possibly related is #270, which claims that all ALTREP columns are converted to non-ALTREP before writing |
I think the problem is with the POSIXct column. vroom calls # Make it large enough to trigger an ALTREP wrapper
x <- rep(as.POSIXct("2019-01-01", "UTC"), 1000)
# This makes an ALTREP character vector, oops
.Internal(inspect(vroom:::output_column(x)))
#> @7fefac305790 16 STRSXP g0c0 [] wrapper [srt=-2147483648,no_na=0]
#> @7fef6b10a000 16 STRSXP g0c7 [REF(1)] (len=1000, tl=0)
#> @7fefabfc4c98 09 CHARSXP g0c3 [REF(1001),gp=0x60] [ASCII] [cached] "2019-01-01T00:00:00Z"
#> @7fefabfc4c98 09 CHARSXP g0c3 [REF(1001),gp=0x60] [ASCII] [cached] "2019-01-01T00:00:00Z"
#> @7fefabfc4c98 09 CHARSXP g0c3 [REF(1001),gp=0x60] [ASCII] [cached] "2019-01-01T00:00:00Z"
#> @7fefabfc4c98 09 CHARSXP g0c3 [REF(1001),gp=0x60] [ASCII] [cached] "2019-01-01T00:00:00Z"
#> @7fefabfc4c98 09 CHARSXP g0c3 [REF(1001),gp=0x60] [ASCII] [cached] "2019-01-01T00:00:00Z"
#> ... It looks to me like it would be safe to just swap the ordering of these two calls, and that should fix it. I'm trying to run the original example to try and reproduce the issue right now. Very slow! |
Slightly more minimal reprex: library(nycflights13)
library(vroom)
path <- tempfile(fileext = ".csv")
gctorture(TRUE)
vroom_write(flights, path) And I confirmed that this does not fail, so I think my analysis is correct library(nycflights13)
library(vroom)
path <- tempfile(fileext = ".csv")
flights$time_hour <- NULL
gctorture(TRUE)
vroom_write(flights, path) |
From tidyverse/multidplyr#127 (comment)
The text was updated successfully, but these errors were encountered: