fallintoplace opened a new pull request, #2892:
URL: https://github.com/apache/iceberg-rust/pull/2892

   ## Which issue does this PR close?
   
   N/A. Found while auditing temporal conversions for values before the Unix 
epoch.
   
   ## What changes are included in this PR?
   
   Formatting a timestamptz immediately before the Unix epoch could panic. The 
conversion split the value with integer division and remainder, then cast the 
negative remainder to an unsigned nanosecond value before constructing the 
timestamp.
   
   This PR uses Chrono timestamp constructors for both microsecond and 
nanosecond timestamptz values. These constructors normalize negative timestamps 
correctly and match the conversion already used for timestamps without a 
timezone.
   
   ## Are these changes tested?
   
   Yes. A regression test covers display formatting and JSON round trips for 
values one microsecond and one nanosecond before the Unix epoch.
   
   Validated with:
   
   - cargo test -p iceberg --lib
   - cargo clippy -p iceberg --lib -- -D warnings
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to