You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Dewey Dunnington (Jira)" <ji...@apache.org> on 2022/12/12 16:03:00 UTC
[jira] [Closed] (ARROW-17373) [R] copying dataset and immediatly writing the copy to a different location fails
[ https://issues.apache.org/jira/browse/ARROW-17373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dewey Dunnington closed ARROW-17373.
------------------------------------
Resolution: Duplicate
> [R] copying dataset and immediatly writing the copy to a different location fails
> ---------------------------------------------------------------------------------
>
> Key: ARROW-17373
> URL: https://issues.apache.org/jira/browse/ARROW-17373
> Project: Apache Arrow
> Issue Type: Bug
> Components: R
> Affects Versions: 9.0.0
> Environment: Ubuntu 22.04
> Reporter: Egill Axfjord Fridgeirsson
> Priority: Major
>
> When I copy large feather files, open a dataset from that file and immediately write that dataset to a new location I get the following error:
>
> ```Error: Invalid: Expected to read 144 metadata bytes but got 0```
>
> I have made a reproducible example below:
>
> ``` r
> df <- data.frame(replicate(1,sample(0:1,100e6,rep=TRUE)))
> savePath <- file.path(tempdir(), 'arrowTest')
> if (!dir.exists(savePath)) {
> dir.create(savePath)
> }
> arrow::write_feather(df, file.path(savePath, 'part-0.feather'))
> copyPath <- file.path(tempdir(),'arrowTest')
> if (!dir.exists(copyPath)) {
> dir.create(copyPath)
> }
> writePath <- file.path(tempdir(), 'arrowTest')
> if (!dir.exists(writePath)) {
> dir.create(writePath)
> }
> arrow::copy_files(savePath, copyPath)
> dataset <- arrow::open_dataset(copyPath, format='feather')
> arrow::write_dataset(dataset = dataset, path = writePath, format = 'feather')
> ```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)