amoeba commented on issue #44041:
URL: https://github.com/apache/arrow/issues/44041#issuecomment-2347034073

   Hi @MislavSag, are you able to share your Parquet file or (preferably) a 
minimal sample of it that we could use to reproduce this?
   
   When I tried to make a minimal reproduction, I find I don't get the error 
you do when I set `safe = FALSE` like you do. See:
   
   ```r
   library(arrow)
   library(dplyr)
   
   # w/ safe = FALSE, works fine (truncates)
   arrow_table(data.frame(x=rnorm(10, 0, 10))) |> 
     mutate(x_trunc = cast(x, int32(), safe = FALSE)) |> 
     collect()
   
   # only w/ safe = TRUE does this error (see error below)
   arrow_table(data.frame(x=rnorm(10, 0, 10))) |> 
     mutate(x_trunc = cast(x, int32(), safe = TRUE)) |> 
     collect()
   # Error in `compute.arrow_dplyr_query()`:
   #   ! Invalid: Float value -2.13185 was truncated converting to int32
   # Run `rlang::last_trace()` to see where the error occurred.
   ```
   
   I wonder if there's something going on where the `safe` argument isn't being 
respect or if it's possible there's a typo in your code snippet?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to