Describe the bug, including details regarding any error messages, version, and platform.
Arrow does not correctly interpret some partition values as character columns, resulting in data loss.
library(arrow)
library(dplyr)
# character col with leading zero
mtcars2 <- mutate(mtcars, test = paste0(0, mtcars$carb)) |> as_tibble()
tmp <- tempfile()
write_dataset(mtcars2, tmp, partitioning = "test")
mtcars3 <- open_dataset(tmp) |> collect()
unique(mtcars2$test)
#> [1] "04" "01" "02" "03" "06" "08"
unique(mtcars3$test)
#> [1] 1 2 3 4 6 8
Created on 2024-01-17 with reprex v2.0.2
Component(s)
R
Describe the bug, including details regarding any error messages, version, and platform.
Arrow does not correctly interpret some partition values as character columns, resulting in data loss.
Created on 2024-01-17 with reprex v2.0.2
Component(s)
R