blackary opened a new pull request #10211:
URL: https://github.com/apache/arrow/pull/10211


   This surprised me when trying to use this flag to avoid this exception:
   
   ```python
   df.to_parquet("test.parquet")                        
   *** pyarrow.lib.ArrowInvalid: Casting from timestamp[ns, tz=UTC] to 
timestamp[us] would lose data: 
   1520751599999999999
   
   df.to_parquet("test.parquet", coerce_timestamps='us')                        
   *** pyarrow.lib.ArrowInvalid: Casting from timestamp[ns, tz=UTC] to 
timestamp[us] would lose data: 
   1520751599999999999
   
   df.to_parquet("test.parquet", allow_truncated_timestamps=True)               
         
   *** pyarrow.lib.ArrowInvalid: Casting from timestamp[ns, tz=UTC] to 
timestamp[us] would lose data: 
   1520751599999999999
   
   df.to_parquet("test.parquet", coerce_timestamps='us', 
allow_truncated_timestamps=True)                       
   # Succeeded without exception
   ```


-- 
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.

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


Reply via email to