You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Egill Axfjord Fridgeirsson (Jira)" <ji...@apache.org> on 2022/08/10 11:06:00 UTC

[jira] [Created] (ARROW-17373) copying dataset and immediatly writing the copy to a different location fails

Egill Axfjord Fridgeirsson created ARROW-17373:
--------------------------------------------------

             Summary: 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.10
            Reporter: Egill Axfjord Fridgeirsson


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)