You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Neal Richardson (Jira)" <ji...@apache.org> on 2020/06/24 20:01:00 UTC

[jira] [Commented] (ARROW-9219) coerce_timestamps does not work in write_parquet in Apache arrow R package

    [ https://issues.apache.org/jira/browse/ARROW-9219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17144256#comment-17144256 ] 

Neal Richardson commented on ARROW-9219:
----------------------------------------

It's a bug. Only one argument is passed to the function, but it requires two: https://github.com/apache/arrow/blob/42b5185ae0fd68adf0c578c012cc377ec7fd81d4/r/R/arrowExports.R#L1071

{{builder$set_coerce_timestamps}} should call {{parquet___ArrowWriterProperties___Builder__coerce_timestamps(self, unit)}}

Would you be interested in submitting a pull request to fix this? ^^ is the fix, you'd just then need to add a test.

> coerce_timestamps does not work in write_parquet in Apache arrow R package
> --------------------------------------------------------------------------
>
>                 Key: ARROW-9219
>                 URL: https://issues.apache.org/jira/browse/ARROW-9219
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>    Affects Versions: 0.17.1
>         Environment: macOS 10.15.5, R  4.0.0
>            Reporter: Slim Bentami
>            Priority: Major
>              Labels: newbie
>
> i am trying to truncate timestamps to milliseconds when writing a parquet file.
> with:
>  
> {{tutu <- as.POSIXct("2020/06/03 18:00:00",tz = "UTC")}}
> if i do:
>  
> {{write_parquet(data.frame(tutu),"~/Downloads/tutu.test.parquet")}}
> i get 1591207200000000
> if i do:
>  
> {{write_parquet(data.frame(tutu),"~/Downloads/tutu.test.parquet", coerce_timestamps = "ms", allow_truncated_timestamps = TRUE)}}
> i get the error message:
>  
> {{Error in parquet___ArrowWriterProperties___Builder__coerce_timestamps(unit) : 
>   argument "unit" is missing, with no default}}
> what am i doing wrong? thanks in advance.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)