[
https://issues.apache.org/jira/browse/ARROW-15797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nicola Crane updated ARROW-15797:
---------------------------------
Summary: [R] Supplying column names to open_dataset() results in all
columns being read in as strings (was: [R] Supplying column names to
open_dataset results in all columns being read in as strings)
> [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
> Priority: Major
>
> {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)