You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "e-kotov (via GitHub)" <gi...@apache.org> on 2023/03/15 23:22:34 UTC

[GitHub] [arrow] e-kotov commented on issue #34578: [R] Error reading .csv.gz files in arrow (straddling object straddles two block boundaries (try to increase block size?)

e-kotov commented on issue #34578:
URL: https://github.com/apache/arrow/issues/34578#issuecomment-1470971929

   Increase the read block size. The default [seems to be](https://github.com/apache/arrow/blob/6ba2255c83d4813ee75e710d879ef8ff8f7c7539/r/R/csv.R#LL474C33-L474C57) = 1048576L, increasing it by 1000000 to 2048576L seems to work. That, however causes your schema to return a different error, but if you drop the schema, the code below will work. Perhaps you do not need the schema at all or will have to spend some time reviewing it.
   
   ```{r}
   dat <- open_dataset(data_path, format = 'csv', skip=1, read_options = list(block_size = 2048576L))
   dat %>% glimpse()
   ```
   
   The root of the problem seems to be the extra long strings in the dataset... As noted here https://github.com/huggingface/datasets/issues/836#issuecomment-725552966
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org