novemberkilo opened a new pull request #832:
URL: https://github.com/apache/arrow-rs/pull/832


   # Which issue does this PR close?
   
   This is related to a datafusion issue -- 
https://github.com/apache/arrow-datafusion/issues/958
   
   # Rationale for this change
    
   https://github.com/apache/arrow-datafusion/issues/958#issuecomment-932726750
   
   # What changes are included in this PR?
   
   So as to support more timestamp formats, this PR changes the implementation 
of `parse` for `Microsecond` and `Nanosecond` type `Timestamps` to use 
`kernels::cast_utils::string_to_timestamp_nanos`
   
   # Are there any user-facing changes?
   
   I've checked that a user can now parse timestamps in CSV files as described 
in the referenced `datafusion` issue. Specifically, you can now do:
   
   ```
   fn nyctaxi_schema() -> Schema {
       Schema::new(vec![
           Field::new("VendorID", DataType::Utf8, true),
           Field::new("pickup_datetime", 
DataType::Timestamp(TimeUnit::Microsecond, None), true),
           Field::new("dropoff_datetime", 
DataType::Timestamp(TimeUnit::Microsecond, None), true),
           ...
   
   ```
   
   // @alamb 


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