klion26 opened a new pull request, #8950:
URL: https://github.com/apache/arrow-rs/pull/8950

   # Which issue does this PR close?
   
   - Closes #8805 .
   
   # What changes are included in this PR?
   
   Add support for variant to arrow primitive types(for the remaining arrow 
primitive types), and some tests to cover them.  
   
   For the behavior that can't be cast safely, I'll continue to handle them in 
#8086 and #8873
   
   > Self::make_time will return the native value for the given timestamp type
   > Date64Type::from_naive_date(v) will return the milliseconds elapsed since 
UNIX epoch
   
   | VariantType | Arrow Type | Logic|
   | -- | -- | -- |
   | Date | Date64 |  datatypes::Date64Type::from_naive_date(v) |
   | Timestamp\[_ntz\](Micro/Nano) | Timestamp\[_ntz\](Second) | - if 
(timestamp.nano == 0) Self::make_time(timestamp)  <br> - else None |
   | Timestamp\[_ntz\](Micro/Nano) | Timestamp\[_ntz\](Millisecond) | - if 
(timestamp.nano % 1_000_000 == 0) Self::make_time(timestamp) <br> - else None |
   | Time | Time32(Second)| - if (timestamp.nano == 0) v. 
num_seconds_from_midnight() <br> - else None |
   | Time | Time32(Millisecond) | - if (timestamp.nano % 1_000_000 == 0) 
v.num_seconds_from_midnight() * 1000 + v.nano / 1_000_000 <br> - else Nnoe |
   | Time | Time64(Nano) | timestamp.num_seconds * 1_000_000_000 + v.nano |
   
   
   
   
   # Are these changes tested?
   
   Added some new tests
   
   # Are there any user-facing changes?
   
   No


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