alamb commented on issue #597:
URL: https://github.com/apache/arrow-rs/issues/597#issuecomment-885821148


   @velvia  I suggest we ensure the Rust implementation can interoperate with 
the timezone / time definition (e.g. use a string as defined here: 
https://github.com/apache/arrow-rs/blob/master/format/Schema.fbs#L226-L246) 
That string representation also allows for numeric offsets like `"+01:00"` or 
named timezones). 
   
   If `str` manipulation is too slow, perhaps we can use an enum like
   ```rust
   enum Timezone {
     /// UTC offset, in minutes (?tbd units)
     Offset(i32)
     /// character with the meaning from arrow definition
     name(&'static str)
   }
   ```
   
   > @alamb there is actually a way to create primitive timezone arrays in 
other timezones.
   
   That is quite cool -- I did not realize that 👍  It is still somewhat strange 
because the `TimestampNanosecondArray` is effectively "typed" to a 
`DataType::Timestamp(TimeUnit::Nanoseconds, None)` but the actual instance may 
have a non-None timestamp, which seems confusing
   
   > Adding a ref/pointer will require adding lifetimes to type annotations, 
which would be really annoying and a huge global change
   
   That is why I proposed using `'static` (aka so that we didn't have to plumb 
through lifetimes everywhere) - but it might be annoying to arrange for static 
strings 


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