nathaniel-d-ef opened a new pull request, #8393:
URL: https://github.com/apache/arrow-rs/pull/8393

   # Which issue does this PR close?
   
   - Part of https://github.com/apache/arrow-rs/issues/4886
   
   # Rationale for this change
   
   This change adds support for Arrow DataType::Duration to the arrow-avro 
crate. Previous versions of this code return a NotYetImplemented error 
encouraging users to manually cast to Interval(MonthDayNano). With this change, 
Duration will now be represented as a long, with a metadata value of 
`arrowDurationType` which corresponds to the TimeUnit. This retains the Arrow 
paradigm for Duration of clock time, rather than the Avro approach of [calendar 
time](https://avro.apache.org/docs/1.11.1/specification/#duration). Because of 
this disconnect between the two specs, any attempt to map the value (e.g. 
seconds into days) would be lossy, as days and months can be of varying length.
   
   # What changes are included in this PR?
   
   Expands the arrow-avro crate to handle Arrow `Duration` types with various 
`TimeUnit` variants (Second, Millisecond, Microsecond, Nanosecond). Includes:
   
   - Additions in encoder/decoder to support Duration types.
   - Updates to schema handling for duration-specific metadata.
   - Comprehensive unit tests for reading and writing `Duration` types.
   
   # Are these changes tested?
   
   Yes, existing tests are all passing, and tests have been added to validate 
the encoding and decoding of Duration.
   
   # Are there any user-facing changes?
   
   -  Crate is not yet public
   
   


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to