You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Nicola Crane (Jira)" <ji...@apache.org> on 2022/02/28 13:07:00 UTC

[jira] [Created] (ARROW-15797) [R] Supplying column names to open_dataset results in all columns being read in as strings

Nicola Crane created ARROW-15797:
------------------------------------

             Summary: [R] Supplying column names to open_dataset results in all columns being read in as strings
                 Key: ARROW-15797
                 URL: https://issues.apache.org/jira/browse/ARROW-15797
             Project: Apache Arrow
          Issue Type: Bug
          Components: R
            Reporter: Nicola Crane



{code:r}
library(arrow)
#> 
#> Attaching package: 'arrow'
#> The following object is masked from 'package:utils':
#> 
#>     timestamp
td <- tempfile()
dir.create(td)
write_dataset(mtcars, td, format = "csv")

# Correct column types
open_dataset(td, format = "csv")
#> FileSystemDataset with 1 csv file
#> mpg: double
#> cyl: int64
#> disp: double
#> hp: int64
#> drat: double
#> wt: double
#> qsec: double
#> vs: int64
#> am: int64
#> gear: int64
#> carb: int64

# Incorrect column types
open_dataset(td, format = "csv", column_names = c("mpg", "cyl", "disp", "hp", "drat", "wt", "qsec", "vs", "am", "gear", "carb"))
#> FileSystemDataset with 1 csv file
#> mpg: string
#> cyl: string
#> disp: string
#> hp: string
#> drat: string
#> wt: string
#> qsec: string
#> vs: string
#> am: string
#> gear: string
#> carb: string

{code}




--
This message was sent by Atlassian Jira
(v8.20.1#820001)